Skip to content

Conversation

@QuLogic
Copy link
Contributor

@QuLogic QuLogic commented Sep 27, 2021

In Python 3.5.3 and 3.6, the get_event_loop returned the expected result always, so in Python 3.8, this parameter was deprecated and in 3.10 it was removed.

@QuLogic
Copy link
Contributor Author

QuLogic commented Sep 27, 2021

The failures do seem to be related, but I do not understand them as I tested with 3.9 and 3.10 and this seemed to have worked.

@QuLogic
Copy link
Contributor Author

QuLogic commented Sep 27, 2021

Hmm, no, actually, locally it didn't fail, but a scratch build in koji did. So it seems flaky to do this exactly. I guess the queue must be created when the right loop is running, and not pre-created.

@QuLogic QuLogic changed the title Remove explicit loop from asyncio Queue Remove explicit loop from asyncio tests Mar 6, 2022
@QuLogic
Copy link
Contributor Author

QuLogic commented Mar 6, 2022

The explicit loop in asyncio code was removed by #5709, so I've changed this to just remove the loop from the tests.

@QuLogic QuLogic mentioned this pull request Mar 6, 2022
In 3.10, the _internal_ `_loop` attribute of several asyncio classes has
been removed.
@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2022

Unit Test Results

       12 files  ±0         12 suites  ±0   6h 55m 39s ⏱️ - 17m 34s
  2 621 tests ±0    2 539 ✔️  - 1    80 💤 ±0  2 +2 
15 650 runs  ±0  14 790 ✔️ +4  858 💤  - 4  2 +1 

For more details on these failures, see this check.

Results for commit f7d28d4. ± Comparison against base commit b3f50ce.

@QuLogic
Copy link
Contributor Author

QuLogic commented Mar 6, 2022

The failing test appears unrelated.



@pytest.mark.skipif(
sys.version_info >= (3, 10), reason="No internal loop in Python 3.10"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "_loop" attribute is there in 3.10 - it's just late bound: https://github.com/python/cpython/blob/8acbb93c0763fa53b5959fe05d86ba275c9e8a5b/Lib/asyncio/mixins.py#L28

the tests could be modified to use the asyncio resource first so the loop is always bound before the assert, eg:

await c.gather([c.submit(...)])
assert c._gather_semaphore._loop

@graingert graingert mentioned this pull request Mar 8, 2022
3 tasks
@graingert graingert mentioned this pull request Mar 16, 2022
3 tasks
@QuLogic
Copy link
Contributor Author

QuLogic commented Nov 28, 2022

Replaced by #5952.

@QuLogic QuLogic closed this Nov 28, 2022
@QuLogic QuLogic deleted the drop-event-loop branch November 28, 2022 06:23
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.

The loop parameter to Queue is deprecated/removed

3 participants