Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apathetic-tools/python-utils
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.1
Choose a base ref
...
head repository: apathetic-tools/python-utils
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.5.0
Choose a head ref
  • 2 commits
  • 8 files changed
  • 2 contributors

Commits on Dec 8, 2025

  1. feat(testing): add detect_module_runtime_mode to detect stitched/zipa…

    …pp builds
    
    Add new detect_module_runtime_mode() function that reliably detects whether a
    module is from a stitched build, zipapp, or regular package. Prioritizes marker-
    based detection (__STITCHED__, __STANDALONE__) but falls back to path heuristics.
    
    This fixes patch_everywhere() which was corrupting stitched module test isolation
    by patching shared __globals__ dicts. Now patch_everywhere() uses the new detector
    to skip __globals__ patching for stitched and zipapp modules, which use module-
    level setattr instead.
    
    Changes:
    - Add detect_module_runtime_mode(mod, *, stitch_hints=None) function
    - Make stitch_hints keyword-only parameter
    - Pass stitch_hints to detector in both patch_everywhere call sites
    - Remove duplicate fallback logic from patch_everywhere (now in detector)
    - Export detect_module_runtime_mode in __init__.py
    - Add tests for detector and patch_everywhere isolation behavior
    - Update API documentation with detect_module_runtime_mode
    InertSloth committed Dec 8, 2025
    Configuration menu
    Copy the full SHA
    313b747 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    ab71bf5 View commit details
    Browse the repository at this point in the history
Loading