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-106320: Remove private pylifecycle.h functions#106400

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

Merged
vstinner merged 2 commits intopython:mainfromvstinner:pycore_pylifecycle
Jul 4, 2023

Conversation

vstinner
Copy link
Member

@vstinnervstinner commentedJul 4, 2023
edited by bedevere-bot
Loading

Remove private pylifecycle.h functions: move them to the internal C API ( pycore_atexit.h, pycore_pylifecycle.h and pycore_signal.h). No longer export most of these functions.

Move _testcapi.test_atexit() to _testinternalcapi.

Remove private pylifecycle.h functions: move them to the internal CAPI ( pycore_atexit.h, pycore_pylifecycle.h and pycore_signal.h). Nolonger export most of these functions.Move _testcapi.test_atexit() to _testinternalcapi.
@gvanrossum
Copy link
Member

This broke macOS build for me. In Python/specialize.c there's a use of_PyOS_URandomNonblock but the file doesn't#include "pycore_pylifecycle.h". How did this pass CI? Anyway, I'll fix it.

gvanrossum added a commit that referenced this pull requestJul 4, 2023
…le.h (#106434)Compilation of Python/specialize.c was broken on macOS for me bygh-106400.
@vstinnervstinner deleted the pycore_pylifecycle branchJuly 5, 2023 06:17
@vstinner
Copy link
MemberAuthor

It seems like the macOS CI uses gcc. I suppose that you use clang. And clang is more strict about undefined functions. Maybe the CI should use clang?

cc@corona10

1 similar comment
@vstinner
Copy link
MemberAuthor

It seems like the macOS CI uses gcc. I suppose that you use clang. And clang is more strict about undefined functions. Maybe the CI should use clang?

cc@corona10

@corona10
Copy link
Member

corona10 commentedJul 5, 2023
edited
Loading

@vstinner
Basically, the default gcc of macOS is clang.
We need to check what's happening on GA for this use.
If you meant the compiler option, it would be worth doing it.
(Change the compiler to the clang and use clang options)

cc@ned-deily

$> gcc --versionApple clang version 14.0.0 (clang-1400.0.29.202)

@vstinner
Copy link
MemberAuthor

$> gcc --versionApple clang version 14.0.0 (clang-1400.0.29.202)

Aha, maybe@gvanrossum LLVM is more recent. LLVM clang 15 made this change:https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html

  • The -Wimplicit-function-declaration warning diagnosticnow defaults to an error in C99 and later
corona10 reacted with thumbs up emoji

@dgrisby
Copy link
Contributor

omniORBpy (which I maintain,https://www.omniorb.net/ ) is using _Py_IsFinalizing to avoid crashes in threads created from C++ during interpreter shutdown, as documented athttps://docs.python.org/3.13/c-api/init.html#c.PyEval_RestoreThread

Is there an alternative?

@vstinner
Copy link
MemberAuthor

Would you mind to open a new separated issue to request a public function replacing the removed private function? Thanks in advance.

@dgrisby
Copy link
Contributor

Would you mind to open a new separated issue to request a public function replacing the removed private function? Thanks in advance.

Here it is:#108014

Thanks.

befeleme added a commit to befeleme/uvloop that referenced this pull requestApr 30, 2024
private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13See:python/cpython#106400
befeleme added a commit to befeleme/uvloop that referenced this pull requestApr 30, 2024
private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13See:python/cpython#106400
befeleme added a commit to befeleme/uvloop that referenced this pull requestApr 30, 2024
private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13See:python/cpython#106400
befeleme added a commit to befeleme/uvloop that referenced this pull requestApr 30, 2024
private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13See:python/cpython#106400Its implementation has been the same in all supported by uvloop Pythons(3.8+), so the inlining was not conditionalized.
befeleme added a commit to befeleme/uvloop that referenced this pull requestApr 30, 2024
private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13See:python/cpython#106400Its implementation has been the same in all supported by uvloop Pythons(3.8+), so the inlining was not conditionalized.
fantix pushed a commit to MagicStack/uvloop that referenced this pull requestAug 15, 2024
private _Py_RestoreSignals() has been moved to CPython internals as of Python 3.13See:python/cpython#106400Its implementation has been the same in all supported by uvloop Pythons(3.8+), so the inlining was not conditionalized.
ludwigschwardt added a commit to ludwigschwardt/python-gnureadline that referenced this pull requestOct 17, 2024
Python 3.13 moved some private C API functions to internal header files.Seepython/cpython#106320 for a general discussion on this (glad to seethat gnureadline was at least listed as an affected PyPI package :-) ).These private functions affect us:  - _Py_SetLocaleFromEnv -> pycore_pylifecycle.h    (seepython/cpython#106400)  - _PyArg_CheckPositional, _PyArg_BadArgument -> pycore_modsupport.h    (seepython/cpython#110964)Since we can't include these anymore, patch the relevant declarations intothe module code. The alternative (add the internal headers to this package)is much messier, as we would have to pull in most of those headers.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@rhettingerrhettingerAwaiting requested review from rhettingerrhettinger is a code owner

@gpsheadgpsheadAwaiting requested review from gpsheadgpshead is a code owner

@berkerpeksagberkerpeksagAwaiting requested review from berkerpeksagberkerpeksag is a code owner

@erlend-aaslanderlend-aaslandAwaiting requested review from erlend-aaslanderlend-aasland is a code owner

@1st11st1Awaiting requested review from 1st11st1 is a code owner

@asvetlovasvetlovAwaiting requested review from asvetlovasvetlov is a code owner

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

@kumaraditya303kumaraditya303Awaiting requested review from kumaraditya303kumaraditya303 is a code owner

@willingcwillingcAwaiting requested review from willingcwillingc is a code owner

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

Successfully merging this pull request may close these issues.

5 participants
@vstinner@gvanrossum@corona10@dgrisby@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp