Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-132775: Add _PyFunction_GetXIData()#133481

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

ericsnowcurrently
Copy link
Member

@ericsnowcurrentlyericsnowcurrently commentedMay 6, 2025
edited by bedevere-appbot
Loading

(This is based ongh-133480, thus only the last commit.)

@ericsnowcurrentlyericsnowcurrently marked this pull request as ready for reviewMay 8, 2025 16:08
@ericsnowcurrentlyericsnowcurrently added the needs backport to 3.14bugs and security fixes labelMay 8, 2025
if (_PyFunction_VerifyStateless(tstate, func) < 0) {
PyObject *cause = _PyErr_GetRaisedException(tstate);
assert(cause != NULL);
const char *msg = "non-stateless functions are not shareable";
Copy link
Contributor

Choose a reason for hiding this comment

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

Not confusing, but the triple negation (non, less, not) looks a bit redundant. I do not thinkNotShareableError needs "not shareable" in the message.

ericsnowcurrently reacted with thumbs up emoji
@ericsnowcurrentlyericsnowcurrentlyenabled auto-merge (squash)May 12, 2025 21:44
@ericsnowcurrentlyericsnowcurrently merged commit8cf4947 intopython:mainMay 12, 2025
38 checks passed
@miss-islington-app
Copy link

Thanks@ericsnowcurrently for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 12, 2025
(cherry picked from commit8cf4947)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
@bedevere-app
Copy link

GH-133955 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelMay 12, 2025
@ericsnowcurrentlyericsnowcurrently deleted the add-pyfunction-getxidata branchMay 12, 2025 22:13
@bedevere-bot
Copy link

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

Hi! The buildbotAMD64 Debian root 3.x (tier-1) has failed when building commit8cf4947.

What do you need to do:

  1. Don't panic.
  2. Checkthe 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/#/builders/345/builds/11348) and take a look at the build logs.
  4. Check if the failure is related to this commit (8cf4947) 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/#/builders/345/builds/11348

Failed tests:

  • test_interpreters

Failed subtests:

  • test_build_c11 - test.test_cext.TestExt.test_build_c11
  • test_threads - test.test_io.CBufferedReaderTest.test_threads
  • test_first_completed_some_already_completed - test.test_concurrent_futures.test_wait.ProcessPoolForkserverWaitTest.test_first_completed_some_already_completed
  • test_build - test.test_cext.TestExt.test_build
  • test_build_cpp11 - test.test_cppext.TestCPPExt.test_build_cpp11

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

==

Click to see traceback logs
Traceback (most recent call last):  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py", line198, in_run_module_as_mainreturn _run_code(code, main_globals,None,"__main__", mod_spec)  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/runpy.py", line88, in_run_codeexec(code, run_globals)~~~~^^^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/build/test_python_1383957æ/tempcwd/env/lib/python3.15/site-packages/pip/__main__.py", line22, in<module>from pip._internal.cli.mainimport mainas _main  File"/root/buildarea/3.x.angelico-debian-amd64/build/build/test_python_1383957æ/tempcwd/env/lib/python3.15/site-packages/pip/_internal/__init__.py", line3, in<module>from pip._internal.utilsimport _log  File"/root/buildarea/3.x.angelico-debian-amd64/build/build/test_python_1383957æ/tempcwd/env/lib/python3.15/site-packages/pip/_internal/utils/_log.py", line8, in<module>import logging  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/logging/__init__.py", line26, in<module>import sys, os, time, io, re, traceback, warnings, weakref, collections.abc  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/traceback.py", line13, in<module>import _colorize  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/_colorize.py", line6, in<module>from dataclassesimport dataclass, field, Field  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/dataclasses.py", line5, in<module>import inspect  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/inspect.py", line3317, in<module>classBufferFlags(enum.IntFlag):...<18 lines>...WRITE=0x200  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/inspect.py", line3319, inBufferFlagsWRITABLE=0x1^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/enum.py", line398, in__setitem__elifself._cls_nameisnotNoneand _is_internal_class(self._cls_name, value):^^^^^^^^^^^^^^^^^^NameError:name '_cls_name' is not defined. Did you mean: 'self._cls_name'?ERRORTraceback.test_colorized_traceback_is_the_default) ... okTracebackLegacyErrorCaretTests.test_caret_for_binary_operators_multiline) ... okTracebackException.test_traceback_header) ... okTracebackErrorCaretTests.test_caret_for_subscript) ... okTracebackLegacyErrorCaretTests.test_caret_multiline_expression_bin_op) ... okTracebackCases.test_format_exception_group_syntax_error_with_custom_values) ... okTracebackException.test_comparison_params_variations) ... okTracebackException.test_no_locals) ... okTracebackCases.test_format_exception_group_explicit_class) ... okTracebackException_ExceptionGroups.test_exception_group_format_exception_only) ... okTracebackException.test_context) ... okTracebackLegacyErrorCaretTests.test_caret_multiline_expression_syntax_error) ... okTracebackErrorCaretTests.test_caret_for_binary_operators_with_unicode) ... okTracebackCases.test_print_exception) ... okTracebackException.test_print) ... okTraceback (most recent call last):  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_io.py", line1633, intest_threads    random.shuffle(l)~~~~~~~~~~~~~~^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/random.py", line363, inshuffle    x[i], x[j]= x[j], x[i]~^^^TypeError:list indices must be integers or slices, not RandomTracebackLegacyErrorCaretTests.test_many_lines_binary_op) ... okTracebackFormat.test_unhashable) ... okTracebackErrorCaretTests.test_caret_for_binary_operators_two_char) ... okTracebackErrorCaretTests.test_specialization_variations) ... okTracebackLegacyErrorCaretTests.test_specialization_variations) ... okTracebackErrorCaretTests.test_memory_error) ... okTracebackErrorCaretTests.test_caret_multiline_expression) ... okTracebackErrorCaretTests.test_byte_offset_with_wide_characters_term_highlight) ... okTracebackCases.test_format_exception_group_with_note) ... okTracebackException.test_no_refs_to_exception_and_traceback_objects) ... okTracebackException.test_unhashable) ... okTraceback (most recent call last):  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/string_tests.py", line347, intest_find_periodic_pattern    check_pattern(rr)~~~~~~~~~~~~~^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/string_tests.py", line339, incheck_pattern    right=''.join(choices('abcdef',k=rr(2000)))~~~~~~~^^^^^^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/random.py", line473, inchoicesreturn [population[floor(random()* n)]for iin _repeat(None, k)]~~~~~~~~~^~~TypeError:unsupported operand type(s) for *: 'float' and 'Random'TracebackCases.test_caret) ... okTracebackErrorCaretTests.test_caret_for_binary_operators_with_spaces_and_parenthesis) ... okTracebackCases.test_print_last) ... okTracebackErrorCaretTests.test_byte_offset_wide_chars_subscript) ... okTracebackFormat.test_recursive_traceback) ... okTracebackCases.test_extract_stack) ... okTracebackErrorCaretTests.test_byte_offset_with_emojis_term_highlight) ... okTracebackErrorCaretTests.test_line_with_unicode) ... okTracebackException.test_compact_with_cause) ... okTracebackCases.test_format_exception_group_syntax_error) ... okTracebackLegacyErrorCaretTests.test_byte_offset_with_wide_characters_term_highlight) ... okTracebackErrorCaretTests.test_byte_offset_multiline) ... okTracebackCases.test_encoded_file) ... okTracebackCases.test_recursion_error_during_traceback) ... okTraceback (most recent call last):  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_concurrent_futures/test_wait.py", line65, intest_first_completed_some_already_completed    future1.result()# wait for job to finish~~~~~~~~~~~~~~^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/concurrent/futures/_base.py", line450, inresultreturnself.__get_result()~~~~~~~~~~~~~~~~~^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/concurrent/futures/_base.py", line395, in__get_resultraiseself._exceptionconcurrent.futures.process.BrokenProcessPool:A process in the process pool was terminated abruptly while the future was running or pending.TracebackErrorCaretTests.test_caret_multiline_expression_syntax_error) ... okTracebackLegacyErrorCaretTests.test_caret_for_binary_operators_with_spaces_and_parenthesis) ... okTracebackLegacyErrorCaretTests.test_caret_for_call_unicode) ... okTracebackLegacyErrorCaretTests.test_byte_offset_with_wide_characters_middle) ... okTracebackErrorCaretTests.test_basic_caret) ... okTracebackLegacyErrorCaretTests.test_caret_for_subscript) ... okTracebackFormat.test_print_stack) ... okTracebackLegacyErrorCaretTests.test_anchors_for_simple_return_statements_are_elided) ... okTracebackFormat.test_traceback_format) ... okTracebackException.test_smoke_builtin) ... okTracebackLegacyErrorCaretTests.test_traceback_very_long_line) ... okTracebackException_ExceptionGroups.test_max_group_width) ... okTracebackException.test_long_context_chain) ... okTracebackCases.test_format_exception_group_with_tracebacks) ... okTracebackLegacyErrorCaretTests.test_byte_offset_with_emojis_term_highlight) ... okTracebackErrorCaretTests.test_many_lines_binary_op) ... okTracebackLegacyErrorCaretTests.test_caret_for_subscript_unicode) ... okTracebackCases.test_format_exception_only_bad__str__) ... okTracebackCases.test_bad_indentation) ... okTracebackLegacyErrorCaretTests.test_basic_caret) ... okTracebackErrorCaretTests.test_caret_for_call_unicode) ... okTracebackLegacyErrorCaretTests.test_caret_for_binary_operators_multiline_two_char) ... okTracebackErrorCaretTests.test_caret_exception_group) ... okTraceback (most recent call last):  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cppext/__init__.py", line43, intest_build_cpp11self.check_build('_testcpp11ext',std='c++11')~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cppext/__init__.py", line58, incheck_buildself._check_build(extension_name, python_exe,~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^                      std=std, limited=limited)^^^^^^^^^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cppext/__init__.py", line95, in_check_build    run_cmd('Install', cmd)~~~~~~~^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cppext/__init__.py", line76, inrun_cmd    subprocess.run(cmd,check=True,env=env)~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line577, inrunraise CalledProcessError(retcode, process.args,                             output=stdout, stderr=stderr)subprocess.CalledProcessError:Command '['/root/buildarea/3.x.angelico-debian-amd64/build/build/test_python_1383957æ/tempcwd/env/bin/python', '-X', 'dev', '-m', 'pip', 'install', '--no-build-isolation', '/root/buildarea/3.x.angelico-debian-amd64/build/build/test_python_1383957æ/tempcwd/pkg', '-v']' returned non-zero exit status 1.TracebackLegacyErrorCaretTests.test_multiline_method_call_c) ... okTracebackException.test_cause) ... okTracebackLegacyErrorCaretTests.test_many_lines_no_caret) ... okTracebackCases.test_format_exception_group_multiple_exceptions) ... okTracebackCases.test_base_exception) ... okTracebackErrorCaretTests.test_many_lines_no_caret) ... okTracebackLegacyErrorCaretTests.test_caret_for_binary_operators_with_unicode) ... okTracebackException_ExceptionGroups.test_dont_swallow_subexceptions_of_falsey_exceptiongroup) ... okTracebackException.test_no_save_exc_type) ... okTracebackException_ExceptionGroups.test_exception_group_format_exception_onlyi_recursive) ... okTracebackException.test_lookup_lines) ... okTracebackLegacyErrorCaretTests.test_caret_multiline_expression) ... okTracebackLegacyErrorCaretTests.test_secondary_caret_not_elided) ... okTracebackException.test_compact_no_cause) ... okTracebackException.test_comparison_equivalent_exceptions_are_equal) ... okTracebackErrorCaretTests.test_caret_for_binary_operators_multiline_with_unicode) ... okTracebackLegacyErrorCaretTests.test_decorator_application_lineno_correct) ... okTracebackCases.test_signatures) ... okTracebackLegacyErrorCaretTests.test_many_lines) ... okTracebackException_ExceptionGroups.test_max_group_depth) ... okTracebackLegacyErrorCaretTests.test_memory_error) ... okTracebackErrorCaretTests.test_caret_for_binary_operators_multiline) ... okTracebackCases.test_format_exception_group_multiline_messages) ... okTracebackLegacyErrorCaretTests.test_multiline_method_call_a) ... okTracebackLegacyErrorCaretTests.test_caret_for_binary_operators_multiline_with_unicode) ... okTracebackErrorCaretTests.test_multiline_method_call_a) ... okTracebackErrorCaretTests.test_wide_characters_unicode_with_problematic_byte_offset) ... okTracebackCases.test_print_exception_exc) ... okTracebackErrorCaretTests.test_many_lines) ... okTracebackErrorCaretTests.test_caret_multiline_expression_bin_op) ... okTracebackLegacyErrorCaretTests.test_caret_exception_group) ... okTracebackCases.test_format_exception_group_with_cause) ... okTracebackErrorCaretTests.test_traceback_specialization_with_syntax_error) ... okTracebackFormat.test_exception_group_deep_recursion_capi) ... okTracebackErrorCaretTests.test_secondary_caret_not_elided) ... okTracebackLegacyErrorCaretTests.test_wide_characters_unicode_with_problematic_byte_offset) ... okTracebackCases.test_format_exception_only_exc) ... okTracebackCases.test_format_exception_group_nested_with_notes) ... okTracebackCases.test_clear) ... okTracebackErrorCaretTests.test_anchors_for_simple_assign_statements_are_elided) ... okTracebackException.test_locals) ... okTracebackFormat.test_print_exception_bad_type_python) ... okTraceback.test_colorized_traceback_from_exception_group) ... okTracebackErrorCaretTests.test_multiline_method_call_c) ... okTracebackException_ExceptionGroups.test_exception_group_format) ... okTracebackLegacyErrorCaretTests.test_caret_for_binary_operators) ... okTracebackErrorCaretTests.test_caret_for_call_with_spaces_and_parenthesis) ... okTracebackException.test_limit) ... okTracebackFormat.test_exception_group_deep_recursion_traceback) ... okTracebackLegacyErrorCaretTests.test_caret_for_subscript_multiline) ... okTracebackLegacyErrorCaretTests.test_caret_for_subscript_with_spaces_and_parenthesis) ... okTracebackErrorCaretTests.test_caret_for_subscript_unicode) ... okTracebackCases.test_format_exception_exc) ... okTracebackCases.test_no_caret_with_no_debug_ranges_flag_python_traceback) ... okTracebackErrorCaretTests.test_caret_for_binary_operators) ... okTracebackErrorCaretTests.test_caret_for_subscript_multiline) ... okTracebackFormat.test_format_stack) ... okTracebackFormat.test_print_exception_bad_type_capi) ... okTraceback.test_colorized_syntax_error) ... okTracebackLegacyErrorCaretTests.test_caret_for_call_multiline) ... okTracebackFormat.test_traceback_format_with_cleared_frames) ... okTracebackErrorCaretTests.test_anchors_for_simple_return_statements_are_elided) ... okTraceback.test_colorized_traceback) ... okTracebackException.test_comparison_basic) ... okTracebackException.test_from_exception) ... okTracebackFormat.test_stack_format) ... okTracebackErrorCaretTests.test_caret_for_call_multiline) ... okTracebackErrorCaretTests.test_caret_for_subscript_with_spaces_and_parenthesis) ... okTracebackLegacyErrorCaretTests.test_byte_offset_wide_chars_subscript) ... okTracebackErrorCaretTests.test_caret_for_binary_operators_multiline_two_char) ... okTracebackException.test_smoke_user_exception) ... okTracebackLegacyErrorCaretTests.test_traceback_specialization_with_syntax_error) ... okTraceback (most recent call last):  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cext/__init__.py", line37, intest_build_c11self.check_build('_test_c11_cext',std='c11')~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cext/__init__.py", line56, incheck_buildwith support.setup_venv_with_pip_setuptools(venv_dir)as python_exe:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/contextlib.py", line141, in__enter__returnnext(self.gen)  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line2458, insetup_venv_with_pip_setuptools    run_command(cmd)~~~~~~~~~~~^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line2448, inrun_command    subprocess.run(cmd,check=True)~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line577, inrunraise CalledProcessError(retcode, process.args,                             output=stdout, stderr=stderr)subprocess.CalledProcessError:Command '['/root/buildarea/3.x.angelico-debian-amd64/build/python', '-X', 'dev', '-m', 'venv', 'env']' returned non-zero exit status 1.TracebackCases.test_format_exception_group) ... okTracebackErrorCaretTests.test_byte_offset_with_wide_characters_middle) ... okTracebackLegacyErrorCaretTests.test_byte_offset_multiline) ... okTracebackLegacyErrorCaretTests.test_caret_for_call_with_spaces_and_parenthesis) ... okTracebackErrorCaretTests.test_traceback_very_long_line) ... okTracebackLegacyErrorCaretTests.test_caret_for_binary_operators_two_char) ... okTracebackCases.test_exception_is_None) ... okTracebackErrorCaretTests.test_decorator_application_lineno_correct) ... okTracebackLegacyErrorCaretTests.test_caret_for_call) ... okTracebackException_ExceptionGroups.test_comparison) ... okTracebackException_ExceptionGroups.test_exception_group_construction) ... okTracebackCases.test_format_exception_group_multiline2_messages) ... okTracebackErrorCaretTests.test_caret_in_type_annotation) ... okTracebackErrorCaretTests.test_multiline_method_call_b) ... okTraceback (most recent call last):  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cext/__init__.py", line34, intest_buildself.check_build('_test_cext')~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_cext/__init__.py", line56, incheck_buildwith support.setup_venv_with_pip_setuptools(venv_dir)as python_exe:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/contextlib.py", line141, in__enter__returnnext(self.gen)  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line2458, insetup_venv_with_pip_setuptools    run_command(cmd)~~~~~~~~~~~^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/__init__.py", line2448, inrun_command    subprocess.run(cmd,check=True)~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^  File"/root/buildarea/3.x.angelico-debian-amd64/build/Lib/subprocess.py", line577, inrunraise CalledProcessError(retcode, process.args,                             output=stdout, stderr=stderr)subprocess.CalledProcessError:Command '['/root/buildarea/3.x.angelico-debian-amd64/build/python', '-X', 'dev', '-m', 'venv', 'env']' returned non-zero exit status 1.TracebackCases.test_print_traceback_at_exit) ... okTracebackLegacyErrorCaretTests.test_line_with_unicode) ... okTracebackCases.test_format_exception_group_without_show_group) ... okTracebackCases.test_no_caret_with_no_debug_ranges_flag) ... okTracebackLegacyErrorCaretTests.test_caret_in_type_annotation) ... okTracebackLegacyErrorCaretTests.test_multiline_method_call_b) ... okTracebackLegacyErrorCaretTests.test_anchors_for_simple_assign_statements_are_elided) ... okTracebackCases.test_format_base_exception_group) ... okTracebackCases.test_nocaret) ... okTracebackException.test_dont_swallow_cause_or_context_of_falsey_exception) ... okTracebackErrorCaretTests.test_caret_for_call) ... ok

ericsnowcurrently added a commit that referenced this pull requestMay 12, 2025
(cherry picked from commit8cf4947, AKAgh-133481)Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@neoneneneoneneneonene left review comments

Assignees
No one assigned
Labels
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@ericsnowcurrently@bedevere-bot@neonene

[8]ページ先頭

©2009-2025 Movatter.jp