GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-28331: fix "CPython implementation detail:" label is removed when content is translated. by methane · Pull Request #195 · python/cpython

Conversation

@methane

@methane methane commented Feb 20, 2017

Copy link
Copy Markdown
Member

[bpo-28331]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@methane
bpo-28331: fix "CPython implementation detail:" label is removed when…
dbf9453
… content is translated.
@methane methane added type-bug An unexpected behavior, bug, or error docs Documentation in the Doc dir needs backport to 2.7 labels Feb 20, 2017
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Feb 20, 2017
berkerpeksag
berkerpeksag requested changes Feb 21, 2017
View reviewed changes

@berkerpeksag berkerpeksag left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sorry, I'm strongly against introducing yet another hack for a pretty small use case.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@methane

methane commented Feb 21, 2017

Copy link
Copy Markdown
Member Author

@JulienPalard We (Japanese translation team) fixed this in our fork.
I think French documentation should apply same fix too.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@methane

methane commented Feb 21, 2017

Copy link
Copy Markdown
Member Author

I keep this PR open, until another "NO" from core dev.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

vstinner
vstinner approved these changes Feb 22, 2017
View reviewed changes
@methane

methane commented Feb 23, 2017 via email •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author
@berkerpeksag This pull request changes two thing: 1. Fix "CPython implementation detail:" label disappears when it's body is translated. This must be fixed, otherwise people think it's Python's guarantee. (Imagine that "CPython implementation detail: This is the address of the object in memory." becomes "This is the address of the object in memory.") And this change make the implementation same to version(added|changed) directive in Sphinx. So I think it's proper implementation rather than hack. I strongly want to fix this in upstream. 2. Make "CPython implementation detail:" label translatable. Untranslatable label is minor problem compared to (1), and this change uses hack (dummy.html to expose label text to pot file via {% trans %} tag). If you still strong -1 about adding hack, I'll remove dummy.html. Downstream translation project can add dummy.html by themselves, without touching python source. But I feel "add this in downstream project" is also hack.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@berkerpeksag

berkerpeksag commented Feb 23, 2017

Copy link
Copy Markdown
Member

I think matching the implementation of the imp-detail directive with the other custom directives is a good idea -- I don't have an objection to that part of the PR. However, I'm still -1 on adding a dummy HTML.

Customizing the tools of an upstream project is a very common practice in open source world. Downstream projects are doing a lot of different things with Python and this doesn't mean that all these hacks should go into upstream (we've rejected most of them in the past)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Feb 23, 2017 via email

Copy link
Copy Markdown
Member
I started a thread on python-dev to get an official go for the translated doc: https://mail.python.org/pipermail/python-dev/2017-February/147416.html
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@methane

methane commented Mar 8, 2017

Copy link
Copy Markdown
Member Author

I saw most replies on the ML thread is positive.
And I checked this fix works on Sphinx 1.3.3 (docs.python.org uses this version) without any warnings too.

Now I think this change is safe enough to merge, and small enough to maintain.
Feel free to revert it if it cause any regression.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@methane
methane merged commit c351ce6 into python:master Mar 8, 2017
@methane
methane deleted the fix-impl-detail branch March 8, 2017 10:07
@methane methane removed needs backport to 2.7 labels Mar 8, 2017
@methane

methane commented Mar 8, 2017

Copy link
Copy Markdown
Member Author

Since translation will be focus on latest stable release, I removed "needs backport to (2.7|3.5)" labels.
I'll backport this to 3.6 later, if no problem happened at 3.7-dev document.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

methane added a commit to methane/cpython that referenced this pull request Mar 22, 2017
@methane
bpo-28331: fix impl-detail label is removed when content is translate…
3624264
…d. (pythonGH-195)

(cherry picked from commit c351ce6)
@methane methane mentioned this pull request Mar 22, 2017
[3.6] bpo-28331: fix impl-detail label is removed when content is translated. #769
Merged
@Mariatta Mariatta removed the needs backport to 3.6 label Mar 31, 2017
akruis pushed a commit to akruis/cpython that referenced this pull request Dec 31, 2018
Anselm Kruis
Stackless issue python#190: Do not close running (async) generators o…
905d0ef
…r coroutines (python#195)

Silently ignore attempts to close a running generator, coroutine or asynchronous
generator. This avoids spurious error messages, if such an object is deallocated
as part of a paused, restorable tasklet.
akruis added a commit to akruis/cpython that referenced this pull request Jan 1, 2019
@akruis
Stackless issue python#195: pickling of coroutine_wrapper objects
b15d619
Stackless can now pickle coroutine_wrapper objects.
akruis pushed a commit to akruis/cpython that referenced this pull request Jan 20, 2019
Anselm Kruis @akruis
Stackless issue python#190: Do not close running (async) generators o…
f2fa3aa
…r coroutines (python#195)

Silently ignore attempts to close a running generator, coroutine or asynchronous
generator. This avoids spurious error messages, if such an object is deallocated
as part of a paused, restorable tasklet.
(cherry picked from commit 905d0ef)
pablogsal pushed a commit to pablogsal/cpython that referenced this pull request Nov 29, 2022
@lysnikolaou
Use new tokenizer column offset to fix fstring ast locations (python#195
09e7732
)
jaraco pushed a commit that referenced this pull request Dec 2, 2022
@pyup-bot @Mariatta
Update aiohttp from 3.5.0 to 3.5.1 (#195)
ab6c3c1
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 27, 2026
@SonicField
docs: gen_simple regression investigation — root-cause class localized
86a45e5
Investigation artifact per supervisor 15:14:01Z (in-tree evidence
prevents next-session/future readers from re-discovering). Closes the
'pre-existing structural causal absence' dismissal pattern that BLME
b2 / kwnames / preloader_ ABBA reports applied to gen_simple's 0.73x
ratio (pythia python#195 catch).

  docs/benchmarks/gen_simple_investigation_2026-04-27.md

3-config focused timing at ABBA-calibrated n_iter=8,700,000:
  Vanilla CPython 3.12          505 ms  1.00x
  Phoenix interpreter (no auto) 472 ms  0.94x  (FASTER than vanilla)
  Phoenix + cinderjit.auto      670 ms  1.33x  (SLOWER than vanilla,
                                                1.42x SLOWER than
                                                Phoenix's interpreter)

The 0.73x ratio is the Phoenix JIT generator-compilation cost itself
— not pre-existing baseline noise. Phoenix's interpreter beats vanilla
on this workload by 6%; only the JIT path regresses. The 4 observer
commits (BLME b2, kwnames, preloader_, push-59 baseline) don't touch
generator codegen so they couldn't have introduced the regression —
but the regression IS Phoenix-introduced, just upstream of those
probes.

Per feedback_assume_phoenix_regression.md (Alex 2026-04-24): every
regression presumed Phoenix-introduced; per
feedback_falsifier_convergent_negative.md: convergent-negative delta
needs investigated-no-quick-fix framing, not pre-existing escape.

Mechanism (hypothesis): Phoenix cinderjit.auto JIT-compiles the
inner gen() closure once the call-count crosses the 1000-call
auto-compile threshold. The JIT'd generator runs slower per-yield
than the interpreter on this workload — likely candidates: per-yield
codegen overhead in Phoenix's JIT generator path, or auto-compile
threshold + counting overhead amortized across too few iterations.

Not yet root-caused at the Phoenix-source layer. Next-step options
(deferred to next-session fix-class workstream per supervisor
15:14:01Z):
  (a) cinderx_dev oracle bisect (Tier-1 falsifier per Alex's policy
      — recommended first step per theologian 15:13:57Z)
  (b) Profile + perf-record the JIT'd gen() execution
  (c) Park as 'investigated-no-quick-fix' if (a)+(b) show
      architectural cost with no localizable hotspot

ABBA-report convention going forward (per supervisor 15:14:01Z
cascade): gen_simple is no longer 'pre-existing'; new framing is
'Phoenix JIT generator-compilation regression, root-cause class
identified (this artifact), bisect queued for next-session'. Until
the bisect lands, this artifact is the workstream-tag the gatekeeper
>5% BLOCK rule (15:12:00Z) accepts as the evidence-class root-cause
citation distinguishing the regression from a generic pre-existing
dismissal.

Doc-only commit. No JIT/build/codegen surface; trivial-push
exemption.
SonicField added a commit to SonicField/cpython that referenced this pull request Apr 27, 2026
@SonicField
docs/known-bugs: gen_simple JIT-overhead known-cost (Phoenix-stable)
12ed40d
Stable 0.70-0.76x vs vanilla CPython on bench_gen_simple across 11+
days, 6+ commit surfaces, 9 logged ABBA runs since 2026-04-16. Not a
recent regression.

Mechanism candidate: 87,000 short-lived generators per rep × per-
generator-creation JIT-prologue/epilogue cost. Confirmed
cinderjit.auto IS the cost driver (Phoenix JIT_OFF 491ms vs JIT_ON
633ms vs vanilla 476ms; testkeeper /tmp/gen_simple_match_harness.py
2026-04-27T15:14:16Z).

Doc supersedes the prior dismissal framing 'pre-existing structural
causal absence' (caught by pythia python#195 + medic motivated-reasoning
warning). Replacement framing: 'Phoenix-stable known-cost, fix-class
workstream queued post-terminal-goal'. Anti-pattern guard + threshold
signal preserved (drops below 0.70x or rises above 0.76x = NEW
signal, investigate).

Status: PARKED behind pure-C JIT terminal-goal completion per Alex
priority order. Resumption gate enumerates 5-step procedure when
fix-class work opens.

Per supervisor 2026-04-27T15:15:20Z disposition (a) following
testkeeper investigation 15:14:16Z + theologian patch-shape APPROVE
15:17:13Z.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@berkerpeksag berkerpeksag berkerpeksag requested changes
@vstinner vstinner vstinner approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir type-bug An unexpected behavior, bug, or error

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@methane @berkerpeksag @vstinner @Mariatta @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.