Skip to content
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

Unpin requests #803

Merged
merged 2 commits into from
Jun 3, 2024
Merged

Unpin requests #803

merged 2 commits into from
Jun 3, 2024

Conversation

nevoodoo
Copy link
Collaborator

@nevoodoo nevoodoo commented May 28, 2024

With the release of docker/docker-py#3257 we no longer need to have our requests package pinned in the deps, so just unpinning it here and also upgrading docker and testcontainers while we're at it.

Also add a script to compile requirements with Docker to avoid Apple Silicon (M1) architecture differences.

@codecov-commenter
Copy link

codecov-commenter commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.30%. Comparing base (ab809cd) to head (1ac6958).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #803   +/-   ##
=======================================
  Coverage   77.30%   77.30%           
=======================================
  Files         157      157           
  Lines       13010    13010           
=======================================
  Hits        10057    10057           
  Misses       2953     2953           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nevoodoo nevoodoo changed the title unpin requests and upgrade other packages accordingly Unpin requests May 28, 2024
@nevoodoo nevoodoo requested a review from illusional May 28, 2024 07:19
@illusional
Copy link
Collaborator

illusional commented May 28, 2024

Hey @nevoodoo, I suspect it's related to this: sqlalchemy/sqlalchemy#7714
Rerunning pip-compile on my machine adds back in those changes:

Diff of requirements in here
diff --git a/requirements.txt b/requirements.txt
index 89b6895b..d0a37c3f 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -12,7 +12,7 @@ aiosignal==1.3.1
     # via aiohttp
 annotated-types==0.7.0
     # via pydantic
-anyio==4.3.0
+anyio==4.4.0
     # via
     #   httpx
     #   starlette
@@ -27,12 +27,12 @@ azure-storage-blob==12.20.0
     # via cloudpathlib
 backoff==2.2.1
     # via -r requirements.in
-boto3==1.34.111
+boto3==1.34.114
     # via
     #   -r requirements.in
     #   cloudpathlib
     #   cpg-utils
-botocore==1.34.111
+botocore==1.34.114
     # via
     #   -r requirements.in
     #   boto3
@@ -62,7 +62,9 @@ cryptography==42.0.7
     #   -r requirements.in
     #   azure-storage-blob
 databases[mysql]==0.9.0
-    # via -r requirements.in
+    # via
+    #   -r requirements.in
+    #   databases
 deprecated==1.2.14
     # via cpg-utils
 dnspython==2.6.1
@@ -72,6 +74,7 @@ email-validator==2.1.1
 fastapi[all]==0.110.2
     # via
     #   -r requirements.in
+    #   fastapi
     #   strawberry-graphql
 frozendict==2.4.4
     # via cpg-utils
@@ -81,6 +84,7 @@ frozenlist==1.4.1
     #   aiosignal
 google-api-core[grpc]==2.19.0
     # via
+    #   google-api-core
     #   google-cloud-appengine-logging
     #   google-cloud-bigquery
     #   google-cloud-core
@@ -132,6 +136,8 @@ googleapis-common-protos[grpc]==1.63.0
     #   grpcio-status
 graphql-core==3.2.3
     # via strawberry-graphql
+greenlet==3.0.3
+    # via sqlalchemy
 grpc-google-iam-v1==0.12.7
     # via
     #   google-cloud-logging
@@ -215,12 +221,12 @@ pyasn1-modules==0.4.0
     # via google-auth
 pycparser==2.22
     # via cffi
-pydantic==2.7.1
+pydantic==2.7.2
     # via
     #   fastapi
     #   pydantic-extra-types
     #   pydantic-settings
-pydantic-core==2.18.2
+pydantic-core==2.18.3
     # via pydantic
 pydantic-extra-types==2.7.0
     # via fastapi
@@ -275,12 +281,14 @@ sqlalchemy==2.0.30
 starlette==0.37.2
     # via fastapi
 strawberry-graphql[fastapi]==0.229.0
-    # via -r requirements.in
+    # via
+    #   -r requirements.in
+    #   strawberry-graphql
 tabulate==0.9.0
     # via cpg-utils
 toml==0.10.2
     # via cpg-utils
-typing-extensions==4.11.0
+typing-extensions==4.12.0
     # via
     #   azure-core
     #   azure-storage-blob
@@ -301,7 +309,7 @@ uvicorn[standard]==0.29.0
     #   fastapi
 uvloop==0.19.0
     # via uvicorn
-watchfiles==0.21.0
+watchfiles==0.22.0
     # via uvicorn
 websockets==12.0
     # via uvicorn

Maybe run it in a docker container, running something like this (could even add it as a script to this repo) updates those requirements files in place:

#!/bin/bash

# To avoid pip-compile deciding requirements on your specific machine,
# we use a docker container to compile the requirements, which should match
# the architecture of the dev environment.

docker run --platform linux/amd64 -v $(pwd):/opt/metamist python:3.11 /bin/bash -c '
    cd /opt/metamist;
    pip install pip-tools;
    pip-compile requirements.in > requirements.txt;
    pip-compile --output-file=requirements-dev.txt requirements-dev.in requirements.in
'

Copy link
Collaborator

@illusional illusional left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nevoodoo, this is great! Can you update the PR description before merging, otherwise looks good to go!

@illusional illusional merged commit 01bf58c into dev Jun 3, 2024
5 checks passed
@illusional illusional deleted the unpin-requests branch June 3, 2024 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants