Skip to content

Conversation

@jude253
Copy link

@jude253 jude253 commented Nov 18, 2024

Past PR: #126928

NEW PR NOTE: I added updates to the past PR that I raised such as formatting the code and adding news/whats new. I do not have time at the moment to have a discussion about adding this feature, so I will mark this PR as a draft, then update the description and publish this review after.

I added a retry decorator to functools, written in pure python so it should be maximally portable. I also added unit tests covering all aspects of the functionality. This is something I have been wishing to have for years and I explain in this issue: #126927

It has some keyword arguments that can be configured for different retry behavior and smart defaults.

This is my first contribution to CPython and I would really appreciate any feedback or pointers to add this change.

Tests

  • I ran ./python -m unittest Lib/test/test_functools.py -v with no errors
    • I ensured that the new tests I wrote work
  • I ran make patchcheck successfully

📚 Documentation preview 📚: https://cpython-previews--126943.org.readthedocs.build/

@skirpichev
Copy link
Contributor

Closes on same ground as #126928

@skirpichev skirpichev closed this Nov 18, 2024
@jude253
Copy link
Author

jude253 commented Nov 18, 2024

Ok, I will first re-open the issue after creating a discussion, then I will create a PR. Sorry I don't fully understand the workflow, yet!

@skirpichev
Copy link
Contributor

Ok, I will first re-open the issue after creating a discussion

Just mention someone from triage team in the issue. But after your proposal will get some support on the https://discuss.python.org/.

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.

2 participants