From e404aa545cd3a3f4db0d40c0f74d353ea16cb5d8 Mon Sep 17 00:00:00 2001 From: Daniel Pawlik Date: Tue, 14 Oct 2025 11:46:15 +0200 Subject: [PATCH] Remove requirements upper limitation and start using upper constraints The some of the flake8 requirement can not be satisfied, so the test results is raising an error: Traceback (most recent call last): File "/ci-log-processing/.tox/pep8/bin/flake8", line 7, in sys.exit(main()) ^^^^^^ File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/main/cli.py", line 22, in main app.run(argv) File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 363, in run self._run(argv) File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 350, in _run self.initialize(argv) File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 330, in initialize self.find_plugins(config_finder) File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/main/application.py", line 153, in find_plugins self.check_plugins = plugin_manager.Checkers(local_plugins.extension) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/plugins/manager.py", line 356, in __init__ self.manager = PluginManager( ^^^^^^^^^^^^^^ File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/plugins/manager.py", line 238, in __init__ self._load_entrypoint_plugins() File "/ci-log-processing/.tox/pep8/lib/python3.12/site-packages/flake8/plugins/manager.py", line 254, in _load_entrypoint_plugins eps = importlib_metadata.entry_points().get(self.namespace, ()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'EntryPoints' object has no attribute 'get' After updating packages to newer version, flake8 seems to be working normally. Co-Authored-By: Slawek Kaplonski Change-Id: I27d36a21fa57619d3fd41f01b83f91990708089b Signed-off-by: Daniel Pawlik --- requirements.txt | 6 +++--- test-requirements.txt | 12 ++++++------ tox.ini | 6 ++++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/requirements.txt b/requirements.txt index fa0fa5a..aefef50 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ -pbr>=1.6 # Apache-2.0 -requests<2.27 # Apache-2.0 -PyYAML<6.1 # MIT +pbr>=1.6 # Apache-2.0 +requests>=2.32.3 # Apache-2.0 +PyYAML # MIT tenacity opensearch-py<=1.0.0 # Apache-2.0 ruamel.yaml diff --git a/test-requirements.txt b/test-requirements.txt index 03898b9..007b1ab 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,6 +1,6 @@ -hacking<4.1.1 # Apache-2.0 -flake8<3.8.5 -pep8<1.7.2 -testtools<2.5.1 # MIT -stestr<3.3 # Apache-2.0 -yamllint<1.26.4 # GPLv3 +hacking # Apache-2.0 +flake8 +pep8 +testtools # MIT +stestr # Apache-2.0 +yamllint # GPLv3 diff --git a/tox.ini b/tox.ini index d753881..e8bfa01 100644 --- a/tox.ini +++ b/tox.ini @@ -3,8 +3,10 @@ envlist = linters,docs,py3 [testenv] usedevelop = True -deps = -r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt +deps = + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/requirements.txt + -r{toxinidir}/test-requirements.txt allowlist_externals = find commands = find . -type f -name "*.pyc" -delete