From 9086eb3fbfc5756f1394186ebb53939937a39782 Mon Sep 17 00:00:00 2001 From: Alexey Sedlyarsky Date: Wed, 19 Jul 2023 13:58:38 +0200 Subject: [PATCH 1/4] #49: Back to legacy pip dependency resolver --- Dockerfile | 2 +- install_dependencies.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 install_dependencies.py diff --git a/Dockerfile b/Dockerfile index fd14f13ef..064a7297f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN mkdir -p /code && \ RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -o wait_for_it.sh && chmod +x wait_for_it.sh COPY requirements.txt /tmp/requirements.txt RUN cd /code && virtualenv -p python3.9 --system-site-packages env && source env/bin/activate \ - && pip3 install -r /tmp/requirements.txt --no-cache-dir + && python3 install_dependencies.py COPY alws /code/alws COPY tests /code/tests WORKDIR /code diff --git a/install_dependencies.py b/install_dependencies.py new file mode 100644 index 000000000..7f14f097f --- /dev/null +++ b/install_dependencies.py @@ -0,0 +1,20 @@ +import subprocess +import pkg_resources + + +def run_legacy_pip(): + pip_version = pkg_resources.get_distribution("pip").version + major, minor, _ = map(int, pip_version.split('.')) + if major >= 20 and minor >= 3: + subprocess.check_call([ + "pip3", "install", "--use-deprecated=legacy-resolver", + "-r", "/tmp/requirements.txt", "--no-cache-dir" + ]) + else: + subprocess.check_call([ + "pip3", "install", "-r", "/tmp/requirements.txt", "--no-cache-dir" + ]) + + +if __name__ == "__main__": + run_legacy_pip() From 6fbe48a48327bfcbcf54f40a4f3cdc5582961527 Mon Sep 17 00:00:00 2001 From: Alexey Sedlyarsky Date: Wed, 19 Jul 2023 14:02:33 +0200 Subject: [PATCH 2/4] #49: Fix legacy pip dependency resolver --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 064a7297f..1b64de96a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,8 +8,9 @@ RUN mkdir -p /code && \ yum clean all RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -o wait_for_it.sh && chmod +x wait_for_it.sh COPY requirements.txt /tmp/requirements.txt +COPY install_dependencies.py /tmp/install_dependencies.py RUN cd /code && virtualenv -p python3.9 --system-site-packages env && source env/bin/activate \ - && python3 install_dependencies.py + && python3 /tmp/install_dependencies.py COPY alws /code/alws COPY tests /code/tests WORKDIR /code From d1fba1ca48d7fb65be4de4b702d194a83d1eb9e1 Mon Sep 17 00:00:00 2001 From: Alexey Sedlyarsky Date: Wed, 19 Jul 2023 14:11:27 +0200 Subject: [PATCH 3/4] #49: Fix legacy pip dependency resolver --- Dockerfile | 3 +-- install_dependencies.py | 20 -------------------- 2 files changed, 1 insertion(+), 22 deletions(-) delete mode 100644 install_dependencies.py diff --git a/Dockerfile b/Dockerfile index 1b64de96a..e4d3afaaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,9 +8,8 @@ RUN mkdir -p /code && \ yum clean all RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -o wait_for_it.sh && chmod +x wait_for_it.sh COPY requirements.txt /tmp/requirements.txt -COPY install_dependencies.py /tmp/install_dependencies.py RUN cd /code && virtualenv -p python3.9 --system-site-packages env && source env/bin/activate \ - && python3 /tmp/install_dependencies.py + && pip3 install --use-deprecated=legacy-resolver -r /tmp/requirements.txt --no-cache-dir COPY alws /code/alws COPY tests /code/tests WORKDIR /code diff --git a/install_dependencies.py b/install_dependencies.py deleted file mode 100644 index 7f14f097f..000000000 --- a/install_dependencies.py +++ /dev/null @@ -1,20 +0,0 @@ -import subprocess -import pkg_resources - - -def run_legacy_pip(): - pip_version = pkg_resources.get_distribution("pip").version - major, minor, _ = map(int, pip_version.split('.')) - if major >= 20 and minor >= 3: - subprocess.check_call([ - "pip3", "install", "--use-deprecated=legacy-resolver", - "-r", "/tmp/requirements.txt", "--no-cache-dir" - ]) - else: - subprocess.check_call([ - "pip3", "install", "-r", "/tmp/requirements.txt", "--no-cache-dir" - ]) - - -if __name__ == "__main__": - run_legacy_pip() From e41b078306c97897fc767e1a013ae81d2a2d6761 Mon Sep 17 00:00:00 2001 From: Alexey Sedlyarsky Date: Wed, 19 Jul 2023 19:07:53 +0200 Subject: [PATCH 4/4] #49: Solved pip dependencies for latest solver --- Dockerfile | 2 +- requirements.txt | 122 +++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 118 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e4d3afaaf..fd14f13ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN mkdir -p /code && \ RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -o wait_for_it.sh && chmod +x wait_for_it.sh COPY requirements.txt /tmp/requirements.txt RUN cd /code && virtualenv -p python3.9 --system-site-packages env && source env/bin/activate \ - && pip3 install --use-deprecated=legacy-resolver -r /tmp/requirements.txt --no-cache-dir + && pip3 install -r /tmp/requirements.txt --no-cache-dir COPY alws /code/alws COPY tests /code/tests WORKDIR /code diff --git a/requirements.txt b/requirements.txt index 6677f629f..88f701bc4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,16 @@ -fastapi[all]==0.95.1 -fastapi-users[all]==10.4.1 +fastapi==0.95.1 +fastapi-users==10.4.1 +fastapi-users-db-sqlalchemy==4.0.5 uvicorn==0.21.1 asyncpg==0.27.0 psycopg2-binary==2.9.6 pydantic==1.10.8 SQLAlchemy==1.4.46 aiohttp==3.8.4 +aiohttp-retry==2.8.3 aiofiles==23.1.0 aioredis==2.0.1 +aiosignal==1.3.1 alembic==1.11.1 pytest==7.3.1 pytest-cov==4.0.0 @@ -15,16 +18,125 @@ jmespath==1.0.1 PyYAML==6.0 lxml==4.9.2 syncer==1.3.0 -dramatiq[rabbitmq, watch] +dramatiq[rabbitmq, watch]==1.14.2 python-multipart==0.0.6 plumbum==1.8.1 tap.py==3.1 -aiohttp_retry==2.8.3 jinja2==3.1.2 pgpy==0.6.0 markdown==3.4.3 -fastapi-users-db-sqlalchemy==4.0.5 httpx-oauth==0.11.2 sentry-sdk[fastapi]==1.28.1 # requires FastAPI>=0.79.0 git+https://git.almalinux.org/almalinux/cas_wrapper.git@0.0.6#egg=cas_wrapper git+https://github.com/AlmaLinux/errata2osv.git@0.0.2#egg=errata2osv + +# Other dependencies // do not remove them + +anyio==3.7.1 +async-timeout==4.0.2 +attrs==23.1.0 +bcrypt==4.0.1 +build==0.10.0 +CacheControl==0.12.14 +cachetools==5.3.1 +certifi==2023.5.7 +cffi==1.15.1 +charset-normalizer==3.2.0 +cleo==2.0.1 +click==8.1.6 +coverage==7.2.7 +crashtest==0.4.1 +cryptography==41.0.2 +distlib==0.3.7 +dnspython==2.3.0 +dulwich==0.21.5 +email-validator==1.3.1 +exceptiongroup==1.1.2 +filelock==3.12.2 +frozenlist==1.4.0 +gevent==23.7.0 +google-api-core==2.8.2 +google-auth==2.22.0 +google-cloud-core==2.3.3 +google-cloud-datastore==1.15.5 +google-cloud-ndb==1.12.0 +googleapis-common-protos==1.56.4 +greenlet==2.0.2 +grpcio==1.56.0 +grpcio-status==1.48.2 +h11==0.14.0 +html5lib==1.1 +httpcore==0.16.3 +httptools==0.6.0 +httpx==0.23.3 +idna==3.4 +importlib-metadata==6.8.0 +iniconfig==2.0.0 +installer==0.7.0 +itsdangerous==2.1.2 +jaraco.classes==3.3.0 +jeepney==0.8.0 +jsonschema==4.18.4 +jsonschema-specifications==2023.7.1 +keyring==24.2.0 +lockfile==0.12.2 +makefun==1.15.1 +Mako==1.2.4 +MarkupSafe==2.1.3 +more-itertools==9.1.0 +msgpack==1.0.5 +multidict==6.0.4 +orjson==3.9.2 +osv==0.0.18 +packaging==23.1 +passlib==1.7.4 +pexpect==4.8.0 +pika==1.3.2 +pipdeptree==2.10.2 +pkginfo==1.9.6 +platformdirs==3.9.1 +pluggy==1.2.0 +prometheus-client==0.17.1 +proto-plus==1.22.3 +protobuf==3.20.0 +ptyprocess==0.7.0 +pyasn1==0.5.0 +pyasn1-modules==0.3.0 +pycparser==2.21 +pygit2==1.12.2 +PyJWT==2.6.0 +pymemcache==4.0.0 +pyproject_hooks==1.0.0 +python-dotenv==1.0.0 +pytz==2023.3 +rapidfuzz==2.15.1 +redis==4.6.0 +referencing==0.30.0 +requests==2.31.0 +requests-toolbelt==1.0.0 +rfc3986==1.5.0 +rpds-py==0.9.2 +rsa==4.9 +SecretStorage==3.3.3 +semver==3.0.1 +shellingham==1.5.0.post1 +six==1.16.0 +sniffio==1.3.0 +starlette==0.26.1 +tomli==2.0.1 +tomlkit==0.11.8 +trove-classifiers==2023.7.6 +typing_extensions==4.7.1 +ujson==5.8.0 +urllib3==1.26.16 +uvloop==0.17.0 +virtualenv==20.24.0 +watchdog==3.0.0 +watchdog-gevent==0.1.1 +watchfiles==0.19.0 +webencodings==0.5.1 +websockets==11.0.3 +yarl==1.9.2 +zipp==3.16.2 +zope.event==5.0 +zope.interface==6.0