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-104090: Fix unittest collectedDurations resources leak #106795

Conversation

bityob
Copy link
Contributor

@bityob bityob commented Jul 15, 2023

  1. Fixed TestResult.addDuration method to add only test repr string and not the test object itself, to avoid resources leak

@iritkatriel

@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bityob bityob force-pushed the gh-104090-fix-leaked-semaphors-on-test_concurrent_futures branch from cdbe1c4 to 8cd162f Compare July 16, 2023 08:53
@iritkatriel
Copy link
Member

I think it might be better to split this into two PRs (attached to the same issue), one for the unittest fix and the other for the resource tracker change.

@bityob bityob force-pushed the gh-104090-fix-leaked-semaphors-on-test_concurrent_futures branch from 5585599 to 509636a Compare July 16, 2023 11:58
@bedevere-bot
Copy link

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@bityob
Copy link
Contributor Author

bityob commented Jul 16, 2023

I think it might be better to split this into two PRs (attached to the same issue), one for the unittest fix and the other for the resource tracker change.

Done

Second PR: #106807

@iritkatriel iritkatriel added tests Tests in the Lib/test dir stdlib Python modules in the Lib dir labels Jul 16, 2023
@iritkatriel
Copy link
Member

CC unittest maintainers. @gpshead @ezio-melotti

See issue for motivation.

@iritkatriel
Copy link
Member

@giampaolo addDuration was added in 3.12. Should this be backported as a bugfix?

@iritkatriel iritkatriel requested a review from giampaolo July 17, 2023 15:10
@sunmy2019
Copy link
Member

Is this new entry necessary?


Should this be backported as a bugfix?

+1 from me

@sunmy2019 sunmy2019 added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jul 18, 2023
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @sunmy2019 for commit d493239 🤖

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@giampaolo
Copy link
Contributor

giampaolo commented Jul 19, 2023

@iritkatriel wrote:

@giampaolo addDuration was added in 3.12. Should this be backported as a bugfix?

Hi! Yes, I think it should be backported.

@iritkatriel iritkatriel merged commit 70b961e into python:main Jul 19, 2023
@miss-islington
Copy link
Contributor

Thanks @bityob for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-106888 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 bug and security fixes label Jul 19, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 19, 2023
@iritkatriel iritkatriel added the needs backport to 3.12 bug and security fixes label Jul 19, 2023
@miss-islington
Copy link
Contributor

Thanks @bityob for the PR, and @iritkatriel for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 19, 2023
iritkatriel pushed a commit that referenced this pull request Jul 19, 2023
…106795) (#106888)

gh-104090: Fix unittest collectedDurations resources leak (GH-106795)
(cherry picked from commit 70b961e)

Co-authored-by: Yonatan Bitton <[email protected]>
@gpshead
Copy link
Member

gpshead commented Jul 19, 2023

thanks for figuring this out!

@picnixz picnixz removed the needs backport to 3.12 bug and security fixes label Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants