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-125286: Share the Main Refchain With Legacy Interpreters#125709

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
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
53cfb82
Share the main refchain with legacy interpreters.
ericsnowcurrentlyOct 18, 2024
b2bf609
Add a has_own_refchain() helper function.
ericsnowcurrentlyOct 18, 2024
203c112
Drop _Py_NormalizeImmortalReference().
ericsnowcurrentlyOct 21, 2024
ffe2633
Drop has_own_refchain() calls where not needed.
ericsnowcurrentlyOct 21, 2024
8d52258
Call _PyObject_InitState() *after* computing the feature flags.
ericsnowcurrentlyOct 21, 2024
216dde2
Revert "Call _PyObject_InitState() *after* computing the feature flags."
ericsnowcurrentlyOct 21, 2024
fbc4e2d
Revert "Drop has_own_refchain() calls where not needed."
ericsnowcurrentlyOct 21, 2024
cb06847
has_own_refchain() -> maybe_fix_refchain()
ericsnowcurrentlyOct 21, 2024
7aa33a9
Handle late runtime fini correctly.
ericsnowcurrentlyOct 21, 2024
3421a19
Pass the interpreter config to init_interpreter().
ericsnowcurrentlyOct 22, 2024
b276454
Revert "Pass the interpreter config to init_interpreter()."
ericsnowcurrentlyOct 22, 2024
7ab086c
Move the _PyObject_InitState() call out of init_interpreter().
ericsnowcurrentlyOct 22, 2024
9d539f6
Add docs and a What's New entry
encukouOct 22, 2024
d80fe6a
Fix typos.
ericsnowcurrentlyOct 22, 2024
1360d86
Do not try to destroy the refchain if it is NULL.
ericsnowcurrentlyOct 22, 2024
090b528
Docs: Link to the new sys.getobjects() docs
encukouOct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Revert "Call _PyObject_InitState() *after* computing the feature flags."
This reverts commit8d52258.
  • Loading branch information
@ericsnowcurrently
ericsnowcurrently committedOct 21, 2024
commit216dde2c3b1a0b57033e62837a92a333fa957fd3
10 changes: 0 additions & 10 deletionsPython/pylifecycle.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -674,16 +674,6 @@ pycore_create_interpreter(_PyRuntimeState *runtime,
return status;
}

// Ideally we would call this in _PyInterpreterState_New(), but it
// requires interp->feature_flags to be correctly set already.
// That mwans we'd have to compute the feature flags before
// creating the interpreter and passing them in there, which we
// should probably be doing anyway.
status = _PyObject_InitState(interp);
if (_PyStatus_EXCEPTION(status)) {
return status;
}

// initialize the interp->obmalloc state. This must be done after
// the settings are loaded (so that feature_flags are set) but before
// any calls are made to obmalloc functions.
Expand Down
7 changes: 4 additions & 3 deletionsPython/pystate.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -629,9 +629,10 @@ init_interpreter(PyInterpreterState *interp,
assert(next != NULL || (interp == runtime->interpreters.main));
interp->next = next;

// We would call _PyObject_InitState() here, but it needs the
// interp->feature_flags to be correctly set already, which we don't
// currently do.
PyStatus status = _PyObject_InitState(interp);
if (_PyStatus_EXCEPTION(status)) {
return status;
}

_PyEval_InitState(interp);
_PyGC_InitState(&interp->gc);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp