From bcdc4168166f9a46897d86f63482c6ba64435852 Mon Sep 17 00:00:00 2001 From: Muhammad Faraz Maqsood Date: Fri, 19 Apr 2024 19:40:33 +0500 Subject: [PATCH] fix!: remove celery, backports-zoneinfo conflicts backports-zoneinfo comes by-default in newer versions of python it gives error while building wheel with python>=3.9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 100.5 Downloading zope.interface-6.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (255 kB) 101.6 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 255.4/255.4 kB 223.8 kB/s eta 0:00:00 102.2 Building wheels for collected packages: backports-zoneinfo 102.2 Building wheel for backports-zoneinfo (pyproject.toml): started 102.8 Building wheel for backports-zoneinfo (pyproject.toml): finished with status 'error' 102.8 error: subprocess-exited-with-error 102.8 102.8 × Building wheel for backports-zoneinfo (pyproject.toml) did not run successfully. 102.8 │ exit code: 1 102.8 ╰─> [41 lines of output] 102.8 running bdist_wheel 102.8 running build 102.8 running build_py 102.8 creating build 102.8 creating build/lib.linux-x86_64-cpython-312 102.8 creating build/lib.linux-x86_64-cpython-312/backports 102.8 copying src/backports/__init__.py -> build/lib.linux-x86_64-cpython-312/backports 102.8 creating build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 copying src/backports/zoneinfo/_common.py -> build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 copying src/backports/zoneinfo/_version.py -> build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 copying src/backports/zoneinfo/__init__.py -> build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 running egg_info 102.8 writing src/backports.zoneinfo.egg-info/PKG-INFO 102.8 writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt 102.8 writing requirements to src/backports.zoneinfo.egg-info/requires.txt 102.8 writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt 102.8 reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt' 102.8 reading manifest template 'MANIFEST.in' 102.8 warning: no files found matching '*.png' under directory 'docs' 102.8 warning: no files found matching '*.svg' under directory 'docs' 102.8 no previously-included directories found matching 'docs/_build' 102.8 no previously-included directories found matching 'docs/_output' 102.8 adding license file 'LICENSE' 102.8 adding license file 'licenses/LICENSE_APACHE' 102.8 writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt' 102.8 copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 copying src/backports/zoneinfo/py.typed -> build/lib.linux-x86_64-cpython-312/backports/zoneinfo 102.8 running build_ext 102.8 building 'backports.zoneinfo._czoneinfo' extension 102.8 creating build/temp.linux-x86_64-cpython-312 102.8 creating build/temp.linux-x86_64-cpython-312/lib 102.8 gcc -pthread -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/openedx/venv/include -I/opt/pyenv/versions/3.12.2/include/python3.12 -c lib/zoneinfo_module.c -o build/temp.linux-x86_64-cpython-312/lib/zoneinfo_module.o -std=c99 102.8 lib/zoneinfo_module.c: In function ‘zoneinfo_fromutc’: 102.8 lib/zoneinfo_module.c:600:19: error: ‘_PyLong_One’ undeclared (first use in this function); did you mean ‘_PyLong_New’? 102.8 600 | one = _PyLong_One; 102.8 | ^~~~~~~~~~~ 102.8 | _PyLong_New 102.8 lib/zoneinfo_module.c:600:19: note: each undeclared identifier is reported only once for each function it appears in 102.8 error: command '/usr/bin/gcc' failed with exit code 1 102.8 [end of output] 102.8 102.8 note: This error originates from a subprocess, and is likely not a problem with pip. 102.8 ERROR: Failed building wheel for backports-zoneinfo 102.8 Failed to build backports-zoneinfo 102.8 ERROR: Could not build wheels for backports-zoneinfo, which is required to install pyproject.toml-based projects ------ Dockerfile:83 -------------------- 81 | 82 | # python requirements 83 | >>> RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install -r requirements.txt 84 | # https://pypi.org/project/uWSGI/ 85 | RUN --mount=type=cache,target=/openedx/.cache/pip,sharing=shared,uid=${APP_USER_ID} pip install uwsgi==2.0.24 -------------------- ERROR: failed to solve: process "/bin/sh -c pip install -r requirements.txt" did not complete successfully: exit code: 1 --- requirements/base.txt | 3 ++- requirements/constraints.txt | 5 +++-- requirements/production.txt | 3 ++- requirements/test.txt | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 83249e1..d25ec9c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -10,8 +10,9 @@ asgiref==3.8.1 # via django async-timeout==4.0.3 # via redis -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # celery # kombu billiard==4.2.0 diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 575cfa1..900d76c 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -17,5 +17,6 @@ Django<3.3 # This file contains all common constraints for edx-repos -c common_constraints.txt -# # breaking changes in CLI and dropped support for python3.5 in celery 5.0 -# celery<6.0.0 +# backports-zoneinfo comes by-default in newer versions of python +# it gives error while building wheel with python>=3.9 +backports.zoneinfo ; python_version < "3.9" diff --git a/requirements/production.txt b/requirements/production.txt index 22e5d15..5105632 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -16,8 +16,9 @@ async-timeout==4.0.3 # via # -r requirements/base.txt # redis -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # celery # kombu diff --git a/requirements/test.txt b/requirements/test.txt index 5b1a130..5ace49c 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -21,8 +21,9 @@ async-timeout==4.0.3 # via # -r requirements/base.txt # redis -backports-zoneinfo[tzdata]==0.2.1 +backports-zoneinfo[tzdata]==0.2.1 ; python_version < "3.9" # via + # -c requirements/constraints.txt # -r requirements/base.txt # celery # kombu