◐ Shell
clean mode source ↗

bpo-28806: Improve the netrc library by zhangyangyu · Pull Request #127 · python/cpython

@zhangyangyu

akruis referenced this pull request in stackless-dev/stackless

Sep 5, 2017

akruis referenced this pull request in stackless-dev/stackless

Sep 5, 2017

akruis pushed a commit to akruis/cpython that referenced this pull request

Sep 9, 2017
…tor and traceback objects

__setstate__ must accept the state returned by __reduce__. This was not the case for generator
and trace-back objects. This commit fixes this. The next commit (merge of issue python#127) adds the relevant test cases.
Additionally amends changelog.txt.

https://bitbucket.org/stackless-dev/stackless/issues/107

akruis pushed a commit to akruis/cpython that referenced this pull request

Sep 9, 2017

akruis pushed a commit to akruis/cpython that referenced this pull request

Sep 9, 2017

akruis pushed a commit to akruis/cpython that referenced this pull request

Sep 9, 2017
…ling tests.

This change is based on f5f98595c6cc63b from 2.7-slp, but it is heavily modified for Python 3.

- Pickle 'callable-iterator' objects correctly. Previously the unpickled object had the type '_stackless._wrap.callable-iterator'.

- Fix pickling of 'method-wrapper' objects. Previously pickling them caused a SystemError exception.

- Fix copy.copy() for 'callable-iterator', 'method', 'dict_keys', 'dict_values' and 'dict_items' objects. Previously the copied object had the type '_stackless._wrap....'.

- Fix Stackless pickling tests. The method StacklessTestCase.dumps() didn't pass the pickle protocol to the pickler.

- Remove dead code in prickelpit.c. The code was used in older Stackless versions.

akruis pushed a commit to akruis/cpython that referenced this pull request

Sep 9, 2017

@ghost ghost mentioned this pull request

Sep 24, 2017

akruis pushed a commit to akruis/cpython that referenced this pull request

Oct 10, 2017

akruis pushed a commit to akruis/cpython that referenced this pull request

Oct 10, 2017

raspy

auvipy

serhiy-storchaka

This was referenced

Feb 11, 2025

SonicField added a commit to SonicField/cpython that referenced this pull request

Apr 24, 2026
Pays the structural debt logged by W-C2 push 45 (9e342ab). The
W-C2 fix overloaded is_abs_addr=1 to trigger SIB pure-disp32 encoding
in phx_fs_ptr because PhxMem zero-init couldn't distinguish 'no base
register' from 'base = RAX (id=0)'. That overload was a workaround,
not a fix to the underlying flaw — pythia python#127 flagged the
structural-fix-rejected pattern.

Fix: add explicit has_base flag to PhxMem (mirror of has_index).
Constructors that take a base register (phx_ptr, phx_ptr_index,
phx_a64_mem/_pre/_post) set has_base=1; pure-displacement constructors
(phx_fs_ptr) leave has_base=0 via zero-init. encode_modrm_mem branches
on !has_base between the is_abs_addr branch and the base-register
fallback, emitting the SIB pure-disp32 form (04 25 disp32). FS segment
prefix is independently emitted by emit_segment_prefix.

phx_fs_ptr no longer needs the is_abs_addr workaround; restored to
clean semantics (has_base=0 from zero-init is the structural marker).

Other PhxMem callsite audit (no other changes needed):
- frame_asm_c.c:198 label_mem: is_label_rel branch fires first
- autogen_translate_c.c:1649 x86_operand_to_mem: STACK/IND use phx_ptr/
  phx_ptr_index (has_base=1); MEM uses is_abs_addr (branch fires first)
- arch.c:45+55 jit_arch_ptr_offset/_resolve: returns from phx_ptr
  (has_base=1)

Note (librarian 17:27:04Z): the 1afc0fa 2026-04-06 commit was a
stale-reference cleanup of a never-existing field, not a deliberate
has_base rejection. DSecondary-2 is fresh ground; no prior decision is
being reversed.

Auth chain: theologian patch-shape APPROVE 17:50:43Z (structural
verification: encoder branch order is_abs_addr → is_label_rel →
!has_base → base-register fallback; ARM64 helpers correctly set
has_base=1; other-callsite audit consistent); testkeeper pre-commit
BUILD PASS + JIT smoke PASS 17:53:26Z; supervisor 17:18:11Z queue
re-sequence (pay structural debt while surface fresh).