-
Notifications
You must be signed in to change notification settings - Fork 2.1k
py3.10 support + multi-version requirements compiler #6613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
62ce67c
to
3234603
Compare
3234603
to
cf92157
Compare
BackgroundAs discussed a few months ago our strategy is:
Theoretically, we can squash requirements that are identical for all the python versions and remove python version constraints for such items. But, if this file will be generated automatically, I don't see a real reason to make the requirement-builder more complex in order to get laconic output. But I don't mind if someone implements such a change. RequirementsThe person who wants to compile requirements locally has to install target python versions via Pyenv. I.e, install pyenv itself and then run pyenv install 3.7.12
pyenv install 3.8.12
pyenv install 3.9.10
pyenv install 3.10.2 SolutionRequirements can be compiles via the new script bin/compile-requirements.sh It requires multiple
ℹ️ It may be not obvious, but all the versions provided via Internally script will create a virtual environment for every python version inside BonusI haven't given up yet on the idea to automatize our release workflow 🤖. There is a new "Compile requirements" action inside this PR. It runs on This action installs a number of python versions using pyenv, compiles requirements, and commits changes to the repo. After that, it should push changes to the main repository, but in order to enable this step, we have to configure the If building requirements locally(installing pyenv) will not work for people, we can start using this action instead. In the future, we can create some sort of graph TD
A[Prepare Release] -->|Invoke| B(Compile requirements) --> B2[commit]
A --> |Invoke| C(Update translations) --> C2[commit]
A --> |Invoke| D(Frontend build) --> D2[commit]
B2 --> |push| R{repo}
C2 --> |push| R{repo}
D2 --> |push| R{repo}
R --> |invoke| P[Publish release]
|
Another option: rely on a different tool to handle dependencies, which takes Python version into account, like pdm. |
Latest Ubuntu 22.04 (launched today) comes with python 3.10 by default. This might cause new developers to struggle a little bit installing CKAN in their working machines (if the have Ubuntu updated): https://discourse.ubuntu.com/t/jammy-jellyfish-release-notes/24668 To have it running (as @smotornyuk suggested) simply remove and re-compile the Regarding this PRIt's known that I'm up to simplify more than to support more than we can handle. So:
I'm not sure at this point if this kind of solution adds to the maintainability of CKAN or either makes it more difficult, so I'm open to change my mind and debate this. |
Extra note: No longer relevant. |
Hi folks, as CKAN 2.10 release is imminent, is the plan to still recommend Ubuntu 20.04 LTS with Python 3.8? https://docs.ckan.org/en/latest/maintaining/installing/install-from-source.html |
No, this should be updated to drop 18.04 and add 22.04, we can do a quick review of the requirements in the docs before releasing 2.10 cc @kowh-ai BTW messytables was dropped from xloader should probably work on Python 3.10 |
FYI: Attempted to pip install CKAN (master) on a new Ubuntu 22.04 distribution which includes Python 3.10 by default - the Beaker install had problems with the distutils library that is part of Python 3.10. Installed Python 3.9 and recreated the Python virtual environment. CKAN installed fine along with other components (PostgreSQL, Solr, Redis)... https://github.com/ckan/ckan/wiki/CKAN-2.10-(aka-master-@1-Dec-2022)-install-on-Ubuntu-22.04 |
@kowh-ai do you have the errors you found while installing in Py 3.10? Maybe we can update the CKAN 2.10 requirements to correct them |
running install_egg_info note: This error originates from a subprocess, and is likely not a problem with pip. × Encountered error while trying to install package. note: This is an issue with the package mentioned above, not pip. |
I wonder if adding |
It's difficult to discuss this without some reproducible environment to run tests, so I proposed: #7261 |
Beaker installs in a bare python 3.10 venv:
And then with wheel installed:
|
I'm doing some tests using the The error @kowh-ai seems to be related with the version of setuptools. Even when it is the beaker package failing, the error comes from setuptools:
So I tried deprecating the setuptools requirement in the pipeline and it looks like it is working properly: ckan/ckan-python-monitor@f5491a9. Before that, the pipeline was failing due that I was forcing to run it with setuptools==44.1.0: https://github.com/ckan/ckan-python-monitor/actions/runs/3879379146/jobs/6616503320 Dropping that support seems to work for Python 3.10. |
I just tried to install CKAN3.10 with Python3.10.10 and ran into this error: (ModuleNotFoundError: No module named 'distutils.command.bdist_wininst') (default) root@ckan-2-10:~# pip install -e git+https://github.com/ckan/ckan.git@ckan-2.10.0#egg=ckan[requirements]
DEPRECATION: git+https://github.com/ckan/ckan.git@ckan-2.10.0#egg=ckan[requirements] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
Obtaining ckan[requirements] from git+https://github.com/ckan/ckan.git@ckan-2.10.0#egg=ckan[requirements]
Updating /usr/lib/ckan/default/src/ckan clone (to revision ckan-2.10.0)
Running command git fetch -q --tags
Running command git reset --hard -q 70bec6611003b96ec7a02abb9605afdfb0964ad9
Installing build dependencies ... done
Checking if build backend supports build_editable ... done
Getting requirements to build editable ... done
Preparing editable metadata (pyproject.toml) ... done
Requirement already satisfied: setuptools>=44.1.0 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (44.1.0)
Collecting idna==3.3
Using cached idna-3.3-py3-none-any.whl (61 kB)
Requirement already satisfied: polib==1.1.1 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (1.1.1)
Collecting click==8.1.3
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting flask-wtf==1.0.1
Using cached Flask_WTF-1.0.1-py3-none-any.whl (12 kB)
Collecting rq==1.11.0
Using cached rq-1.11.0-py2.py3-none-any.whl (70 kB)
Collecting importlib-metadata==4.11.3
Using cached importlib_metadata-4.11.3-py3-none-any.whl (18 kB)
Collecting six==1.16.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pyjwt==2.4.0
Using cached PyJWT-2.4.0-py3-none-any.whl (18 kB)
Requirement already satisfied: pytz==2021.3 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (2021.3)
Collecting requests==2.28.1
Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting zipp==3.7.0
Using cached zipp-3.7.0-py3-none-any.whl (5.3 kB)
Collecting pysolr==3.9.0
Using cached pysolr-3.9.0.tar.gz (55 kB)
Preparing metadata (setup.py) ... done
Collecting sqlalchemy2-stubs==0.0.2a27
Using cached sqlalchemy2_stubs-0.0.2a27-py3-none-any.whl (191 kB)
Collecting alembic==1.8.1
Using cached alembic-1.8.1-py3-none-any.whl (209 kB)
Collecting werkzeug[watchdog]==2.0.3
Using cached Werkzeug-2.0.3-py3-none-any.whl (289 kB)
Collecting zope-interface==5.4.0
Using cached zope.interface-5.4.0.tar.gz (249 kB)
Preparing metadata (setup.py) ... done
Collecting flask-multistatic==1.0
Using cached flask-multistatic-1.0.tar.gz (15 kB)
Preparing metadata (setup.py) ... done
Collecting packaging==21.3
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting blinker==1.5
Using cached blinker-1.5-py2.py3-none-any.whl (12 kB)
Collecting wtforms==3.0.1
Using cached WTForms-3.0.1-py3-none-any.whl (136 kB)
Collecting urllib3==1.26.9
Using cached urllib3-1.26.9-py2.py3-none-any.whl (138 kB)
Collecting mako==1.2.2
Using cached Mako-1.2.2-py3-none-any.whl (78 kB)
Collecting typing-extensions==4.3.0
Using cached typing_extensions-4.3.0-py3-none-any.whl (25 kB)
Collecting watchdog==2.1.6
Using cached watchdog-2.1.6-py3-none-manylinux2014_x86_64.whl (76 kB)
Collecting bleach==5.0.1
Using cached bleach-5.0.1-py3-none-any.whl (160 kB)
Collecting tzlocal==4.2
Using cached tzlocal-4.2-py3-none-any.whl (19 kB)
Requirement already satisfied: webassets==2.0 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (2.0)
Collecting sqlalchemy[mypy]==1.4.41
Using cached SQLAlchemy-1.4.41-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB)
Collecting python-magic==0.4.27
Using cached python_magic-0.4.27-py2.py3-none-any.whl (13 kB)
Collecting pytz-deprecation-shim==0.1.0.post0
Using cached pytz_deprecation_shim-0.1.0.post0-py2.py3-none-any.whl (15 kB)
Requirement already satisfied: mypy-extensions==0.4.3 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (0.4.3)
Collecting flask-login==0.6.1
Using cached Flask_Login-0.6.1-py3-none-any.whl (17 kB)
Collecting greenlet==1.1.2
Using cached greenlet-1.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (155 kB)
Collecting flask==2.0.3
Using cached Flask-2.0.3-py3-none-any.whl (95 kB)
Collecting itsdangerous==2.1.1
Using cached itsdangerous-2.1.1-py3-none-any.whl (15 kB)
Requirement already satisfied: webencodings==0.5.1 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (0.5.1)
Requirement already satisfied: nose==1.3.7 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (1.3.7)
Collecting pyparsing==3.0.7
Using cached pyparsing-3.0.7-py3-none-any.whl (98 kB)
Collecting tzdata==2022.1
Using cached tzdata-2022.1-py2.py3-none-any.whl (339 kB)
Collecting python-dateutil==2.8.2
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting tomli==2.0.1
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting markupsafe==2.1.1
Using cached MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting babel==2.10.3
Using cached Babel-2.10.3-py3-none-any.whl (9.5 MB)
Collecting pyyaml==6.0
Using cached PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
Collecting deprecated==1.2.13
Using cached Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Collecting psycopg2==2.9.3
Using cached psycopg2-2.9.3.tar.gz (380 kB)
Preparing metadata (setup.py) ... done
Collecting pyutilib==6.0.0
Using cached PyUtilib-6.0.0-py2.py3-none-any.whl (254 kB)
Collecting redis==4.1.4
Using cached redis-4.1.4-py3-none-any.whl (175 kB)
Requirement already satisfied: beaker==1.11.0 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (1.11.0)
Collecting simplejson==3.17.6
Using cached simplejson-3.17.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (137 kB)
Collecting wrapt==1.14.0
Using cached wrapt-1.14.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
Collecting jinja2==3.1.2
Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting lxml==4.9.1
Using cached lxml-4.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)
Collecting markdown==3.4.1
Using cached Markdown-3.4.1-py3-none-any.whl (93 kB)
Collecting dominate==2.7.0
Using cached dominate-2.7.0-py2.py3-none-any.whl (29 kB)
Collecting feedgen==0.9.0
Using cached feedgen-0.9.0.tar.gz (217 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: certifi==2021.10.8 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (2021.10.8)
Collecting mypy==0.971
Using cached mypy-0.971-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (17.6 MB)
Collecting charset-normalizer==2.0.12
Using cached charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Requirement already satisfied: passlib==1.7.4 in /usr/lib/ckan/default/lib/python3.10/site-packages (from ckan[requirements]) (1.7.4)
Collecting sqlparse==0.4.2
Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting flask-babel==1.0.0
Using cached Flask_Babel-1.0.0-py3-none-any.whl (9.5 kB)
Collecting SQLAlchemy>=1.3.0
Using cached SQLAlchemy-2.0.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB)
Collecting Werkzeug>=2.0
Using cached Werkzeug-2.2.3-py3-none-any.whl (233 kB)
Building wheels for collected packages: ckan
Building editable for ckan (pyproject.toml) ... done
Created wheel for ckan: filename=ckan-2.10.0-0.editable-py3-none-any.whl size=9703 sha256=a6c2685aa610b608a46b46ab2467d74575eff76f304456c9d96545094854c924
Stored in directory: /tmp/pip-ephem-wheel-cache-ye1d6qxv/wheels/e9/14/f5/76e95232059bb436e54c35a3393ea1cf97c71b7a8fa07de03c
Successfully built ckan
Installing collected packages: zope-interface, zipp, wrapt, werkzeug, watchdog, urllib3, tzdata, typing-extensions, tomli, sqlparse, six, simplejson, pyyaml, python-magic, pyparsing, pyjwt, psycopg2, markupsafe, markdown, lxml, itsdangerous, idna, greenlet, dominate, click, ckan, charset-normalizer, blinker, babel, wtforms, sqlalchemy2-stubs, sqlalchemy, requests, pyutilib, pytz-deprecation-shim, python-dateutil, packaging, mypy, mako, jinja2, importlib-metadata, deprecated, bleach, tzlocal, redis, pysolr, flask, feedgen, alembic, rq, flask-wtf, flask-multistatic, flask-login, flask-babel
DEPRECATION: zope-interface is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for zope-interface ... error
error: subprocess-exited-with-error
× Running setup.py install for zope-interface did not run successfully.
│ exit code: 1
╰─> [228 lines of output]
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/zope
copying src/zope/__init__.py -> build/lib.linux-x86_64-3.10/zope
creating build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/document.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/registry.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/_flatten.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/interfaces.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/ro.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/interface.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/exceptions.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/advice.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/__init__.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/_compat.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/declarations.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/verify.py -> build/lib.linux-x86_64-3.10/zope/interface
copying src/zope/interface/adapter.py -> build/lib.linux-x86_64-3.10/zope/interface
creating build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/numbers.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/io.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/collections.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/interfaces.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/builtins.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/mapping.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/sequence.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/__init__.py -> build/lib.linux-x86_64-3.10/zope/interface/common
copying src/zope/interface/common/idatetime.py -> build/lib.linux-x86_64-3.10/zope/interface/common
creating build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_advice.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_sorting.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_exceptions.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/advisory_testing.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_verify.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_registry.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/dummy.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_element.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_document.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/m1.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_odd_declarations.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/idummy.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_declarations.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_interface.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_adapter.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/__init__.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/odd.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_ro.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
copying src/zope/interface/tests/test_interfaces.py -> build/lib.linux-x86_64-3.10/zope/interface/tests
creating build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/test_import_interfaces.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/test_numbers.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/test_builtins.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/test_collections.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/test_idatetime.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/basemapping.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/test_io.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
copying src/zope/interface/common/tests/__init__.py -> build/lib.linux-x86_64-3.10/zope/interface/common/tests
running egg_info
writing src/zope.interface.egg-info/PKG-INFO
writing dependency_links to src/zope.interface.egg-info/dependency_links.txt
writing namespace_packages to src/zope.interface.egg-info/namespace_packages.txt
writing requirements to src/zope.interface.egg-info/requires.txt
writing top-level names to src/zope.interface.egg-info/top_level.txt
reading manifest file 'src/zope.interface.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
warning: no previously-included files matching 'coverage.xml' found anywhere in distribution
warning: no previously-included files matching 'appveyor.yml' found anywhere in distribution
no previously-included directories found matching 'docs/_build'
no previously-included directories found matching 'benchmarks'
writing manifest file 'src/zope.interface.egg-info/SOURCES.txt'
copying src/zope/interface/_zope_interface_coptimizations.c -> build/lib.linux-x86_64-3.10/zope/interface
running build_ext
building 'zope.interface._zope_interface_coptimizations' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/src
creating build/temp.linux-x86_64-3.10/src/zope
creating build/temp.linux-x86_64-3.10/src/zope/interface
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/lib/ckan/default/include -I/usr/local/include/python3.10 -c src/zope/interface/_zope_interface_coptimizations.c -o build/temp.linux-x86_64-3.10/src/zope/interface/_zope_interface_coptimizations.o
gcc -pthread -shared build/temp.linux-x86_64-3.10/src/zope/interface/_zope_interface_coptimizations.o -o build/lib.linux-x86_64-3.10/zope/interface/_zope_interface_coptimizations.cpython-310-x86_64-linux-gnu.so
running install_lib
Skipping installation of /usr/lib/ckan/default/lib/python3.10/site-packages/zope/__init__.py (namespace package)
copying zope/interface/document.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/registry.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/_flatten.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/interfaces.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/ro.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/interface.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/exceptions.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/advice.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/__init__.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/_compat.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/declarations.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/_zope_interface_coptimizations.c -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/verify.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/adapter.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/_zope_interface_coptimizations.cpython-310-x86_64-linux-gnu.so -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface
copying zope/interface/common/numbers.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/io.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/collections.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/interfaces.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/builtins.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/mapping.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/sequence.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/__init__.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/idatetime.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common
copying zope/interface/common/tests/test_import_interfaces.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/common/tests/test_numbers.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/common/tests/test_builtins.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/common/tests/test_collections.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/common/tests/test_idatetime.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/common/tests/basemapping.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/common/tests/test_io.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/common/tests/__init__.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests
copying zope/interface/tests/test_advice.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_sorting.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_exceptions.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/advisory_testing.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_verify.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_registry.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/dummy.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_element.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_document.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/m1.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_odd_declarations.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/idummy.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_declarations.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_interface.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_adapter.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/__init__.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/odd.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_ro.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
copying zope/interface/tests/test_interfaces.py -> /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/document.py to document.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/registry.py to registry.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/_flatten.py to _flatten.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/interfaces.py to interfaces.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/ro.py to ro.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/interface.py to interface.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/exceptions.py to exceptions.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/advice.py to advice.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/_compat.py to _compat.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/declarations.py to declarations.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/verify.py to verify.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/adapter.py to adapter.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/numbers.py to numbers.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/io.py to io.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/collections.py to collections.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/interfaces.py to interfaces.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/builtins.py to builtins.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/mapping.py to mapping.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/sequence.py to sequence.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/idatetime.py to idatetime.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/test_import_interfaces.py to test_import_interfaces.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/test_numbers.py to test_numbers.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/test_builtins.py to test_builtins.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/test_collections.py to test_collections.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/test_idatetime.py to test_idatetime.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/basemapping.py to basemapping.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/test_io.py to test_io.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/common/tests/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_advice.py to test_advice.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_sorting.py to test_sorting.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_exceptions.py to test_exceptions.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/advisory_testing.py to advisory_testing.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_verify.py to test_verify.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_registry.py to test_registry.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/dummy.py to dummy.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_element.py to test_element.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_document.py to test_document.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/m1.py to m1.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_odd_declarations.py to test_odd_declarations.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/idummy.py to idummy.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_declarations.py to test_declarations.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_interface.py to test_interface.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_adapter.py to test_adapter.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/__init__.py to __init__.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/odd.py to odd.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_ro.py to test_ro.cpython-310.pyc
byte-compiling /usr/lib/ckan/default/lib/python3.10/site-packages/zope/interface/tests/test_interfaces.py to test_interfaces.cpython-310.pyc
running install_egg_info
Copying src/zope.interface.egg-info to /usr/lib/ckan/default/lib/python3.10/site-packages/zope.interface-5.4.0-py3.10.egg-info
Installing /usr/lib/ckan/default/lib/python3.10/site-packages/zope.interface-5.4.0-py3.10-nspkg.pth
running install_scripts
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-ep3p2gp2/zope-interface_bd0b7fdbb7e242fc9d47b58e2058d561/setup.py", line 102, in <module>
setup(name='zope.interface',
File "/usr/lib/ckan/default/lib/python3.10/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/local/lib/python3.10/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/local/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/usr/local/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/ckan/default/lib/python3.10/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/usr/local/lib/python3.10/distutils/command/install.py", line 580, in run
self.run_command(cmd_name)
File "/usr/local/lib/python3.10/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/local/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/usr/lib/ckan/default/lib/python3.10/site-packages/setuptools/command/install_scripts.py", line 35, in run
bw_cmd = self.get_finalized_command("bdist_wininst")
File "/usr/local/lib/python3.10/distutils/cmd.py", line 298, in get_finalized_command
cmd_obj = self.distribution.get_command_obj(command, create)
File "/usr/local/lib/python3.10/distutils/dist.py", line 857, in get_command_obj
klass = self.get_command_class(command)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/setuptools/dist.py", line 834, in get_command_class
self.cmdclass[command] = cmdclass = ep.load()
File "/usr/lib/ckan/default/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2443, in load
return self.resolve()
File "/usr/lib/ckan/default/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2449, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/ckan/default/lib/python3.10/site-packages/setuptools/command/bdist_wininst.py", line 1, in <module>
import distutils.command.bdist_wininst as orig
ModuleNotFoundError: No module named 'distutils.command.bdist_wininst'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> zope-interface
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure. I can confirm that that upgrading setuptools to the latest version (setuptools-67.3.2) fixed this issue. |
This can probably be closed based on #7886 |
CKAN cannot be installed on py3.10 because of:
collections.abc
The first issue is pretty straightforward. But the second one is a bit tricky.
If
requirements.txt
compiled using py3.8(or older version), it containsbackports.zoneinfo==0.2.1
. This library is not required(and cannot be compiled) on py3.10. Theoretically, it should be compiled tobackports.zoneinfo==0.2.1; python_version < "3.9"
, butpip-tools
does not support python or system constraints. This suffix can be added manually, but we'll definitely forget to add it in the future and it will break py3.10 once again.Another option is to build
requirements.txt
using the latest python version(that's what I've done in this PR). In this way, we won't havebackports.zoneinfo
and any other packages that are required only for py<3.10. These packages are still installed because they are listed in thesetup.py
of some other explicitly installed packages, but we can get a slightly different version on different builds because these requirements(usually) has their version unpinnedAny thoughts about a better solution? Given the fact that pip-tools ignore python constraints, we already control only build with the same python's version that was used when
requirements.txt
was compiled. So the only way to ensure that all the packages use exact versions of requirements is to buildpy3.7-requirements.txt
,py3.8-requirements.txt
, etc. But I really dislike this option