Skip to content
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

gh-119121: Fix and test async.staggered.staggered_race #119173

Merged
merged 3 commits into from
May 20, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented May 19, 2024

I've added a couple of tests for this function as well, to prevent simple future regressions.

Please, note that this set of tests is clearly not enough to cover all the cases in this function. Right now it only covers several simple use-cases. In the future we can also test:

  • loop= argument
  • Cleanups of running tasks
  • __debug__ route
  • delay corner cases
  • etc

But, I think that testing green path is good enough for now.
I can commit more tests in the next PRs, since they will require quite a lot of effort.

Refs #114282
This PR does need a 3.13 backport.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Thanks!

Lib/test/test_asyncio/test_staggered.py Outdated Show resolved Hide resolved
@sobolevn sobolevn merged commit 16b46eb into python:main May 20, 2024
33 checks passed
@miss-islington-app
Copy link

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 20, 2024
…nGH-119173)

(cherry picked from commit 16b46eb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-app
Copy link

bedevere-app bot commented May 20, 2024

GH-119206 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 20, 2024
sobolevn added a commit that referenced this pull request May 20, 2024
…19173) (#119206)

gh-119121: Fix and test `async.staggered.staggered_race` (GH-119173)
(cherry picked from commit 16b46eb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD14 3.13 has failed when building commit 3a8ab99.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/1481/builds/48) and take a look at the build logs.
  4. Check if the failure is related to this commit (3a8ab99) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/1481/builds/48

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):
  File "<frozen getpath>", line 355, in <module>
ValueError: embedded null byte
Warning -- Uncaught thread exception: InterpreterError
Exception in thread Thread-188 (task):
RuntimeError: error evaluating path


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/threading.py", line 1039, in _bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/threading.py", line 990, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/test/test_interpreters/test_stress.py", line 29, in task
    interp = interpreters.create()
  File "/home/buildbot/buildarea/3.13.opsec-fbsd14/build/Lib/test/support/interpreters/__init__.py", line 76, in create
    id = _interpreters.create(reqrefs=True)
interpreters.InterpreterError: interpreter creation failed
k

Kronuz pushed a commit to Kronuz/cpython that referenced this pull request May 20, 2024
…pythonGH-119173) (python#119206)

pythongh-119121: Fix and test `async.staggered.staggered_race` (pythonGH-119173)
(cherry picked from commit 16b46eb)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
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.

4 participants