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 — gh-102013: Add PyUnstable_GC_VisitObjects by jbower-fb · Pull Request #102014 · python/cpython

Conversation

@jbower-fb

@jbower-fb jbower-fb commented Feb 18, 2023 •
edited by bedevere-bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor
  • Issue: Add a public C-API function to iterate over GC’able objects #102013

Sorry, something went wrong.

Uh oh!

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

All reactions
@jbower-fb @swtaarrs
Add PyGC_VisitObjects
c4a91e0
Co-authored-by: Brett Simmers <[email protected]>
@jbower-fb
jbower-fb requested a review from pablogsal as a code owner February 18, 2023 00:47
@ghost

ghost commented Feb 18, 2023 •
edited by ghost
Loading

Uh oh!

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

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

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

@bedevere-bot bedevere-bot added the awaiting review label Feb 18, 2023
@bedevere-bot bedevere-bot mentioned this pull request Feb 18, 2023
Add a public C-API function to iterate over GC’able objects #102013
Closed
@bedevere-bot

bedevere-bot commented Feb 18, 2023

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

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

All reactions

Sorry, something went wrong.

Uh oh!

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

blurb-it Bot and others added 2 commits February 18, 2023 00:55
@blurb-it
📜🤖 Added by blurb_it.
57edf6d
@jbower-fb
Remove from Limited API
447bb53
@pablogsal pablogsal self-assigned this Feb 19, 2023
hauntsaninja and others added 3 commits February 20, 2023 11:39
@hauntsaninja
Merge branch 'main' into gcvisitobjs
d4f9505
@jbower-fb
Updated to "unstable" API, protect against GC and current object dele…
d34a900
…tion, add ability to terminate iteration early with test.
@jbower-fb
Merge branch 'gcvisitobjs' of https://github.com/jbower-fb/cpython-jb…
7c1fbbb
…owerfb into gcvisitobjs
erlend-aasland
erlend-aasland reviewed Feb 23, 2023
View reviewed changes
Comment thread Misc/NEWS.d/next/C API/2023-02-18-00-55-14.gh-issue-102013.83mrtI.rst Resolved

Uh oh!

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

Comment thread Modules/_testcapimodule.c Resolved

Uh oh!

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

Comment thread Modules/_testcapimodule.c Resolved

Uh oh!

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

Comment thread Modules/_testcapimodule.c Resolved

Uh oh!

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

Comment thread Modules/_testcapimodule.c Resolved

Uh oh!

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

Comment thread Modules/gcmodule.c Resolved

Uh oh!

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

Comment thread Modules/gcmodule.c Resolved

Uh oh!

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

Comment thread Modules/gcmodule.c Resolved

Uh oh!

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

Comment thread Modules/gcmodule.c Resolved

Uh oh!

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

Comment thread Include/objimpl.h Resolved

Uh oh!

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

jbower-fb and others added 10 commits February 23, 2023 11:53
@jbower-fb @erlend-aasland
Fix formatting in Modules/_testcapimodule.c
9b0c461
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Fix formatting in Modules/_testcapimodule.c
29f7f88
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Fix formatting in Modules/_testcapimodule.c
e16f1e3
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Fix formatting in Modules/_testcapimodule.c
024ee30
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Fix formatting in Modules/gcmodule.c
bd65abb
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Fix formatting in Modules/gcmodule.c
f03e581
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Fix formatting in Modules/gcmodule.c
16ea0d6
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Simplify test in Modules/_testcapimodule.c
369e199
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb
Address minor review comments and add documentation.
219154a
@jbower-fb
Merge branch 'main' into gcvisitobjs
be5b7f0
@jbower-fb

jbower-fb commented Feb 24, 2023

Copy link
Copy Markdown
Contributor Author

Thank you for the feedback @erlend-aasland. I'll try to get better at PEP-7 compliance in future!

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.

@jbower-fb

jbower-fb commented Mar 8, 2023

Copy link
Copy Markdown
Contributor Author

Hey @pablogsal, any thoughts on this?

All reactions

Sorry, something went wrong.

Uh oh!

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

encukou
encukou approved these changes Mar 8, 2023
View reviewed changes

@encukou encukou 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.

API-wise, this looks good!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Include/objimpl.h
PyAPI_FUNC(int) PyGC_IsEnabled(void);


#if !defined(Py_LIMITED_API)

@encukou encukou Mar 8, 2023

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.

You can put this in Include/cpython/objimpl.h, which is only included for non-limited API. But that's not a blocker.

Sorry, something went wrong.

Uh oh!

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

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@jbower-fb jbower-fb Mar 11, 2023

Copy link
Copy Markdown
Contributor Author

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.

I'm not very familiar with the conventions here, is that what we should do with public API (even if it's unstable)?

Sorry, something went wrong.

Uh oh!

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

All reactions

@encukou encukou Mar 21, 2023

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.

Yes.

Details are in the Devguide.

Sorry, something went wrong.

Uh oh!

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

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels Mar 8, 2023
@pablogsal

pablogsal commented Mar 8, 2023

Copy link
Copy Markdown
Member

Hey @pablogsal, any thoughts on this?

Will make a review later this week. Apologies for the delay but I am a bit swamped recently

jbower-fb 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 reviewed Mar 10, 2023
View reviewed changes
Comment thread Doc/c-api/gcsupport.rst Resolved

Uh oh!

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

Comment thread Doc/c-api/gcsupport.rst Resolved

Uh oh!

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

Comment thread Doc/c-api/gcsupport.rst Resolved

Uh oh!

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

Comment thread Doc/c-api/gcsupport.rst Resolved

Uh oh!

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

Comment thread Modules/_testcapimodule.c Resolved

Uh oh!

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

Comment thread Modules/_testcapimodule.c Resolved

Uh oh!

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

jbower-fb and others added 5 commits March 11, 2023 10:54
@jbower-fb @erlend-aasland
Update Doc/c-api/gcsupport.rst
5752f1c
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Update Modules/_testcapimodule.c
1512004
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb @erlend-aasland
Update Modules/_testcapimodule.c
87a5b56
Co-authored-by: Erlend E. Aasland <[email protected]>
@jbower-fb
Minor doc tweaks from review
295f7dd
@jbower-fb
Merge branch 'python:main' into gcvisitobjs
ed06dff
pablogsal
pablogsal approved these changes Mar 13, 2023
View reviewed changes

@pablogsal pablogsal 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.

Apologies for the delay although the advantage of being late is that everyone has already done an excellent job with the reviews.

LGTM

Thanks a lot for the patience and understanding @jbower-fb and thanks for the great work :)

Sorry, something went wrong.

Uh oh!

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

jbower-fb reacted with thumbs up emoji erlend-aasland reacted with hooray emoji
All reactions
  • 👍 1 reaction
  • 🎉 1 reaction
@jbower-fb
Merge branch 'main' into gcvisitobjs
620043b
@pablogsal pablogsal changed the title gh-102013: Add PyGC_VisitObjects gh-102013: Add PyUnstable_GC_VisitObjects Mar 14, 2023
@pablogsal
pablogsal merged commit cbd3fbf into python:main Mar 14, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label Mar 14, 2023
carljm added a commit to carljm/cpython that referenced this pull request Mar 14, 2023
@carljm
Merge branch 'main' into inlinecomp2
6c5f269
* main: (50 commits)
  pythongh-102674: Remove _specialization_stats from Lib/opcode.py (python#102685)
  pythongh-102660: Handle m_copy Specially for the sys and builtins Modules (pythongh-102661)
  pythongh-102354: change python3 to python in docs examples (python#102696)
  pythongh-81057: Add a CI Check for New Unsupported C Global Variables (pythongh-102506)
  pythonGH-94851: check unicode consistency of static strings in debug mode (python#102684)
  pythongh-100315: clarification to `__slots__` docs. (python#102621)
  pythonGH-100227: cleanup initialization of global interned dict (python#102682)
  doc: Remove a duplicate 'versionchanged' in library/asyncio-task (pythongh-102677)
  pythongh-102013: Add PyUnstable_GC_VisitObjects (python#102014)
  pythonGH-102670: Use sumprod() to simplify, speed up, and improve accuracy of statistics functions (pythonGH-102649)
  pythongh-102627: Replace address pointing toward malicious web page (python#102630)
  pythongh-98831: Use DECREF_INPUTS() more (python#102409)
  pythongh-101659: Avoid Allocation for Shared Exceptions in the _xxsubinterpreters Module (pythongh-102659)
  pythongh-101524: Fix the ChannelID tp_name (pythongh-102655)
  pythongh-102069: Fix `__weakref__` descriptor generation for custom dataclasses (python#102075)
  pythongh-98169 dataclasses.astuple support DefaultDict (python#98170)
  pythongh-102650: Remove duplicate include directives from multiple source files (python#102651)
  pythonGH-100987: Don't cache references to the names and consts array in `_PyEval_EvalFrameDefault`. (python#102640)
  pythongh-87092: refactor assemble() to a number of separate functions, which do not need the compiler struct (python#102562)
  pythongh-102192: Replace PyErr_Fetch/Restore etc by more efficient alternatives (python#102631)
  ...
Fidget-Spinner pushed a commit to Fidget-Spinner/cpython that referenced this pull request Mar 27, 2023
@jbower-fb @Fidget-Spinner
pythongh-102013: Add PyUnstable_GC_VisitObjects (python#102014)
91a5bd4
warsaw pushed a commit to warsaw/cpython that referenced this pull request Apr 11, 2023
@jbower-fb @warsaw
pythongh-102013: Add PyUnstable_GC_VisitObjects (python#102014)
a69eb22
@jbower-fb
jbower-fb deleted the gcvisitobjs branch May 1, 2023 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@encukou encukou encukou approved these changes
@erlend-aasland erlend-aasland erlend-aasland left review comments
@pablogsal pablogsal pablogsal approved these changes

Uh oh!

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

Assignees

@pablogsal pablogsal

Labels

None yet

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.

6 participants

@jbower-fb @bedevere-bot @pablogsal @encukou @erlend-aasland @hauntsaninja
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.