Skip to content

Fix return type of start_tls()#10346

Merged
AlexWaygood merged 2 commits intopython:mainfrom
Dreamsorcerer:patch-27
Jun 28, 2023
Merged

Fix return type of start_tls()#10346
AlexWaygood merged 2 commits intopython:mainfrom
Dreamsorcerer:patch-27

Conversation

@github-actions
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

mypy_primer highlights the bug.

@Dreamsorcerer
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants