← Winnitude! Search  ·  Reader Mode (3035 ms)
Links: Stay in Reader Retro Site Converter Retro Mode: OFF Original Page ↗
GITHUB · 250 LINKS

Rename README to README.rst and enhance formatting by vstinner · Pull Request #2 · python/cpython

Repository navigation

Rename README to README.rst and enhance formatting - #2


Merged
vstinner merged 1 commit into python:master from vstinner:README Feb 11, 2017
Merged

Rename README to README.rst and enhance formatting #2 vstinner merged 1 commit into python:master from vstinner:README

Conversation

vstinner commented Feb 10, 2017 · edited Loading



Copy link Copy Markdown
Member

README.rst is recognized by GitHub which will render the README as reStructured text (nice!), instead of plain text.

Example with my tiny project https://github.com/haypo/perf which has a README.rst file.

the-knights-who-say-ni added the CLA signed label Feb 10, 2017

vstinner commented Feb 10, 2017



Copy link Copy Markdown
Member

Author

I checked if the "README" file was referenced directly somewhere: I only found Makefile.pre.in.

zware commented Feb 10, 2017



Copy link Copy Markdown
Member

This could use some additional formatting enhancement, such as changing things like "./configure --help" to

``./configure --help``

Also, links can be turned into linked text rather than written out URLs.

vstinner commented Feb 10, 2017



Copy link Copy Markdown
Member

Author

@zware : I hesitated, but ok: I made these changes.

I also added a link to the python-ideas mailing list, and I updated the Release Schedule to the Python 3.7 PEP.

refi64 mentioned this pull request Feb 10, 2017 Convert READMEs to rst #5 Closed merwok reviewed Feb 11, 2017
View reviewed changes
zware requested changes Feb 11, 2017
View reviewed changes

zware left a comment



Copy link Copy Markdown
Member

Choose a reason for hiding this comment

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

A couple of minor things, but mostly looks good!

Comment thread README.rst
Outdated
Comment thread README.rst
Outdated
Rename README to README.rst and enhance formatting a44be7d
Update also the Release Schedule to Python 3.7.

codecov
Bot
commented Feb 11, 2017



Copy link Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (master@4538ddc). Click here to learn what that means .

@@            Coverage Diff            @@
##             master       #2   +/-   ##
=========================================
  Coverage          ?   82.37%           
=========================================
  Files             ?     1427           
  Lines             ?   350948           
  Branches          ?        0           
=========================================
  Hits              ?   289087           
  Misses            ?    61861           
  Partials          ?        0

Continue to review full report at Codecov .

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov . Last update 4538ddc...a44be7d . Read the comment docs .

vstinner commented Feb 11, 2017



Copy link Copy Markdown
Member

Author

Ok, it seems like Eric and Zach want :pep:537: so I made this change.

But I prefer to restrict this change to converting README to README.rst and fix/enhance reST syntax. If you want to more general update/enhancements of README, I suggest to work on a new change based on mine.

zware approved these changes Feb 11, 2017
View reviewed changes

zware left a comment



Copy link Copy Markdown
Member

Choose a reason for hiding this comment

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

Fair enough :)

vstinner merged commit d783b01 into python : master Feb 11, 2017 vstinner deleted the README branch February 11, 2017 01:21

vstinner commented Feb 11, 2017



Copy link Copy Markdown
Member

Author

And the winner is .... http://www.python.org/dev/peps/pep-0537 => HTTP link. But since each change now requires a PR, I'm not interested to write a PR just to replace HTTP with HTTPS :-p

zware commented Feb 11, 2017



Copy link Copy Markdown
Member

I'd recommend to report that as a bug to Github :). It is at least redirected to https automatically.

nedbat mentioned this pull request Feb 11, 2017 Rename Doc/README.txt to Doc/README.rst #18 Closed zware referenced this pull request in zware/cpython Feb 14, 2017 Backport master's README.rst to 3.6 37c0cb7
Includes GH-2, pythonGH-70, pythonGH-73, and pythonGH-21.
zware mentioned this pull request Feb 14, 2017 Backport master's README.rst to 3.6 #86 Merged zware added a commit that referenced this pull request Feb 15, 2017 Backport master's README.rst to 3.6 (GH-86) 1e8cc88
Includes GH-2, GH-70, GH-73 (GH-79), and GH-21.
vstinner mentioned this pull request Feb 15, 2017 Rename Doc/README.txt to Doc/README.rst and add formatting #104 Merged

Mariatta commented Feb 25, 2017



Copy link Copy Markdown
Member

Do we want to backport this to 3.5 and 2.7?

Mariatta added needs backport to 2.7 labels Feb 25, 2017

vstinner commented Feb 25, 2017 via email



Copy link Copy Markdown
Member

Author
This change causes issues with Windows installer, check with Steve Dower (sorry I don't recall the bpo number).

Mariatta commented Feb 25, 2017



Copy link Copy Markdown
Member

Thanks @Haypo . I saw the messages in http://bugs.python.org/issue29579 . Seems like we won't be backporting readme changes to 3.5 and 2.7.
I'll remove the labels.

Mariatta removed needs backport to 2.7 labels Feb 25, 2017 zooba referenced this pull request in zooba/cpython May 1, 2018 Try properly installing dependencies #2 d0440d3 zooba referenced this pull request in zooba/cpython May 1, 2018 Try properly installing Python's build dependencies #2 d1629d1 native-api pushed a commit to native-api/cpython that referenced this pull request Jun 5, 2018 Merge pull request python#2 from native-api/roseman_2 8bf32fd
python#7287 (comment)
sharktide added a commit to sharktide/cpython that referenced this pull request Nov 16, 2025 Remove unrelated changes python#2 6ef05e3 sergey-miryanov mentioned this pull request Dec 18, 2025 Observed memory leak in ssl library: Python 3.14 GC issue #142516 Closed SonicField added a commit to SonicField/cpython that referenced this pull request Jan 19, 2026 FTP: Add exhaustive phase timing instrumentation eef25ad
Add timing for all intermediate GC phases to diagnose the 50-80ms gap
between timed phases and total gc.collect() time.

New timing fields:
- scan_heap_ns: parallel scan_heap phase
- disable_deferred_ns: disable deferred refcounting loop
- find_weakrefs_ns: find_weakref_callbacks
- stw1_ns: StartTheWorld python#1
- objs_decref_ns: cleanup_worklist(objs_to_decref)
- weakref_callbacks_ns: call_weakref_callbacks
- finalize_ns: finalize_garbage
- stw2_ns: StopTheWorld python#2
- resurrection_ns: handle_resurrected_objects
- freelists_ns: _PyGC_ClearAllFreeLists
- clear_weakrefs_ns: clear_weakrefs
- stw3_ns: StartTheWorld python#3

All values exposed via gc.get_parallel_stats()['phase_timing'].
Qanux mentioned this pull request Feb 11, 2026 heap-buffer-overflow in functools.partial.__repr__() #144475 Closed ngoldbaum mentioned this pull request Mar 6, 2026 Remove deprecated and undocumented function ctypes.SetPointerType #133866 Closed KowalskiThomas mentioned this pull request Mar 9, 2026 gh-145681: do not deallocate list buffer in _PyList_AsTupleAndClear #145680 Merged SonicField added a commit to SonicField/cpython that referenced this pull request Mar 30, 2026 Fix free-list allocator mismatch for deopted JIT generators (ASAN roo... f772800
...t cause python#2)

Deopted JIT generators have their type changed from JitGen type to
PyGen_Type during deopt. jitgen_dealloc then routed them to
original_gen_dealloc which calls PyMem_RawFree. But the memory was
allocated from JitGenFreeList's pool (operator new), not malloc.

Fix: always use Cix_gen_dealloc_with_custom_free for ALL generators.
It routes PyObject_GC_Del through Ci_free_jit_list_gen which checks
fromThisArena() and returns pool-allocated generators to the free list
instead of calling PyMem_RawFree.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 22, 2026 W3 Step 5: rc_oracle_self_test.sh -- falsifier validator 4f591a1
Push 44 W3 Step 5 (final): self-test script that validates the W3 R4
oracle's diagnostic capability via 3 falsifiers + synthetic injection.

Per theologian 2026-04-22 02:30:08Z W3 spec falsifier:
  "inject a synthetic refcount bug into the C path  --  scripts/
  rc_diff_oracle.sh produces non-empty output. If diff is empty under
  injection, oracle is non-functional and W3 has not delivered the
  diagnostic capability it promised."

Script structure:
  --check mode: pre-conditions only (3 nm-based assertions)
  default: pre-conditions + Phase A (clean diff = empty) + Phase B
           (injected diff = non-empty) + post-restore verification

FALSIFIERS validated:
  python#1  --  production python has 0 rc_oracle symbols (RC_ORACLE undefined,
       dispatcher block ABSENT from compiled binary). VERIFIED via
       --check mode at HEAD a99db92: 'PASS: production python has 0
       rc_oracle symbols'.
  python#2  --  libphoenix_rc_oracle.a exports rc_oracle_run T-symbol. VERIFIED:
       'PASS: scratch lib exports rc_oracle_run (C entry point)'.
  python#3  --  python_rc_cpp has rc_oracle_run T-symbol. PENDING  --  operator must
       run out-of-band link via the recipe in scripts/build_oracle.sh
       tail (per supervisor 02:51:14Z option (c)).

INJECTION mechanism:
  Phase B comments out the FIRST 'phx_rc_emit_incref' call site in
  Python/jit/hir/refcount_pass_c.c via sed. Rebuilds C path. Runs
  rc_diff_oracle.sh and asserts non-empty diff. Restores via backup +
  rebuild. Final verification: post-restore diff is empty.

  Injection target chosen for stability: phx_rc_emit_incref is a
  high-frequency call across all refcount_insertion paths; commenting
  one removes one Incref → guaranteed runtime divergence under
  Py_REF_DEBUG (under-count → leak) AND under PYDEBUG (use-after-free).

  Injection is reversible: cp $INJECT_TARGET.oracle_backup back +
  rebuild. trap EXIT ensures restore even on script error.

Per supervisor 02:51:14Z option (c): out-of-band link of python_rc_cpp
is operator-driven (not embedded in this script), since W3 is a
one-shot oracle resurrection; no permanent Makefile.pre.in touch.

Pre-commit verification:
  bash -n: SYNTAX OK
  scripts/rc_oracle_self_test.sh --check: pre-conditions python#1, python#2 PASS;
  python#3 expected to FAIL until operator runs the link recipe.

Push 44 W3 batch is now 2 commits (per supervisor 02:51:14Z amended):
  a99db92  --  W3 Steps 1-4 bundled (scratch lib + dispatcher + adapter)
  THIS COMMIT  --  Step 5 self-test
ABBA cap 15 → 17. MANDATORY ABBA + auto-compile re-experiment after
push 44 lands per pre-authorization.

Process lesson applied (per supervisor 02:51:14Z): explicit
'git add scripts/rc_oracle_self_test.sh' (single file) + 'git diff
--cached --stat' verification BEFORE commit, to avoid the over-broad
staging that produced a99db92's bundled scope.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 22, 2026 docs: REABSORB-WHEN comment on hir_builder_emit_awaited_call_tail_c 149b7e2
Per pythia python#78 python#2 [chat L1986] orphan-bridge risk + supervisor [chat L1990]
authorization (option b) + theologian [chat L1991] volunteer + landing.

Adds a 5-line comment block above the bridge function that names the
PartialConversion artifact origin + the trigger condition for
reabsorbing the bridge into a full emitAnyCall C body.

Comment text:
  PARTIAL CONVERSION ARTIFACT  --  emitAnyCall await-tail extracted while
  emitAnyCall opcode-switch + 3 INVOKE_* sub-methods (emitInvokeFunction,
  emitInvokeNative, emitInvokeMethod) remain C++. REABSORB WHEN: Tier 6
  INVOKE_* family fully converts to C; then emitAnyCall fully converts and
  this bridge can inline back into the full C body.

Addresses pythia python#78 python#2 'orphan-bridge if Tier 6 INVOKE_* defers' concern
by anchoring the reabsorb-trigger in source (not just chat history),
ensuring future readers can locate the architectural decision context
without scrollback.

Authorship: theologian (volunteered + drafted); generalist (committed
per role boundary  --  theologian = design/advisory, generalist = commits).

Authorization chain:
  - pythia python#78 python#2 surfaced bridge orphan-risk: chat L1986
  - supervisor authorized option (b) source-comment: chat L1990
  - theologian volunteered + drafted comment: chat L1991, L1995
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 22, 2026 docs: W25 §5.3 POST-STEP-B mutation result -- drift CAUGHT (PASS) 74bf7fc
Per supervisor [chat L2328] task assignment + testkeeper L2327 execution
+ spec §5 acceptance gate. End-to-end §5.3 falsification COMPLETE.

EMPIRICAL RESULT (testkeeper executed):
  Mutation: hir_c_insert_before +3rd arg in BOTH hir_c_api.h:740 + hir_c_api.cpp:2349
  Build cmd: scripts/build_phoenix.sh
  HEAD: ab07641 (post-Step-B substantive close)
  BUILD_EXIT=2 ← DRIFT CAUGHT at compile time

  Compile errors (6 call sites across 3 §1b TUs):
    licm_c.c:244:50
    pass_output_type_c.c:981:53, 989:48, 1054:59
    simplify_c.c:40:57, 2829:54
  All 'too few arguments to function call, expected 3, have 2'.

§5.3 ACCEPTANCE PER SPEC §5: PASS END-TO-END
  PRE-STEP-B baseline (push 67 commit 911e173): BUILD_EXIT=0 = drift undetected
  POST-STEP-B re-run (HERE): BUILD_EXIT=2 = drift caught at compile time
  Step B closed §1b drift surface as designed.

CHANGES (+22/0):
  Appended POST-STEP-B section to docs/w25-step-b-mutation-baseline.txt
  (PRE-STEP-B section landed in push 67 commit 911e173).

INTERPRETATION:
  Pre-Step-B: §1b TUs each held a local 2-arg extern shadowing canonical
    decl. 2-arg call sites compiled fine; linker silently bound to impl
    by name. Result: silent runtime UB at runtime if call sites executed
    with mismatched arg counts.
  Post-Step-B: local externs DELETED + #include hir_c_api.h ADDED in
    each §1b TU. New 3-arg canonical sig visible at compile time.
    2-arg call sites now fail compile with clear errors.
  Drift caught BEFORE link; no silent UB possible.

NOW LEGITIMATELY: Step B closes §1b drift surface  --  empirically validated
per spec §5 acceptance criterion. Per pythia python#83 python#2 framing-precision:
mechanical work + dual-typedef collision resolution landed at push 75
ab07641; formal §5.3 closure landed HERE.

AUTHORSHIP: testkeeper executed §5.3 procedure (chat L2327); generalist
commits artifact per role boundary (push 67 precedent).

Authorization chain:
  - W25 spec §5: theologian L2017 (procedure design)
  - §5.3 procedure with corrections: 2ed74a9 doc landed in push 67
  - testkeeper EXECUTED + verbatim output: chat L2327
  - Supervisor task assignment: chat L2328
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 22, 2026 INVOKE_* Phase 2 python#2: emitInvokeMethod → C body + 4 bridges ea24f12
Per theologian L2430 INVOKE_* Phase 2 spec.

Changes:
  - Python/jit/hir/builder_emit_c.c: new C body
    hir_builder_emit_invoke_method_c (~75 lines). Mirrors C++ emitInvokeMethod
    structure: builtin fast path (return false), statically-typed CallInd
    path, dynamic VectorCall dispatch via existing emitInvokeMethodVectorCall
    bridge.

  - Python/jit/hir/builder.cpp: HIRBuilder::emitInvokeMethod becomes a
    7-line delegation stub. Adds 4 NEW C bridges:
    - hir_builder_invoke_method_target_c: queries InvokeTarget
      (is_builtin, is_statically_typed, return_type)
    - hir_builder_try_emit_direct_method_call_c: bridges the builtin
      fast path (calls private tryEmitDirectMethodCall)
    - hir_builder_setup_static_args_c: bridges setupStaticArgs, returns
      arg_regs via caller-provided buffer + count
    - hir_builder_static_method_stack_pop_c: pops Register* from the
      private static_method_stack_

  - Python/jit/hir/builder.h: extern "C" forward decls for the 4 new
    bridges + friend declarations granting them access to private
    members (preloader_, tryEmitDirectMethodCall, setupStaticArgs,
    static_method_stack_).

C body uses C99 VLA (void *arg_regs[nargs]) for the typed-arg buffer  -- 
exactly sized, stack-allocated, no heap. arg_regs is opaque void*[]
because hir_c_set_operand takes void*.

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path validation pending  --  INVOKE_METHOD only emitted in __static__
modules, standard test suite does not exercise.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 22, 2026 INVOKE_* Phase 2 python#3: emitInvokeFunction → C body + 4 bridges 9d81ce8
Per theologian L2430 INVOKE_* Phase 2 spec.

