-
-
Notifications
You must be signed in to change notification settings - Fork 207
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
[ERROR] AttributeError: module 'typing' has no attribute '_ClassVar', supabase-py on AWS Lambda #33
Comments
@weleo Remove a module called Dataclasses which is only supported Python versions <= 3.6. pip uninstall dataclasses -y I hope this works! |
@weleo were you able to deploy correctly? |
@J0 we should close this issue since it seems solved. |
@weleo we are closing this due to inactivity, please let us know if you're still facing any issues. Thanks! |
Can we reopen this ticket and adjust the poetry.lock file to only include dataclasses if the python version is < 3.6? Running into an issue where I'm trying to deploy the client in an AWS Lambda and I don't have a way to uninstall dataclasses. I can't build it with Python 3.6 runtime because then the bleach package fails to resolve |
- Dataclasses is no longer needed. It is a dependency needed only for Python < 3.7. Realtime, however requires Python >= 3.7, and so this dep isn't needed. - Already removed in realtime supabase/realtime-py#48 - Fixes supabase#33 (comment) This issue comes up when using this library in AWS Lambda with serverless framework plugin serverless-python-requirements and this lock file makes it hard to deploy to Lambda with environments Python >= 3.7.
I created a PR here #353 |
Just merged, we'l publish a new version shortly. Thanks! |
@J0 Perfect, this is a big issue causing a lot of pain in sis deploys containing supabase. |
@J0 thanks a ton for addressing. Whats the timeline to a new version so that I can prepare? |
@ShantanuNair great to hear that it helps |
@J0 This is critical for us, since we are using a build time workaround for this that's proving to be unreliable. Appreciate your work! |
Same^ and I will also say thanks a ton :) |
@J0 Yes, this is a show stopper for us as well. Thank you for a new release soon! Edit: I just noticed that the So to get it working I had to install the latest version for both modules in my
|
Hey @dschnabel, @la289, and @ShantanuNair Thanks for your patience with me. I've just published a new version - could I trouble you to give it a try and let me know if the issue persists? Thanks Jo |
Preliminarily, I got it to build with Py3.9. Will update more soon if I have issues. Thanks!! |
@J0 I tested it with Py3.8 and it's working! However, the API has changed with this update, but this isn't reflected in the README. E.g. to sign up a user the new call would be:
|
@dschnabel good to hear - I'll update it when I get a slot! We moved everything to GoTrue v2 (like in the js lib) we'll also try to publicise it when we can |
Thanks for taking the time to reply! |
@J0 I will try building this in a few hours and update here. However @dschnabel 's issue is odd, since supabase-py dependency on realtime limits it to python 3.8+ and realtime doesn't even have a dataclasses rep anymore. So they shouldn't have to do anything to get it working. Regardless, I will check for my use case and let you know how it builds. Looking at the poetry.lock file it looks like things should work. |
@ShantanuNair I think the problem with realtime was that until Friday last week no new version had been released. So when pip pulled in the dependencies it still used an old version of realtime which had the dataclasses dep. But now there's a new realtime version too, so it's enough to only define |
@J0 My build works just fine now, no irregular dataclasses dep is included. Thank you for the prompt version release! @dschnabel I see, okay. |
- Dataclasses is no longer needed. It is a dependency needed only for Python < 3.7. Realtime, however requires Python >= 3.7, and so this dep isn't needed. - Already removed in realtime supabase/realtime-py#48 - Fixes supabase/supabase-py#33 (comment) This issue comes up when using this library in AWS Lambda with serverless framework plugin serverless-python-requirements and this lock file makes it hard to deploy to Lambda with environments Python >= 3.7.
- Dataclasses is no longer needed. It is a dependency needed only for Python < 3.7. Realtime, however requires Python >= 3.7, and so this dep isn't needed. - Already removed in realtime supabase/realtime-py#48 - Fixes supabase/supabase-py#33 (comment) This issue comes up when using this library in AWS Lambda with serverless framework plugin serverless-python-requirements and this lock file makes it hard to deploy to Lambda with environments Python >= 3.7.
AWS Lambda returns the error below when importing
supabase-py
.The error appears on runtimes: python 3.7 and 3.8.
Possibly related to the typing module as one of its dependencies.
Issues with typing Python-3 & AWS Lambda
Bug report
The text was updated successfully, but these errors were encountered: