From 26f5678d4f58bfa18c389cd05ecdc454deb3024f Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Fri, 12 Aug 2022 13:06:25 +0800 Subject: [PATCH] mgr/dashboard: bump up more-itertools before this change, more-itertools tries to import Sequence from collections, this leads us to failures like: ``` Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details __import__(pkg_name) File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/__init__.py", line 9, in import cherrypy File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/__init__.py", line 76, in from . import _cprequest, _cpserver, _cptree, _cplogging, _cpconfig File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/_cprequest.py", line 11, in from cherrypy import _cpreqbody File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cherrypy/_cpreqbody.py", line 135, in import cheroot.server File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cheroot/server.py", line 96, in from .workers import threadpool File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/cheroot/workers/threadpool.py", line 20, in from jaraco.functools import pass_none File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/jaraco/functools.py", line 8, in import more_itertools File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/more_itertools/__init__.py", line 1, in from more_itertools.more import * # noqa File "/home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/lib/python3.10/site-packages/more_itertools/more.py", line 3, in from collections import Counter, defaultdict, deque, Sequence ImportError: cannot import name 'Sequence' from 'collections' (/usr/lib/python3.10/collections/__init__.py) ERROR: InvocationError for command /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/bin/python3 -m dashboard.controllers.docs /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/dashboard/.tox/openapi-check/tmp/openapi.yaml (exited with code 1) ``` after this change, more-itertools is pin'ed at the latest stable at the time of writing, which includes the fixes including https://github.com/more-itertools/more-itertools/commit/30a861bc5a4f53a9ba73923c9048a3632a0f9d18 . please note, more-itertools dropped python3.3 support. but neither do us support this python version, so we should be safe. Signed-off-by: Kefu Chai --- src/pybind/mgr/dashboard/constraints.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind/mgr/dashboard/constraints.txt b/src/pybind/mgr/dashboard/constraints.txt index 75af032326c09..00e1aad0164f9 100644 --- a/src/pybind/mgr/dashboard/constraints.txt +++ b/src/pybind/mgr/dashboard/constraints.txt @@ -1,5 +1,5 @@ CherryPy==13.1.0 -more-itertools==4.1.0 +more-itertools==8.14.0 PyJWT==2.0.1 bcrypt==3.1.4 python3-saml==1.4.1 -- 2.39.5