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

bpo-42208: Pass tstate to _PyGC_CollectNoFail() #23038

Merged
merged 1 commit into from Oct 30, 2020
Merged

bpo-42208: Pass tstate to _PyGC_CollectNoFail() #23038

merged 1 commit into from Oct 30, 2020

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Oct 30, 2020

Move private _PyGC_CollectNoFail() to the internal C API.

Remove the private _PyGC_CollectIfEnabled() which was just an alias
to the public PyGC_Collect() function since Python 3.8.

Rename functions:

  • collect() => gc_collect_main()
  • collect_with_callback() => gc_collect_with_callback()
  • collect_generations() => gc_collect_generations()

https://bugs.python.org/issue42208

Move private _PyGC_CollectNoFail() to the internal C API.

Remove the private _PyGC_CollectIfEnabled() which was just an alias
to the public PyGC_Collect() function since Python 3.8.

Rename functions:

* collect() => gc_collect_main()
* collect_with_callback() => gc_collect_with_callback()
* collect_generations() => gc_collect_generations()
@vstinner vstinner merged commit 8b34148 into python:master Oct 30, 2020
@vstinner vstinner deleted the gc_interp branch October 30, 2020 16:00
@pablogsal
Copy link
Member

This PR broke test_gc:

test test_gdb failed
Verify "py-up" followed by "py-down" ... ok
======================================================================
FAIL: test_gc (test.test_gdb.PyBtTests)
Verify that "py-bt" indicates if a thread is garbage-collecting
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-ppc64le/build/Lib/test/test_gdb.py", line 861, in test_gc
    self.assertIn('Garbage-collecting', gdb_output)
AssertionError: 'Garbage-collecting' not found in 'Breakpoint 1 at 0x102f5e04: file Python/bltinmodule.c, line 1173.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib64/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=, v=42) at Python/bltinmodule.c:1173\n1173\t{\nBreakpoint 2: file Modules/gcmodule.c, line 420.\n\nBreakpoint 2, update_refs (containers=) at Modules/gcmodule.c:421\n421\t    PyGC_Head *gc = GC_NEXT(containers);\nTraceback (most recent call first):\n  <built-in method collect of module object at remote 0x7fffea9f7d70>\n  File "<string>", line 4, in foo\n  File "<string>", line 6, in bar\n  File "<string>", line 7, in <module>\n'
----------------------------------------------------------------------
Ran 46 tests in 64.862s
FAILED (failures=1)
1 test failed again:
    test_gdb
== Tests result: FAILURE then FAILURE ==
410 tests OK.
10 

Example breakage:

https://buildbot.python.org/all/#/builders/90/builds/246/steps/5/logs/stdio

@vstinner
Copy link
Member Author

This PR broke test_gc:

Oops, I wrote PR #23041 to update python-gdb.py.

It's strange: test_gdb passed on Travis CI!? test_gdb was skipped on the Ubuntu job since gdb is not installed there:
python/core-workflow#383

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Move private _PyGC_CollectNoFail() to the internal C API.

Remove the private _PyGC_CollectIfEnabled() which was just an alias
to the public PyGC_Collect() function since Python 3.8.

Rename functions:

* collect() => gc_collect_main()
* collect_with_callback() => gc_collect_with_callback()
* collect_generations() => gc_collect_generations()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants