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

Implement app typing (Any) #515

Closed
wants to merge 1 commit into from
Closed

Conversation

Dreamsorcerer
Copy link
Member

Demonstration of adding app typing to a library lazily by using Any.

@asvetlov
Copy link
Member

asvetlov commented Dec 7, 2021

Sorry for the late review, I was busy with other tasks.

How to make a library work with both the new approach and the latest published 3.8.1 version assuming that mypy --strict is used for checks?

@Dreamsorcerer
Copy link
Member Author

Dreamsorcerer commented Dec 7, 2021

Sorry for the late review, I was busy with other tasks.

How to make a library work with both the new approach and the latest published 3.8.1 version assuming that mypy --strict is used for checks?

To support both aiohttp 3.8 and (if merged) 3.9? I'm not sure there's an easy way, I think we frequently just bump the minimum supported version (e.g. we bumped aiohttp-session to 3.8+ recently to support a new argument).

If someone really wanted to do that, then you could possibly do some kind of version check to use either Application or "Application[Any]". But, given that we don't even provide security updates to older releases of aiohttp, it doesn't seem like a situation worth supporting, we should just encourage users to upgrade.

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 this pull request may close these issues.

2 participants