Skip to content

Backport PEP 695's TypeAliasType #159

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

Closed
adriangb opened this issue May 13, 2023 · 4 comments · Fixed by #160
Closed

Backport PEP 695's TypeAliasType #159

adriangb opened this issue May 13, 2023 · 4 comments · Fixed by #160

Comments

@adriangb
Copy link
Contributor

Cross-referencing here for visibility.

https://discuss.python.org/t/please-consider-delaying-or-even-rejecting-pep-695/26408/62?u=adriangb
https://mail.python.org/archives/list/[email protected]/thread/T5MRLQL7H4Y4HWFA7CBC34MHJCKQEI7L/

cc @JelleZijlstra, I didn't want to bug everyone in the discuss thread 😅

@adriangb
Copy link
Contributor Author

Thank you Jelle!

@leonartdoss
Copy link

Hello @adriangb!
Since I implemented pydantic in my project, I'm getting the following error:

Invalid lambda response received: Invalid API Gateway Response Keys: {'requestId', 'stackTrace', 'errorType', 'errorMessage'} 
in {'errorMessage': "Unable to import module 'main.app': cannot import name 'TypeAliasType' from 'typing_extensions'          
(/opt/python/typing_extensions.py)", 'errorType': 'Runtime.ImportModuleError', 'requestId':                                   
'194b3776-a307-40b0-b5f7-945eb949f3db', 'stackTrace': []} 

It's a lambda function (AWS) which contains some Pydantic models. I'm using python 3.9.
Do you think that my problem can be related to this issue?

Thank you!
Leonardo

@adriangb
Copy link
Contributor Author

Yes but you must have mispecified your dependencies:

https://github.com/pydantic/pydantic/blob/5baac76d893a226f02be29def9446352e18cabbc/pyproject.toml#L62

We require typing-extensions >= 4.6.1 which included this addition.

@leonartdoss
Copy link

Yes but you must have mispecified your dependencies:

https://github.com/pydantic/pydantic/blob/5baac76d893a226f02be29def9446352e18cabbc/pyproject.toml#L62

We require typing-extensions >= 4.6.1 which included this addition.

I have typing-extensions 4.7.1. In the link which you sent, I see pydantic-core 2.2.0, but pydantic 2.0.2 requires pydantic-core 2.1.2. I don't know if this could be related.

ps.: Should I move this thread to an issue in Pydantic repo?

Thanks

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 a pull request may close this issue.

2 participants