Skip to content

The return type of _get_mutex_context_from_loglevel_timeout is annotated as Any to maintain support for Python 3.7 and 3.8. #61

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

Open
hoophalab opened this issue Feb 28, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@hoophalab
Copy link
Contributor

Request

The return type of function _get_mutex_context_from_loglevel_timeout should be AbstractContextManager[Optional[bool]], but it is annotated as Any to satisfy the linter in Python 3.7 and 3.8, as generic AbstractContextManager was introduced in Python 3.9 #18239.

Possible implementation

Once we drop support for Python 3.7 and 3.8, we can change the return type back to AbstractContextManager[Optional[bool]].

@hoophalab hoophalab added the enhancement New feature or request label Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant