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

Fix return type of start_tls() #10346

Merged
merged 2 commits into from
Jun 28, 2023
Merged

Fix return type of start_tls() #10346

merged 2 commits into from
Jun 28, 2023

Conversation

Dreamsorcerer
Copy link
Contributor

@github-actions
Copy link
Contributor

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

aiohttp (https://github.com/aio-libs/aiohttp)
+ aiohttp/connector.py:1066: error: Argument 1 to "connection_made" of "BaseProtocol" has incompatible type "Optional[Transport]"; expected "BaseTransport"  [arg-type]
+ aiohttp/connector.py:1069: error: Incompatible return value type (got "Tuple[Optional[Transport], ResponseHandler]", expected "Tuple[BaseTransport, ResponseHandler]")  [return-value]

@Dreamsorcerer
Copy link
Contributor Author

mypy_primer highlights the bug.

@Dreamsorcerer
Copy link
Contributor Author

I've opened a cpython bug report, maybe this should be considered a bug rather than incorrect typing:
python/cpython#105993

@AlexWaygood
Copy link
Member

I've opened a cpython bug report, maybe this should be considered a bug rather than incorrect typing:
python/cpython#105993

Let's wait for the asyncio experts over at CPython to decide whether or not it's a bug in CPython before we merge this 👍

@AlexWaygood
Copy link
Member

The CPython docs PR has been merged, so I'm fan with landing this now. 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 this pull request may close these issues.

None yet

2 participants