-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Resolve asyncio issues for 3.13 #12327
Conversation
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just one small thing (and an optional small thing) below.
@@ -237,6 +243,7 @@ class BaseEventLoop(AbstractEventLoop): | |||
ssl: _SSLContext = None, | |||
reuse_address: bool | None = None, | |||
reuse_port: bool | None = None, | |||
keep_alive: bool | None = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird that the default is None
, not False
, but it is what it is ...
class QueueEmpty(Exception): ... | ||
class QueueFull(Exception): ... | ||
|
||
if sys.version_info >= (3, 13): | ||
class QueueShutDown(Exception): ... | ||
__all__ = ("Queue", "PriorityQueue", "LifoQueue", "QueueFull", "QueueEmpty", "QueueShutDown") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
__all__
should stay at the top of the file (below the imports), even if it means repeating the version_info branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: bee3ed2
stdlib/asyncio/unix_events.pyi
Outdated
@@ -59,7 +62,19 @@ if sys.version_info < (3, 14): | |||
|
|||
if sys.platform != "win32": | |||
if sys.version_info >= (3, 14): | |||
__all__ = ("SelectorEventLoop", "DefaultEventLoopPolicy") | |||
__all__ = ("SelectorEventLoop", "DefaultEventLoopPolicy", "EventLoop") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea why __all__
is down here, but you could also optionally move it to the top of the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed: bee3ed2
According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉 |
Account for new
asyncio
changes from 3.13:abort_clients
andclose_client
methods onAbstractServer
.keep_alive
param forAbstractEventLoop.create_server
.warnings
argument forasyncio.Streams.StreamWriter.__del__
QueueShutDown
exception andshutdown
method inayncio.queues
.EventLoop
tounix_events.pyi
andwindows_events.pyi
.