GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — bpo-22807: Expose platform UUID generation safety information. by warsaw · Pull Request #138 · python/cpython Conversation
Member
Add an enum
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Carreau
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you want to assert the type of
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure it's worth type checking
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Carreau
reviewed
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If so, you can also consider making it kwarg-only. As you are already using is as a kwarg. Not sure if that's useful, or worth it. It's may also be a question of taste, and leaving it as is seem perfectly fine.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review! I did think about that, and it might indeed make sense, but it's a matter of style in this case, and I wasn't sure I wanted to introduce that to the API. But on thinking about it again now that you bring it up, I does make sense.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Carreau
approved these changes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
My pleasure !
Happy to be of some use :-)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
orsenthil
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. LGTM.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
berkerpeksag
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just left some comments, but the PR looks good to me.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know this is the current style in uuid.rst, but it might be better use the following style in new documentation: .. class:: SafeUUID .. versionadded:: 3.7 .. attribute:: safe The UUID was generated by the platform in a multiprocessing-safe way. ...
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, that looks nice, thanks. The one problem is that
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You're right. We don't have an enum directive now, but it should be easy to add one. You can add me to nosy list if you create an issue on bugs.p.o :)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nitpick: I'd flip the order of the decorators.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a suggestion: Using
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've played a bit with
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently, the body of
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions``local.getlocale(locale.LC_CTYPE)`` and ``locale.getpreferredencoding(False)`` may give different answers in some cases (such as the ``en_IN`` locale). ``re.LOCALE`` uses the latter, so update the test case to match.
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Replace STACKLESS_PROPOSE(func) in do_call() and ext_do_call() by STACKLESS_PROPOSE_ALL().
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
- Initialize variable 'len' in function unwrap_frame_arg(). - Assign to '*valid' in function slp_find_execname(). - Disable GCC warning -Waddress in macro TASKLET_SETVAL(task, val). - Update Stackless/changelog.txt for issues python#138, python#140
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
Replace STACKLESS_PROPOSE(func) in do_call() and ext_do_call() by STACKLESS_PROPOSE_ALL(). (cherry picked from commit ae3d7a2)
akruis
pushed a commit
to akruis/cpython
that referenced
this pull request
- Assign to '*valid' in function slp_find_execname(). - Disable GCC warning -Waddress in macro TASKLET_SETVAL(task, val). - Update Stackless/changelog.txt for issues python#138, python#140 (cherry picked from commit 3461ccf)
SonicField
added a commit
to SonicField/cpython
that referenced
this pull request
…ary domains W-PROTOCOL-CODIFY Phase A per supervisor 20:03:34Z directive (post pythia python#138 python#3 + supervisor 19:37:39Z STRONG CONCUR + theologian 19:37:17Z spec). Replaces named-only conversions (post W-2B-RECONVERT 3-class fix at 8e0c73e) with single-field struct typedefs that the C compiler tracks distinctly. Inline arithmetic at the seam was the bug class, named conversions were the WEAKER form (HirType negative control: 14 reinterpret_casts shipped broken until 2026-04-15 because naming degrades to advisory). PhxMem has_base structural flag is the POSITIVE control: JIT_CHECK_C didn't fire on dual-arch gate; structural prevention worked. CHANGES (Python/jit/bytecode_c.h): - typedef struct { int v; } BcByteOffset; - typedef struct { int v; } BcInstrIndex; - phx_bc_offset_to_instr_index now takes BcByteOffset, returns BcInstrIndex - phx_bc_instr_index_to_offset now takes BcInstrIndex, returns BcByteOffset - Header comment cites P5 origin + paired empirical controls CHANGES (Python/jit/hir/builder_emit_c.c, build_inline_except_opcode_array_c): - Class A site: wrap except_body_offset in BcByteOffset, convert to BcInstrIndex, unwrap .v for jit_bc_instr_init (existing raw-int API) - Class C site: wrap jit_bc_instr_base_offset return in BcInstrIndex, convert to BcByteOffset, unwrap .v for entry->base_offset - Class B site: wrap jit_bc_instr_get_jump_target return in BcInstrIndex, convert to BcByteOffset, unwrap .v for phx_block_map_lookup_or_panic The wrap/unwrap dance localizes the .v access to exactly the boundary between raw-int existing APIs and typed conversion functions. Compiler will catch any future cross-domain assignment (e.g., assigning BcByteOffset to BcInstrIndex without conversion) as type error — the structural property the spec requires. Spec: docs/w-protocol-codify-spec.md P5 (lines 109-136). Behavior: ZERO change. The numeric values are identical to the named- conversion fix at 8e0c73e (same arithmetic, same call ordering). The 30/30 sentinels (test_exc_raise_catch + 3 W-2B-RECONVERT sentinels) + test_multiple_exceptions_in_loop must remain 30/30 PASS. OUT-OF-SCOPE for Phase A (per spec): - Other domains (cache-id, ref-kind, type-kind) — apply pattern as encountered, not pre-authored. - Existing C++ BCOffset/BCIndex code — already type-enforced in C++. - jit_bc_instr_* APIs — keep raw int signatures; conversion happens at call sites in helpers that cross domains. Future Phase: if a new helper repeatedly wraps/unwraps the same value, consider promoting the return type to BcInstrIndex / BcByteOffset. Phase B (gate integration) + Phase C (per-conversion P6/P7 application to emitAnyCall + emitLoadMethodStatic) queued post-Phase-A. Verification pending: testkeeper rebuild + 30x W-2B-RECONVERT sentinel suite + 30x test_multiple_exceptions_in_loop + full Phoenix gate + ABBA + dual-arch.
SonicField
added a commit
to SonicField/cpython
that referenced
this pull request
Per supervisor 20:39:03Z directive (post pythia python#138 python#2: push 55 was the first commit in 'ACTIVE-dispatch territory' — Class A unit bug previously masked dispatch-loop coverage on multi-except paths via interpreter fallback for the entire push-54 lifetime). Adds 4 sentinels covering exception-handling shapes not exercised by the W-2B-RECONVERT sentinels (which targeted Class A/B/C latent fixes): 1. test_exc_try_else — no-raise path + else branch. Exercises the no-fire route through emitInlineExceptionMatch fast-path + JIT_EVAL falls through to else block. 2. test_exc_try_finally_with_raise — nested try/finally inside try/except with raise(). The raise-CALL exercises emitCallExceptionHandler's D1 stack-cleanup pre-amble + D3 result re-push invariant when an inner finally runs while the exception propagates to the outer try. 3. test_exc_nested_try_inner_catches — nested try where inner except catches and outer block continues normally. Exercises FrameState depth-trim correctness across nested handler scope transitions. 4. test_exc_raise_in_handler — re-raise a DIFFERENT exception type from inside an except handler. The new raise() inside except is itself a CALL (constructor of the new exception class), so emitCallExceptionHandler fires while we're already in handler dispatch — tests nested handler activation. Tests 2-4 actively exercise emitCallExceptionHandler dispatch. Test 1 covers emitInlineExceptionMatch no-fire path. Together they cover the four major dispatch shapes not exercised by W-2B-RECONVERT sentinels. Per theologian 20:40:59Z patch-shape APPROVE. Verification pending: testkeeper 30x each + regression check on existing 5 W-2B-RECONVERT sentinels (helper unchanged at push 56). If all 4 PASS → C dispatch path is sound for these shapes; W-2A-DISPATCH- COVERAGE complete; pivot to W-PROTOCOL-CODIFY Phase B per roadmap. If any FAIL → new bug discovery; investigate per HIR-diff Phase 0 methodology (compare to push-53 ebec018 reference for the failing shape per theologian 20:40:59Z).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reviewers+1 more reviewerUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
type-feature
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |