Skip to content

Move Match and Pattern to re.pyi; move ContextManager protocols to contextlib.pyi #8447

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

Merged
merged 1 commit into from
Jul 31, 2022

Conversation

AlexWaygood
Copy link
Member

No description provided.

@github-actions
Copy link
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

pyinstrument (https://github.com/joerick/pyinstrument)
- pyinstrument/vendor/decorator.py:279: error: Module "contextlib" has no attribute "GeneratorContextManager"; maybe "_GeneratorContextManager", "_AsyncGeneratorContextManager", or "ContextManager"?
+ pyinstrument/vendor/decorator.py:279: error: Module "contextlib" has no attribute "GeneratorContextManager"; maybe "_GeneratorContextManager", "_AsyncGeneratorContextManager", or "AbstractContextManager"?

paroxython (https://github.com/laowantong/paroxython)
- paroxython/map_taxonomy.py:178: error: Argument 1 to "append" of "list" has incompatible type "Tuple[regex._regex.Pattern[str], TaxonPattern]"; expected "Tuple[typing.Pattern[Any], TaxonPattern]"
+ paroxython/map_taxonomy.py:178: error: Argument 1 to "append" of "list" has incompatible type "Tuple[regex._regex.Pattern[str], TaxonPattern]"; expected "Tuple[re.Pattern[Any], TaxonPattern]"

prefect (https://github.com/PrefectHQ/prefect)
- src/prefect/client.py:125: error: Argument 1 to "asynccontextmanager" has incompatible type "Callable[[Any], ContextManager[None]]"; expected "Callable[[Any], AsyncIterator[<nothing>]]"
+ src/prefect/client.py:125: error: Argument 1 to "asynccontextmanager" has incompatible type "Callable[[Any], AbstractContextManager[None]]"; expected "Callable[[Any], AsyncIterator[<nothing>]]"
- src/prefect/context.py:465: error: Incompatible types in assignment (expression has type "None", variable has type "ContextManager[SettingsContext]")
+ src/prefect/context.py:465: error: Incompatible types in assignment (expression has type "None", variable has type "AbstractContextManager[SettingsContext]")
- src/prefect/context.py:519: error: Incompatible types in assignment (expression has type "None", variable has type "ContextManager[PrefectObjectRegistry]")
+ src/prefect/context.py:519: error: Incompatible types in assignment (expression has type "None", variable has type "AbstractContextManager[PrefectObjectRegistry]")

@AlexWaygood AlexWaygood marked this pull request as ready for review July 30, 2022 17:42
@srittau srittau merged commit ea7bbbd into python:master Jul 31, 2022
@AlexWaygood AlexWaygood deleted the re branch July 31, 2022 13:28
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