Skip to content

Conversation

@erlend-aasland
Copy link
Contributor

@erlend-aaslanderlend-aasland commented May 12, 2021

  • Implement full GC protocol support for _csv heap types
  • Use tp_clear iso. tp_finalize to clear type contexts

Petr's reproducer now outputs the following:

$ ./python.exe bug.py 73166 73168 73168 73168 73168 73168 73166 73168 73168 73168 

However, the _csv test suite now leaks (EDIT: updated output after b8772d6)
UPDATE: No leaks after 19e2952

https://bugs.python.org/issue44116

@erlend-aasland
Copy link
ContributorAuthor

(I'm applying skip news to this, @pablogsal (@corona10), as it is similar to GH-26072.)

Copy link
Member

@Fidget-SpinnerFidget-Spinner left a comment

Choose a reason for hiding this comment

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

Thanks! Some minor nits below:

@erlend-aaslanderlend-aasland marked this pull request as ready for review May 12, 2021 16:55
@Fidget-Spinner
Copy link
Member

Doh I should've refreshed before I submitted the review. Didn't see your latest commits :(. Sorry.

@erlend-aasland
Copy link
ContributorAuthor

Doh I should've refreshed before I submitted the review. Didn't see your latest commits :(. Sorry.

No problem, Ken :) I believe all your comments were addressed in 19e2952.

@erlend-aaslanderlend-aasland changed the title [WIP] bpo-44116: Add GC support to _csv heap typesbpo-44116: Add GC support to _csv heap typesMay 12, 2021
@pablogsal
Copy link
Member

One thing that I don't understand is why the CSV tests when executed under the refleak checker don't show any problems

@pablogsal
Copy link
Member

Does this need backport to 3.9?

@pablogsalpablogsal merged commit e5ba1fe into python:mainMay 12, 2021
@miss-islington
Copy link
Contributor

Thanks @erlend-aasland for the PR, and @pablogsal for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-26081 is a backport of this pull request to the 3.10 branch.

@bedevere-botbedevere-bot removed the needs backport to 3.10 only security fixes label May 12, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 12, 2021
(cherry picked from commit e5ba1fe) Co-authored-by: Erlend Egeberg Aasland <[email protected]>
@erlend-aaslanderlend-aasland deleted the gc-csv branch May 12, 2021 18:21
@erlend-aasland
Copy link
ContributorAuthor

Does this need backport to 3.9?

No. This was added in December in GH-23224

@erlend-aasland
Copy link
ContributorAuthor

erlend-aasland commented May 12, 2021

Thanks for reviewing, Pablo and Ken!

pablogsal pushed a commit that referenced this pull request May 12, 2021
@encukou
Copy link
Member

Thank you for pushing this through!

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants

@erlend-aasland@Fidget-Spinner@pablogsal@miss-islington@bedevere-bot@encukou@the-knights-who-say-ni