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

djackets_django build fails on Python 3.12 #39

Open
a-abella opened this issue May 28, 2024 · 0 comments
Open

djackets_django build fails on Python 3.12 #39

a-abella opened this issue May 28, 2024 · 0 comments

Comments

@a-abella
Copy link

The djackets_django Dockerfile specified FROM python:3 which is now 3.12. Build throws errors when installing PyYAML:

7.575 Collecting PyYAML==6.0 (from -r requirements.txt (line 27))
7.610   Downloading PyYAML-6.0.tar.gz (124 kB)
7.616      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.0/125.0 kB 29.5 MB/s eta 0:00:00
7.694   Installing build dependencies: started
10.95   Installing build dependencies: finished with status 'done'
10.95   Getting requirements to build wheel: started
11.33   Getting requirements to build wheel: finished with status 'error'
11.34   error: subprocess-exited-with-error

After bumping the PyYAML version in requirements.txt the image builds successfully, but the app fails to run with errors from stripe:

  File "/app/order/urls.py", line 3, in <module>
    from order import views
  File "/app/order/views.py", line 1, in <module>
    import stripe
  File "/usr/local/lib/python3.12/site-packages/stripe/__init__.py", line 34, in <module>
    from stripe.api_resources import *  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/stripe/api_resources/__init__.py", line 6, in <module>
    from stripe.api_resources.error_object import ErrorObject, OAuthErrorObject
  File "/usr/local/lib/python3.12/site-packages/stripe/api_resources/error_object.py", line 3, in <module>
    from stripe.util import merge_dicts
  File "/usr/local/lib/python3.12/site-packages/stripe/util.py", line 13, in <module>
    from stripe.six.moves.urllib.parse import parse_qsl
ModuleNotFoundError: No module named 'stripe.six.moves'

Pinning the Python version to 3.11 in the Dockerfile resolves these issues for the moment.

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

No branches or pull requests

1 participant