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

Vendored _staggered.py causes problems on Python 3.10 #99

Closed
KrystianOcado opened this issue Sep 30, 2024 · 2 comments · Fixed by #101
Closed

Vendored _staggered.py causes problems on Python 3.10 #99

KrystianOcado opened this issue Sep 30, 2024 · 2 comments · Fixed by #101
Labels
bug Something isn't working

Comments

@KrystianOcado
Copy link

Describe the bug
_staggered.py uses new Python syntax except* that was added in Python 3.11: https://docs.python.org/3.11/whatsnew/3.11.html#whatsnew311-pep654. It causes problem when you try to deploy Google Cloud function using Python 3.10 even tough aiohappyeyeballs says it is compatible with Python 3.10 (it happens because GCF tries to compile all the code).

Error:

ERROR: (gcloud.functions.deploy) OperationError: code=3, message=Build failed: *** Error compiling './aiohappyeyeballs/_staggered.py'...
  File "./aiohappyeyeballs/_staggered.py", line 98
    except* _Done:
          ^

To Reproduce
Try to compile _staggered.py using Python 3.10

Additional context
I believe this won't cause runtime problems because of how it is imported in staggered.py: https://github.com/aio-libs/aiohappyeyeballs/blob/main/src/aiohappyeyeballs/staggered.py but it causes build problems because of how GCP functions work.

@KrystianOcado KrystianOcado added the bug Something isn't working label Sep 30, 2024
@mtelka
Copy link

mtelka commented Sep 30, 2024

I do see the same issue when I try to install the wheel using /usr/bin/python3.9 -m installer aiohappyeyeballs-2.4.2-py3-none-any.whl.

@tsibley
Copy link

tsibley commented Sep 30, 2024

FWIW, I've also recently run into this issue when using PyOxidizer, as it pre-compiles Python modules during its bundling step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants