GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-44116: Add GC support to _csv heap types by erlend-aasland · Pull Request #26074 · python/cpython

Conversation

@erlend-aasland

@erlend-aasland erlend-aasland commented May 12, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • 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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Erlend E. Aasland
bpo-44116: Add GC support to _csv heap types
01edb37
@bedevere-bot bedevere-bot added the awaiting review label May 12, 2021
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label May 12, 2021
@erlend-aasland

erlend-aasland commented May 12, 2021

Copy link
Copy Markdown
Contributor Author

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

corona10 reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland added the skip news label May 12, 2021
Erlend E. Aasland added 2 commits May 12, 2021 18:22
Erlend E. Aasland
Revert _csv.Error changes
b8772d6
Erlend E. Aasland
Use tp_clear iso. tp_finalize
19e2952
Fidget-Spinner
Fidget-Spinner reviewed May 12, 2021
View reviewed changes

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this 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:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Modules/_csv.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/_csv.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

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

Fidget-Spinner commented May 12, 2021

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented May 12, 2021

Copy link
Copy Markdown
Contributor Author

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.

Fidget-Spinner reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland
erlend-aasland requested review from encukou and pablogsal May 12, 2021 16:59
@erlend-aasland erlend-aasland changed the title [WIP] bpo-44116: Add GC support to _csv heap types bpo-44116: Add GC support to _csv heap types May 12, 2021
Fidget-Spinner
Fidget-Spinner approved these changes May 12, 2021
View reviewed changes
@bedevere-bot bedevere-bot added awaiting core review and removed awaiting review labels May 12, 2021
pablogsal
pablogsal reviewed May 12, 2021
View reviewed changes
Comment thread Modules/_csv.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

pablogsal
pablogsal reviewed May 12, 2021
View reviewed changes
Comment thread Modules/_csv.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Erlend E. Aasland
Only dealloc should free memory
fe74fc2
@pablogsal

pablogsal commented May 12, 2021

Copy link
Copy Markdown
Member

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

erlend-aasland reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pablogsal
pablogsal approved these changes May 12, 2021
View reviewed changes
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels May 12, 2021
@pablogsal pablogsal added the needs backport to 3.10 label May 12, 2021
@pablogsal

pablogsal commented May 12, 2021

Copy link
Copy Markdown
Member

Does this need backport to 3.9?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pablogsal
pablogsal merged commit e5ba1fe into python:main May 12, 2021
@miss-islington

miss-islington commented May 12, 2021

Copy link
Copy Markdown
Contributor

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label May 12, 2021
@bedevere-bot

bedevere-bot commented May 12, 2021

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label May 12, 2021
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 12, 2021
Erlend Egeberg Aasland @miss-islington
bpo-44116: Add GC support to _csv heap types (pythonGH-26074)
911bfef
(cherry picked from commit e5ba1fe)

Co-authored-by: Erlend Egeberg Aasland <[email protected]>
@erlend-aasland
erlend-aasland deleted the gc-csv branch May 12, 2021 18:21
@erlend-aasland

erlend-aasland commented May 12, 2021

Copy link
Copy Markdown
Contributor Author

Does this need backport to 3.9?

No. This was added in December in GH-23224

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland

erlend-aasland commented May 12, 2021 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Thanks for reviewing, Pablo and Ken!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

pablogsal pushed a commit that referenced this pull request May 12, 2021
@miss-islington
bpo-44116: Add GC support to _csv heap types (GH-26074) (GH-26081)
ba260ac
(cherry picked from commit e5ba1fe)
@encukou

encukou commented May 12, 2021

Copy link
Copy Markdown
Member

Thank you for pushing this through!

erlend-aasland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland mentioned this pull request May 13, 2021
bpo-42972: Fully implement GC protocol for arraymodule types #26114
Merged
@pablogsal pablogsal mentioned this pull request Jul 18, 2021
[3.10] Correct the order of regen-abidump #27228
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pablogsal pablogsal pablogsal approved these changes
@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@encukou encukou Awaiting requested review from encukou

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@erlend-aasland @Fidget-Spinner @pablogsal @miss-islington @bedevere-bot @encukou @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.