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-108240: _PyCapsule_SetTraverse() rejects NULL callbacks #108417

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Aug 24, 2023

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

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

Thanks! :)

@vstinner vstinner merged commit a35d48d into python:main Aug 24, 2023
@vstinner vstinner deleted the capsule_traverse2 branch August 24, 2023 14:38
@vstinner
Copy link
Member Author

I don't think that it makes sense to call _PyCapsule_SetTraverse() with NULL traverse function. If a traverse function is defined, it would look suspicious that there is no associated clear function. So yeah, I think that it's a better API to require both callbacks to be non-NULL.

@vstinner
Copy link
Member Author

Thanks for your post-merge review :-)

@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot aarch64 RHEL8 LTO 3.x has failed when building commit a35d48d.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/338/builds/4868) and take a look at the build logs.
  4. Check if the failure is related to this commit (a35d48d) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/338/builds/4868

Summary of the results of the build (if available):

== Tests result: ENV CHANGED ==

441 tests OK.

10 slowest tests:

  • test_concurrent_futures: 2 min 21 sec
  • test_gdb: 2 min 21 sec
  • test_signal: 1 min 12 sec
  • test.test_multiprocessing_spawn.test_processes: 40.9 sec
  • test_io: 38.3 sec
  • test_socket: 35.3 sec
  • test.test_multiprocessing_forkserver.test_processes: 34.1 sec
  • test_math: 34.0 sec
  • test_imaplib: 32.2 sec
  • test_subprocess: 28.4 sec

1 test altered the execution environment:
test_interpreters

14 tests skipped:
test.test_asyncio.test_windows_events
test.test_asyncio.test_windows_utils test_devpoll test_ioctl
test_kqueue test_launcher test_startfile test_tkinter test_ttk
test_winconsoleio test_winreg test_winsound test_wmi
test_zipfile64

Total duration: 2 min 30 sec

Click to see traceback logs
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1266, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1237, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 841, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1000, in exec_module
  File "<frozen importlib._bootstrap_external>", line 1096, in get_code
  File "<frozen importlib._bootstrap_external>", line 1195, in get_data
TypeError: descriptor 'close' for '_io.BufferedReader' objects doesn't apply to a '_io.FileIO' object


Traceback (most recent call last):
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/threading.py", line 1059, in _bootstrap_inner
    self.run()
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/threading.py", line 996, in run
    self._target(*self._args, **self._kwargs)
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/test/test_interpreters.py", line 481, in task
    interp = interpreters.create()
             ^^^^^^^^^^^^^^^^^^^^^
  File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-aarch64.lto/build/Lib/test/support/interpreters.py", line 25, in create
    id = _interpreters.create(isolated=isolated)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: interpreter creation failed
k

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.

3 participants