FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Compensate for asyncio changes in Python 3.13.3/3.14 by cjwatson · Pull Request #662 · MagicStack/uvloop · GitHub

Repository navigation

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) .yml  (1) All 2 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
2 changes: 0 additions & 2 deletions .github/workflows/tests.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ jobs:

- name: Install Python Deps
if: steps.release.outputs.version == 0
env:
PIP_PRE: ${{ matrix.python-version == '3.13' && '1' || '0' }}
run: |
pip install -e .[test,dev]

Expand Down
11 changes: 8 additions & 3 deletions tests/test_base.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,14 @@ def get_name(self):
async def coro():
pass

factory = lambda loop, coro, **kwargs: MyTask(
coro, loop=loop, **kwargs
)
def factory(loop, coro, **kwargs):
task = MyTask(coro, loop=loop, **kwargs)
# Python moved the responsibility to set the name to the Task
# class constructor, so MyTask.set_name is never called by
# Python's create_task. Compensate for that here.
if self.is_asyncio_loop() and "name" in kwargs:
task.set_name(kwargs["name"])
return task

self.assertIsNone(self.loop.get_task_factory())
task = self.loop.create_task(coro(), name="mytask")
Expand Down

Back | FazBrowse Home | New Git URL