8000 Fix Python 3.12+ test failures in drop-3.11 PR by Copilot · Pull Request #15125 · ipython/ipython · GitHub
[go: up one dir, main page]

Skip to content

Fix Python 3.12+ test failures in drop-3.11 PR#15125

Closed
Copilot wants to merge 6 commits intomainfrom
copilot/debug-pull-request-failures
Closed

Fix Python 3.12+ test failures in drop-3.11 PR#15125
Copilot wants to merge 6 commits intomainfrom
copilot/debug-pull-request-failures

Conversation

Copy link
Contributor
Copilot AI commented Feb 10, 2026

Fixes four test failures in PR #15121 which drops Python 3.11 support and updates to Python 3.12+.

Changes

Unicode range assertion (test_completer.py)

  • Update threshold 148853153626 for Python 3.15's expanded Unicode character set

XPASS strict handling (test_oinspect.py)

  • Remove strict=True from test_pinfo_docstring_dynamic xfail marker (test now passes on 3.15-dev)

Function signature version check (test_pretty.py)

  • Fix sys.version_info > (3, 15)>= (3, 15) for positional-only parameter syntax detection

os.environ pretty-printing (IPython/lib/pretty.py)

  • Register os._Environ as deferred printer to fix printing as environ({...}) instead of environ{...} in oldest-deps CI
  • Python 3.12 added __repr__ to os._Environ; deferred registration uses module+name lookup instead of type identity, making it robust to module reloading scenarios in test environments
# Before: Falls back to __repr__ in some configurations
environ({'PATH': '...', 'HOME': '...'})

# After: Consistently uses custom dict printer
environ{'PATH': '...',
        'HOME': '...'}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: Carreau <335567+Carreau@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug failures of pull request 15121 Fix test failures in drop Python 3.11 PR Feb 10, 2026
Copilot AI requested a review from Carreau February 10, 2026 17:36
Copilot AI and others added 2 commits February 10, 2026 17:51
Co-authored-by: Carreau <335567+Carreau@users.noreply.github.com>
Co-authored-by: Carreau <335567+Carreau@users.noreply.github.com>
Copilot AI changed the title Fix test failures in drop Python 3.11 PR Fix test failures for Python 3.12+ compatibility in drop-3.11 PR Feb 10, 2026
Copilot AI and others added 2 commits February 11, 2026 08:31
Register os._Environ as a deferred printer (by module+name) in addition to
the direct type registration. This ensures the custom printer works even in
scenarios where the os module might be reloaded or imported in different
orders (e.g., in test environments with oldest-direct dependencies), as
deferred printers use module and class name lookup rather than type identity.

This fixes the test_pretty_environ failure in the oldest-deps CI job where
os.environ was being printed as environ({...}) instead of environ{...}

Co-authored-by: Carreau <335567+Carreau@users.noreply.github.com>
…ank line

Co-authored-by: Carreau <335567+Carreau@users.noreply.github.com>
Copilot AI changed the title Fix test failures for Python 3.12+ compatibility in drop-3.11 PR Fix Python 3.12+ test failures in drop-3.11 PR Feb 11, 2026
@Carreau Carreau closed this Feb 11, 2026
@Carreau Carreau added this to the no action milestone Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

0