Skip to content

Commit 8cb2a3f

Browse files
committed
another small tweak
1 parent 169aad9 commit 8cb2a3f

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

winloop/__init__.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ def run(
3333
] = new_event_loop,
3434
debug: _typing.Optional[bool]=None,
3535
) -> _T:
36-
"""The preferred way of running a coroutine with uvloop."""
36+
"""The preferred way of running a coroutine with winloop."""
3737
else:
3838
def run(main, *, loop_factory=new_event_loop, debug=None, **run_kwargs):
39-
"""The preferred way of running a coroutine with uvloop."""
39+
"""The preferred way of running a coroutine with winloop."""
4040

4141
async def wrapper():
4242
# If `loop_factory` is provided we want it to return
43-
# either uvloop.Loop or a subtype of it, assuming the user
44-
# is using `uvloop.run()` intentionally.
43+
# either winloop.Loop or a subtype of it, assuming the user
44+
# is using `winloop.run()` intentionally.
4545
loop = __asyncio._get_running_loop()
4646
if not isinstance(loop, Loop):
47-
raise TypeError('uvloop.run() uses a non-uvloop event loop')
47+
raise TypeError('winloop.run() uses a non-winloop event loop')
4848
return await main
4949

5050
vi = _sys.version_info[:2]
@@ -135,24 +135,24 @@ def _cancel_all_tasks(loop: _AbstractEventLoop) -> None:
135135

136136
def __getattr__(name: str) -> _typing.Any:
137137
if name not in _deprecated_names:
138-
raise AttributeError(f"module 'uvloop' has no attribute '{name}'")
138+
raise AttributeError(f"module 'winloop' has no attribute '{name}'")
139139
elif _sys.version_info[:2] >= (3, 16):
140140
raise AttributeError(
141-
f"module 'uvloop' has no attribute '{name}' "
142-
f"(it was removed in Python 3.16, use uvloop.run() instead)"
141+
f"module 'winloop' has no attribute '{name}' "
142+
f"(it was removed in Python 3.16, use winloop.run() instead)"
143143
)
144144

145145
import threading
146146

147147
def install() -> None:
148-
"""A helper function to install uvloop policy.
148+
"""A helper function to install winloop policy.
149149
150150
This function is deprecated and will be removed in Python 3.16.
151-
Use `uvloop.run()` instead.
151+
Use `winloop.run()` instead.
152152
"""
153153
if _sys.version_info[:2] >= (3, 12):
154154
_warnings.warn(
155-
'uvloop.install() is deprecated in favor of uvloop.run() '
155+
'winloop.install() is deprecated in favor of winloop.run() '
156156
'starting with Python 3.12.',
157157
DeprecationWarning,
158158
stacklevel=1,
@@ -163,16 +163,16 @@ class EventLoopPolicy(
163163
# This is to avoid a mypy error about AbstractEventLoopPolicy
164164
getattr(__asyncio, 'AbstractEventLoopPolicy') # type: ignore[misc]
165165
):
166-
"""Event loop policy for uvloop.
166+
"""Event loop policy for winloop.
167167
168168
This class is deprecated and will be removed in Python 3.16.
169-
Use `uvloop.run()` instead.
169+
Use `winloop.run()` instead.
170170
171171
>>> import asyncio
172-
>>> import uvloop
173-
>>> asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
172+
>>> import winloop
173+
>>> asyncio.set_event_loop_policy(winloop.EventLoopPolicy())
174174
>>> asyncio.get_event_loop()
175-
<uvloop.Loop running=False closed=False debug=False>
175+
<winloop.Loop running=False closed=False debug=False>
176176
"""
177177

178178
def _loop_factory(self) -> Loop:

0 commit comments

Comments
 (0)