Changes:
  - Python/jit/hir/builder_emit_c.c: new C body
    hir_builder_emit_invoke_function_c (~115 lines). Mirrors C++
    emitInvokeFunction with three paths (A/B/C):
    - Path A: container_is_immutable + is_function + is_statically_typed
      → direct InvokeStaticFunction emit (no VectorCall fallback)
    - Path B: container_is_immutable + is_builtin → tryEmitDirectMethodCall
      fast path
    - Path C: VectorCall fallback (or patchable LoadFunctionIndirect path)

    PY_VERSION_HEX >= 0x030C0000 conditional for __static__.rand
    special-case folded into hir_builder_is_static_rand_and_try_emit_c
    bridge (version-guarded inside the bridge, no #if in C body).

  - Python/jit/hir/builder.cpp: HIRBuilder::emitInvokeFunction becomes
    a 7-line delegation stub. Adds 4 NEW C bridges (function-target
    variants of python#2 bridges, since invokeFunctionTarget != invokeMethodTarget):
    - hir_builder_invoke_function_target_c: 8-field InvokeTarget query
      (container_is_immutable, is_function, is_statically_typed, is_builtin,
      callable, func, indirect_ptr, return_type)
    - hir_builder_try_emit_direct_method_call_for_function_c: path B fast path
    - hir_builder_setup_static_args_for_function_c: arg_regs via VLA
    - hir_builder_is_static_rand_and_try_emit_c: PY_VERSION_HEX folded

  - Python/jit/hir/builder.h: extern "C" forward decls + 4 new friend
    declarations granting bridges access to private members.

C body uses C99 VLA (void *arg_regs[nargs]). CallFlags::Static = 1<<2
hardcoded as 4u (matches hir.h:881-886). Direct C calls to
hir_c_create_invoke_static_function_reg + hir_c_create_load_function_indirect_reg
+ hir_c_create_load_const + hir_c_create_vectorcall_reg (all already exist
in hir_c_api.h, no new factories needed). hir_type_from_object handles
Type::fromObject conversion in C.

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path validation pending  --  INVOKE_FUNCTION only emitted in __static__
modules, standard test suite does not exercise.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 23, 2026 W27a python#2: emitPrimitiveUnbox → C body + delegation stub 0f6117d
PRIMITIVE_UNBOX (Static Python) opcode handler. Per W27a Step A scope.

C body: hir_builder_emit_primitive_unbox_c (~25 lines). Inlines
unboxPrimitive: emit primitive_unbox_reg, then conditionally emit
IsNegativeAndErrOccurred (skipped for CBool|CDouble types  --  they
cannot fail). hir_type_union + hir_type_is_subtype handle the type-
class check.

C primitives used: hir_c_create_primitive_unbox_reg + hir_c_create_is_neg_and_err_reg + hir_builder_temps_alloc_stack (all existing).

C++ HIRBuilder::emitPrimitiveUnbox → 3-line delegation stub.

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path validation: PRIMITIVE_UNBOX only in __static__ modules
(emitInvokeNative precedent caveat acknowledged).
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 23, 2026 W27b python#2: emitFormatSimple → C body + delegation stub 0c2f903
FORMAT_VALUE/FORMAT_SIMPLE (mainline) opcode handler. Per W27b Step A scope.

C body: hir_builder_emit_format_simple_c (~38 lines). Block-creation
pattern: cond-branch on TUnicodeExact → format_with_spec (slow path) OR
refine_type (pass-through fast path) → done.

C primitives used: hir_cfg_alloc_block + hir_c_create_cond_branch_check_type_cpp
+ hir_c_create_load_const + hir_c_create_format_with_spec_reg
+ hir_c_create_refine_type_reg + hir_c_create_branch_cpp
+ hir_builder_temps_alloc_stack (all existing).

C++ HIRBuilder::emitFormatSimple → 4-line delegation stub (cfg arg
unused, marked maybe_unused).

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path coverage: FORMAT_VALUE/FORMAT_SIMPLE is mainline-tested per
theologian L2515 coverage observation.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 23, 2026 W27c python#1: emitSetupWithCommon → C body + bridge stub 6589315
Helper for emitSetupWith + emitBeforeWith. Per W27c Step A scope.

C body: hir_builder_emit_setup_with_common_c (~45 lines). Pops manager,
allocates enter+exit, emits load_attr_special_reg for both, pushes exit,
allocates enter_result, emits vectorcall_reg with CallFlags::None=0u,
sets enter as operand 0, sets frame state, emits.

PY_VERSION_HEX conditional (_Py_Identifier vs PyObject*) folded into C++
stub: ids are passed as opaque void* downward. is_async drives error
message text selection.

NEW BRIDGE: hir_builder_emit_setup_with_common_c  --  out-param returns
enter_result via void**.

C primitives used: hir_c_create_load_attr_special_reg + hir_c_create_vectorcall_reg
+ hir_c_set_operand + hir_deopt_set_frame_state + hir_builder_temps_alloc_stack
(all existing).

C++ HIRBuilder::emitSetupWithCommon → 6-line bridge stub returning
Register* via cast of out-param.

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
This is the chain-dep root for W27c python#2 (SetupWith) + python#3 (BeforeWith).
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 23, 2026 W27c python#2: emitSetupWith → C body + delegation stub dc27f88
SETUP_WITH (3.10/3.11) opcode handler. Per W27c Step A scope.

C body: hir_builder_emit_setup_with_c (~17 lines). Calls SetupWithCommon
helper (W27c python#1) → SetupFinally (already C-bridged) → push enter_result.

PY_VERSION_HEX conditional folded into C++ stub: enter_id/exit_id/is_async
selected per version (3.10/3.11 __enter__/__exit__ + is_async=0; 3.12+
__aenter__/__aexit__ + is_async=1  --  note 3.12+ is async-flavored even
for SETUP_WITH per existing C++ semantics). handler_off computed in C++
stub from bc_instr.nextInstrOffset() + oparg.

ZERO new bridges (uses W27c python#1 helper + existing emitSetupFinally bridge).

C++ HIRBuilder::emitSetupWith → ~22-line stub (PY_VERSION_HEX conditional
+ handler_off calc + delegation).

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 23, 2026 W27d python#2: emitGetYieldFromIter → C body + delegation stub f9cbca1
GET_YIELD_FROM_ITER (mainline) opcode handler. Per W27d Step A scope.

C body: hir_builder_emit_get_yield_from_iter_c (~70 lines). Block-creation
pattern: in_coro check via code_flags & (CO_COROUTINE|CO_ITERABLE_COROUTINE)
hard-coded; cinderx coroType conditional check (3.12+)  --  pre-fetched in
C++ stub via cinderx::getModuleState()->coroType() and passed as void*
(NULL pre-3.12). PyCoro_Type passed as void* from C++ stub. is_coro_block
is shared with nop_block when in_coro=true; allocated separately and used
for emitRaiseStatic when in_coro=false. Then TGen check → nop (assign)
or slow_path (GetIter), converging at done.

ZERO new bridges (W25c-mini compliant: cinderx coroType is one-time void*
boundary from typed C++ source, not void*-locals chain per theologian L2544).

C primitives: hir_c_create_cond_branch_check_type_cpp + hir_c_create_raise_static_reg
+ hir_c_create_get_iter_reg + hir_c_create_assign_reg + hir_c_create_branch_cpp
+ hir_cfg_alloc_block + hir_type_from_pytype + hir_builder_temps_alloc_stack
(all existing).

C++ HIRBuilder::emitGetYieldFromIter → 11-line stub (PY_VERSION_HEX
conditional for cinderx coroType + delegation).

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path: GET_YIELD_FROM_ITER is mainline-tested per theologian L2544
coverage observation.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 23, 2026 W27d python#5 (FINAL): emitSequenceGet → C body + delegation stub -- Z... 3de0ec1
...ERO C++

SEQUENCE_GET (Static Python) opcode handler. FINAL emit-method conversion
in W27 burndown. Per W27d Step A scope.

C body: hir_builder_emit_sequence_get_c (~85 lines). Same shape as
emitSequenceSet (W27c python#5) + SEQ_SUBSCR_UNCHECKED bit gating + emitLoadArrayItem
(vs StoreArrayItem):
  - oparg & SEQ_SUBSCR_UNCHECKED set → skip CheckSequenceBounds, raw idx
  - else CheckSequenceBounds + adjusted_idx
  - Per (oparg & ~UNCHECKED): SEQ_LIST/INEXACT/CHECKED_LIST → load_field
    'ob_item' at PyListObject offset + TCPtr; SEQ_ARRAY_INT64 → load_const
    offset + load_field_address
  - LoadArrayItem with element_type_from_seq_type(oparg)

PHX_SEQ_SUBSCR_UNCHECKED = (1<<3) = 8 hard-coded inline.
PHX_SEQ_* base values reused from W27c python#5 (PHX_SEQ_LIST/TUPLE/LIST_INEXACT/
CHECKED_LIST/ARRAY_INT64).

ZERO new bridges.

C primitives: hir_c_create_load_field_reg + hir_c_create_guard_is_reg +
hir_c_create_refine_type_reg + hir_c_create_check_seq_bounds_reg +
hir_c_create_load_field_address_reg + hir_c_create_load_array_item_reg +
hir_c_create_load_const + hir_type_from_cint +
hir_builder_temps_alloc_stack (all existing).

C++ HIRBuilder::emitSequenceGet → 4-line delegation stub.

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Sole-path: SEQUENCE_GET is __static__-only per accepted-residual L2531.

🎯 W27d CLOSURE  --  ZERO C++ ACHIEVED for emit-methods:
  W27d python#1: emitCopyFreeVars
  W27d python#2: emitGetYieldFromIter
  W27d python#3: emitMatchClass
  W27d python#4: emitMatchMappingSequence
  W27d python#5: emitSequenceGet (THIS)

Pure-C++ count: 5 → 0 / 123 (100% per scripts/count_emit_methods.sh).
Total W27 burndown: 20 → 0 across 4 batches (W27a/b/c/d).
W27e residual paragraph (theologian L2533) attached to closure announcement
to Alex (10 __static__-only methods accepted-residual per Phoenix-doesn't-
expose-Static-Python framing).
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 23, 2026 Batch 1 python#2: emitGetYieldFromIter PARTIAL→STUB 4f2b39d
Per supervisor L2565 + theologian L2569 ACK. Reduces C++ stub from
9 lines to 5 lines (now ≤8, qualifies as STUB).

Strategy: move PY_VERSION_HEX cinderx coroType extraction from C++ stub
into C body via existing cinderx_get_module_state_coro_type_c bridge
(originally added at builder.cpp:4640+ for emitGetAwaitable). The bridge
is already C-callable; C body now fetches inline + passes NULL pre-3.12
via in-C #if PY_VERSION_HEX guard.

C body grew by 8 lines (extern decl + version-conditional fetch);
C++ stub shrank by 4 lines (PY_VERSION_HEX block removed).

Verification: cmake --build target jit/phoenix_jit clean (BUILD_EXIT=0).
Pure-C++ count unchanged (still 0); PARTIAL count drops 10→9.
clark165 mentioned this pull request Jul 5, 2026 warnings: warning filters with action="once" do not honor regex wildcards #153129 Closed This was referenced Jul 18, 2026 free threading: struct iter_unpack is not memory safe #154013 Closed use-after-free: functools partial #154189 Closed chongwick mentioned this pull request Aug 19, 2026 segv in ceval #156074 Closed gabyfle mentioned this pull request Sep 1, 2026 [3.13] gh-132396: Resolve 'redefinition of unused name' errors in Lib/test/ (GH-132397) #132699 Merged This was referenced Sep 11, 2026 Heap-buffer-overflow in the hz incremental decoder on a trailing ~ #157325 Closed mmap.mmap.__setitem__ crashes when concurrently resized #157335 Closed Heap UAF in io.TextIOWrapper read path via reentrant detach() #157363 Open hosu3das20s05s mentioned this pull request Sep 24, 2026 AddressSanitizer: global-buffer-overflow Modules/_decimal/_decimal.c:798:37 in signaldict_richcompare #158063 Open hugovk mentioned this pull request Oct 19, 2026 Only check README.rst not README python/blurb#96 Merged localzet mentioned this pull request Nov 7, 2026 gh-149313: Preserve exception notes/cause in dict/set unhashable type... #149505 Open Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment

Labels

None yet

8 participants