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
Use explicit imports to avoid future AttributeErrors #930
Conversation
Is it be possible to merge this in order to support python 3.9? It's currently breaking python 3.9 support in libraries that use construct. |
Is there anything we can do to help get this moved forward? This one sounds a bit similar too: https://bugs.python.org/issue31318 |
Interestingly enough, with the minimal reproducer below I can reproduce the same type of error on my Macbook (where I originally got it) and on a Raspberry Pi 4 running Raspbian Buster, but not on another Raspberry Pi 4 running Ubuntu 20.04. On my Macbook, Python is coming from https://github.com/pyenv/pyenv, in Raspbian and Ubuntu 20.04 Python is installed with macOS:
Raspbian Buster:
Ubuntu 20.04:
|
@arekbulski what are your thoughts about this? |
Library is tested against python 3.9 since a log time ago. Since 2 days ago it is also tested against 3.10. It works without a hitch. So, you will convince me please that the changes in question are necessary. |
I would love to have some kind of reproducer to provide, but I have not been able to pinpoint why exactly it fails for me (and others), and why it for me only fails on macOS. Could it have something to do with how Python is built in a specific situation? Or something in the surrounding environment that somehow impacts it. According to a comment by a Python committer in https://bugs.python.org/issue31318, because Do you have any ideas for how to troubleshoot it further? |
Unfortunately no. I can add the imports "just in case" and we see if that changes anything maybe? |
That would be appreciated 👍 I'm pretty sure it should fix it for me at least. I tried doing that same change in my local |
Closing since the changes are merged in 83f9080 |
The CPython internals could change in future and using explicit imports will help in safeguarding.
Similar issue in gcloud : https://issuetracker.google.com/issues/170125513
Found in yozik04/vallox_websocket_api#15