Remove patching, unpin requirements for build
This is still experimental, in an attempt to remove patching from
the build.
Signed-off-by: Eric Ball <eball@linuxfoundation.org>
Change-Id: Idcbfc079e15cf3901a30958989e11fc97981f740
diff --git a/.gitreview b/.gitreview
index a95e0fb..ad2e175 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,4 +3,4 @@
port=29418
project=voltha-system-tests.git
defaultremote=origin
-defaultbranch=master
+defaultbranch=remove-robot-patching
diff --git a/Makefile b/Makefile
index cf6ca33..58625fc 100644
--- a/Makefile
+++ b/Makefile
@@ -510,7 +510,7 @@
## -----------------------------------------------------------------------
## Intent: Parameterized test target
## -----------------------------------------------------------------------
-voltha-bbsim-test: venv-activate-patched
+voltha-bbsim-test: venv-activate-script
$(call run-robot-test,tests/bbsim)
rwcore-restart-single-kind: ROBOT_MISC_ARGS += -X -i functionalANDrwcore-restart $(ROBOT_DEBUG_LOG_OPT)
@@ -657,7 +657,7 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-voltha-test: venv-activate-patched
+voltha-test: venv-activate-script
$(call run-robot-test,tests/functional)
bbsim-dmi-hw-management-test: ROBOT_MISC_ARGS += -e notreadyDMI -i functionalDMI -e bbsimUnimplementedDMI
@@ -672,7 +672,7 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-voltha-dmi-test: venv-activate-patched
+voltha-dmi-test: venv-activate-script
$(call run-robot-test,tests/dmi-interface)
# target to invoke single ONU pm data scenarios in ATT workflow
@@ -712,7 +712,7 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
-voltha-pm-data-test: venv-activate-patched
+voltha-pm-data-test: venv-activate-script
# ROBOT_PM_CONFIG_FILE= is differnet
# $(call run-robot-test,tests/pm-data)
@@ -886,7 +886,7 @@
voltha-onu-robustness-tests: ROBOT_FILE := Voltha_ONUErrorTests.robot
voltha-onu-robustness-tests: openonu-go-adapter-tests
-software-upgrade-test: venv-activate-patched
+software-upgrade-test: venv-activate-script
$(activate) \
&& cd tests/software-upgrades \
&& robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
@@ -894,7 +894,7 @@
voltha-dt-test: ROBOT_MISC_ARGS += -e notready --noncritical non-critical
## CHECK
-voltha-dt-test: venv-activate-patched
+voltha-dt-test: venv-activate-script
$(activate) \
&& cd tests/dt-workflow \
&& robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
@@ -902,7 +902,7 @@
voltha-tt-test: ROBOT_MISC_ARGS += -e notready --noncritical non-critical
## CHECK
-voltha-tt-test: venv-activate-patched
+voltha-tt-test: venv-activate-script
$(activate) \
&& cd tests/tt-workflow \
&& robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
@@ -910,28 +910,28 @@
voltha-tim-test: ROBOT_MISC_ARGS += -e notready --noncritical non-critical
## Check
-voltha-tim-test: venv-activate-patched
+voltha-tim-test: venv-activate-script
$(activate) \
&& cd tests/tim-workflow \
&& robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
## CHECK
-voltha-scale-test: venv-activate-patched
+voltha-scale-test: venv-activate-script
$(activate) \
&& cd tests/scale \
&& robot $(ROBOT_MISC_ARGS) Voltha_Scale_Tests.robot
## CHECK
-openonu-go-adapter-tests: venv-activate-patched
+openonu-go-adapter-tests: venv-activate-script
$(activate) \
&& cd tests/openonu-go-adapter \
&& robot -V $(ROBOT_CONFIG_FILE) $(ROBOT_MISC_ARGS) $(ROBOT_FILE)
voltha-bbf-adapter-test: ROBOT_MISC_ARGS += -e notready --noncritical non-critical
-voltha-bbf-adapter-test: venv-activate-patched
+voltha-bbf-adapter-test: venv-activate-script
$(call run-robot-test,tests/bbf-adapter)
-voltha-memory-leak-test: venv-activate-patched
+voltha-memory-leak-test: venv-activate-script
$(call run-robot-test,tests/memory-leak)
##----------------##
@@ -943,7 +943,7 @@
# tidy target will be more useful once issue with removing leading comments
# is resolved: https://github.com/robotframework/robotframework/issues/3263
# -----------------------------------------------------------------------
-tidy-robot: venv-activate-patched
+tidy-robot: venv-activate-script
$(activate) && python -m robot.tidy --inplace $(ROBOT_FILES)
## Variables for gendocs
@@ -965,7 +965,7 @@
# -----------------------------------------------------------------------
.PHONY: gendocs lint test
# In future explore use of --docformat REST - integration w/Sphinx?
-gendocs: venv-activate-patched
+gendocs: venv-activate-script
$(call banner-enter)
@@ -998,7 +998,7 @@
## -----------------------------------------------------------------------
## -----------------------------------------------------------------------
clean-all sterile :: clean
- $(RM) -r venv-activate-patched
+ $(RM) -r venv-activate-script
# -----------------------------------------------------------------------
# -----------------------------------------------------------------------
diff --git a/makefiles/include.mk b/makefiles/include.mk
index 4df4c4c..b93ba1d 100644
--- a/makefiles/include.mk
+++ b/makefiles/include.mk
@@ -42,7 +42,6 @@
include $(ONF_MAKEDIR)/commands/include.mk # Tools and local installers
include $(ONF_MAKEDIR)/virtualenv.mk# # lint-{jjb,python} depends on venv
-include $(ONF_MAKEDIR)/patches/include.mk# # Patch when python 3.10+ in use
include $(ONF_MAKEDIR)/lint/include.mk
include $(ONF_MAKEDIR)/gerrit/include.mk
diff --git a/makefiles/lint/robot/install.mk b/makefiles/lint/robot/install.mk
index b1f871c..d6cc842 100644
--- a/makefiles/lint/robot/install.mk
+++ b/makefiles/lint/robot/install.mk
@@ -28,7 +28,7 @@
## Intent: Install rflint python virtualenv package
## -----------------------------------------------------------------------
$(lint-robot-cmd) : lint-robot-install
-lint-robot-install: venv-activate-patched
+lint-robot-install:
# Verify package mentioned in requirements.txt
# grep 'robotframework-lint' requirements.txt
$(activate) && pip freeze | grep 'robotframework-lint'
@@ -42,4 +42,3 @@
@echo
# [EOF]
-
diff --git a/makefiles/patches/README.md b/makefiles/patches/README.md
deleted file mode 100644
index 56455c1..0000000
--- a/makefiles/patches/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Howto create a python 3.10+ patch
-
-1) Checkout voltha-docs
-2) cd voltha-docs
-3) make venv
-4) make patch-init
-5) modify the file to be patched beneath staging/${relative_path_to_patch}
-6) make patch-create PATCH_PATH=${relative_path_to_patch}
- o This will create patches/${relative_path_to_patch}/patch
-7) Verify
- o make sterile
- o make venv
-
-# Howto apply python 3.10+ patches
-
-See repo:voltha-docs for a working example.
-
-1) Modify Makefile
-2) Add target
-
-# [EOF]
\ No newline at end of file
diff --git a/makefiles/patches/help.mk b/makefiles/patches/help.mk
deleted file mode 100644
index d43e119..0000000
--- a/makefiles/patches/help.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- makefile -*-
-# -----------------------------------------------------------------------
-# Copyright 2017-2024 Open Networking Foundation (ONF) and the ONF Contributors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# -----------------------------------------------------------------------
-
-ifdef VERBOSE
- help :: help-patches
-else
- help ::
- @echo
- @echo "[PATCHES] - helper on the road to python 3.10+ based testing"
- @echo ' see also: help-patches'
-endif
-
-help-patches:
- @echo
- @echo "[PATCHES] - helper on the road to python 3.10+ based testing"
- @echo " patch-apply Apply patches to the virtualenv directory"
- @echo " patch-create"
- @echo " patch-gather Gather a list of potential patch sources"
- @echo " patch-init Clone the virtualenv directory for patch creation."
-
-
-
-
-help-trailer ::
- @echo "[SEE ALSO] patches-help"
-
-help-verbose ::
- $(HIDE)$(MAKE) --no-print-directory help VERBOSE=1
-
-# [EOF]
diff --git a/makefiles/patches/include.mk b/makefiles/patches/include.mk
deleted file mode 100644
index 7aa581a..0000000
--- a/makefiles/patches/include.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-# -*- makefile -*-
-# -----------------------------------------------------------------------
-# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# -----------------------------------------------------------------------
-
-include $(ONF_MAKEDIR)/patches/help.mk
-
-patch-gather-args += --exclude=Makefile
-patch-gather-args += --exclude-dir=vault
-patch-gather-args += --exclude-dir=makefiles
-patch-gather-args += --exclude-dir=staging
-patch-gather-args += --exclude-dir=patches
-
-# patch-gather-args += -e 'from collections import'
-patch-gather-args += '-e' 'from collections import Mapping'
-patch-gather-args += '-e' 'from collections import MutableMapping'
-
-# Defined by [Mm]akefile or makefiles/virtualenv.mk
-venv-name ?= $(error $(MAKE) venv-name= is required)
-
-PATCH_PATH ?= $(error $(MAKE) PATCH_PATH= is required)
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-patch-gather:
- grep -r $(patch-gather-args)
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-patch-diff:
- $(HIDE)diff -qr staging $(venv-name) \
- | awk '{print "# diff -Naur "$$2" "$$4}' \
- | tee $@.log
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-patch-create:
- mkdir -p patches/$(PATCH_PATH)
- diff -Naur staging/$(PATCH_PATH) $(venv-name)/$(PATCH_PATH) | tee patches/$(PATCH_PATH)/patch
- exit 1
-
-## -----------------------------------------------------------------------
-## -----------------------------------------------------------------------
-patch-init:
- find "$(venv-name)" -name '__pycache__' -type d -print0 \
- | xargs -I'{}' --null --no-run-if-empty $(RM) -r {}
- mkdir -p staging
- rsync -rv --checksum "$(venv-name)/." "staging/."
- @echo "Modify files beneath staging/ to create a patch source"
-
-# [SEE ALSO]
-# ---------------------------------------------------------------------------
-# https://bobbyhadz.com/blog/python-importerror-cannot-import-name-mapping-from-collections
-# ---------------------------------------------------------------------------
-# [EOF]
diff --git a/makefiles/virtualenv.mk b/makefiles/virtualenv.mk
index 8beef54..c5c0ba7 100644
--- a/makefiles/virtualenv.mk
+++ b/makefiles/virtualenv.mk
@@ -61,18 +61,6 @@
## Intent: Explicit named installer target w/o dependencies.
## Makefile targets should depend on venv-activate-script.
## -----------------------------------------------------------------------
-venv-activate-patched := $(venv-activate-script).patched
-venv-activate-patched : $(venv-activate-patched)
-$(venv-activate-patched) : $(venv-activate-script)
- $(call banner-enter,Target $@)
- $(onf-mk-top)/../patches/python_310_migration.sh --venv "$(venv-name)" 'apply'
- touch $@
- $(call banner-leave,Target $@)
-
-## -----------------------------------------------------------------------
-## Intent: Explicit named installer target w/o dependencies.
-## Makefile targets should depend on venv-activate-script.
-## -----------------------------------------------------------------------
venv: $(venv-activate-script)
## -----------------------------------------------------------------------
diff --git a/patches/README.md b/patches/README.md
deleted file mode 100644
index f3302b9..0000000
--- a/patches/README.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# Migration support for python 3.10+
-
-## Intent
-
-Applications of patches will enable local use of newer python versions
-available with a recent OS install or package manager installation.
-Makefile targets will fail out of the box w/o modifying collection imports.
-
-Create new patches as needed to help testing along.
-Eventually this hierarchy can be dismantled once the latest interpreter
-is generally in use.
-
-## patches/
-
-This directory contains patch files that can be directly applied to sources
-in the python virtualenv directory. Patches are created to support use of
-three python version variants for the robot ramework:
- python 2x (deprecated)
- python >= 3.10 (collections.abc required)
- python < 3.10 (collections.abc optional)
-
-
-# .venv/
-
-Makefile will first create a python virtualenv directory to selectively
-use packages. After setup patches are applied to venv (as a transition)
-to fully enable support for local interpreter use for newer OS installs.
-
-
-# staging/
-
-The staging directory is used for comparison with the .venv directory
-to generate patches. Populate the directory with a copy of a cleanly
-patched virtual interpreter then modify files benath/ staging to generate
-a patch from.
-
-% make sterile
-% make .venv
-% mkdir staging
-% rsync -rv --checksum .venv/. staging/.
-[NOTE] Make python 3.10+ migration edits beneath staging as needed
-% make patch-gather
-% make sterile
-% make lint
-
-
-# makefile targets
-
-make patch-gather:
- * gather a list of potential sources to edit.
-
-make patch-apply:
- * Gather a list of patch files.
- * Apply each in turn to sources in the virtualenv directory.
-
-
-# Verify installation
- * make lint -or- make test
-
-# [EOF]
\ No newline at end of file
diff --git a/patches/lib/python3.10/site-packages/robot/utils/normalizing.py/patch b/patches/lib/python3.10/site-packages/robot/utils/normalizing.py/patch
deleted file mode 100644
index ae8619a..0000000
--- a/patches/lib/python3.10/site-packages/robot/utils/normalizing.py/patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- vault/lib/python3.10/site-packages/robot/utils/normalizing.py 2022-11-26 06:59:47.438751606 -0500
-+++ .venv/lib/python3.10/site-packages/robot/utils/normalizing.py 2022-11-26 06:57:29.960476182 -0500
-@@ -13,10 +13,7 @@
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
--try: # python >= 3.10
-- from collections.abc import MutableMapping
--except ImportError: # python 2x
-- from collections import MutableMapping
-+from collections import MutableMapping
-
- from .platform import IRONPYTHON, PY_VERSION, PY3
- from .robottypes import is_dict_like, is_unicode
diff --git a/patches/lib/python3.10/site-packages/robot/utils/robottypes3.py/patch b/patches/lib/python3.10/site-packages/robot/utils/robottypes3.py/patch
deleted file mode 100644
index d1aa540..0000000
--- a/patches/lib/python3.10/site-packages/robot/utils/robottypes3.py/patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- vault/lib/python3.10/site-packages/robot/utils/robottypes3.py 2022-11-26 07:00:17.126386733 -0500
-+++ .venv/lib/python3.10/site-packages/robot/utils/robottypes3.py 2022-11-26 06:57:29.956476232 -0500
-@@ -13,12 +13,7 @@
- # See the License for the specific language governing permissions and
- # limitations under the License.
-
--try: # python >= 3.10
-- from collections.abc import Mapping
-- from collections import UserString
--except ImportError: # python 2x
-- from collections import Mapping, UserString
--
-+from collections import Mapping, UserString
- from io import IOBase
-
- from .platform import RERAISED_EXCEPTIONS
diff --git a/patches/python_310_migration.sh b/patches/python_310_migration.sh
deleted file mode 100755
index b522caa..0000000
--- a/patches/python_310_migration.sh
+++ /dev/null
@@ -1,113 +0,0 @@
-#!/bin/bash
-# -----------------------------------------------------------------------
-# Copyright 2022-2024 Open Networking Foundation (ONF) and the ONF Contributors
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-# -----------------------------------------------------------------------
-
-##-------------------##
-##---] GLOBALS [---##
-##-------------------##
-set -euo pipefail
-
-## -----------------------------------------------------------------------
-## Intent: Display script documentation.
-## -----------------------------------------------------------------------
-function show_help()
-{
- cat <<EOH
-Usage: $0
- apply Patch virtualenv python modules by version (3.10+).
- backup Create a tarball for work-in-progress.
- gather Display a list of potential source files to patch.
-
- --venv Installed venv directory to patch (override default)
- --help This message
-
-See Also
- patches/README.md Howto create a patch file.
-
-EOH
- exit 0
-}
-
-##----------------##
-##---] MAIN [---##
-##----------------##
-declare dst='.venv' # "vst_venv"
-declare src="staging"
-declare pat="patches"
-
-## -----------------------
-## Slurp available patches
-## -----------------------
-pushd "$pat" >/dev/null
-readarray -t fyls < <(find . -name 'patch' -print)
-popd >/dev/null
-
-if [ $# -eq 0 ]; then set -- apply; fi
-
-while [ $# -gt 0 ]; do
- opt="$1"; shift
- case "$opt" in
-
- -*help) show_help ;;
- -*venv) dst="$1"; shift ;;
-
- apply)
- pushd "$dst" >/dev/null || { echo "pushd $dst failed"; exit 1; }
- for fyl in "${fyls[@]}";
- do
- path="${fyl%/*}"
-
- # Conditional install, jenkins may not support interpreter yet.
- if [ ! -e "$path" ]; then
- echo "[SKIP] $path"
- continue
- fi
-
- echo "[APPLY] $path"
- patch -R -p1 < "../$pat/${path}/patch"
- done
- popd >/dev/null || { echo "popd $dst failed"; exit 1; }
- ;;
-
- backup)
- mkdir ~/backups
- pushd "$src" || { echo "pushd $dst failed"; exit 1; }
- tar czvf ~/backups/vault."$(date '+%Y%m%d%H%M%S')" "${fyls[@]}"
- popd || { echo "popd $dst failed"; exit 1; }
- ;;
-
- gather)
- for fyl in "${fyls[@]}";
- do
- patchDir="$pat/$fyl"
- mkdir -p "$patchDir"
- diff -Naur "$src/$fyl" "$dst/$fyl" | tee "$pat/$fyl/patch"
- done
- find "$pat" -print
- ;;
-
- help) show_help ;;
-
- *)
- echo "ERROR: Unknown action [$opt]"
- exit 1
- ;;
- esac
-
- echo
-done
-
-# [EOF]
diff --git a/requirements.txt b/requirements.txt
index 1f0dfaf..4223aa6 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -20,24 +20,20 @@
virtualenv
-flake8==3.8.2
-pexpect==4.8.0
-pylint==2.5.2
-yamllint==1.23.0
+flake8
+pexpect
+pylint
+yamllint
# -----------------------------------------------------------------------
# https://pypi.org/project/robotframework/#history
# -----------------------------------------------------------------------
-robotframework==3.1.2 # 2019-05-24
-# robotframework==6.1.1 # 2019-05-24
-robotframework-kafkalibrary==0.0.3
-robotframework-lint==1.0
-robotframework-requests==0.7.0
-robotframework-sshlibrary==3.8.0
-
-# replace when we can use upstream (needs python 3.6)
-git+https://github.com/zdw/robotframework-importresource@b81b87aabaee0594e966687b41e3674b866f28ee
-cord-robot==2.1.10
+robotframework
+robotframework-kafkalibrary
+robotframework-lint
+robotframework-requests
+robotframework-sshlibrary
+cord-robot
# -----------------------------------------------------------------------
# https://pypi.org/project/robotframework-tidy/#history
@@ -50,12 +46,12 @@
# -----------------------------------------------------------------------
# robotframework-robocop
-matplotlib==3.3.4
-requests==2.24.0
+matplotlib
+requests
grpc-robot>=2.9.3
kafka-robot>=2.3.2
voltha-protos>=4.2.0
-protobuf>=3.15.7,<3.20.0
+protobuf
protobuf3-to-dict>=0.1.5
device-management-interface>=1.2.1