Skip to content

Add support for Python 3.15 - #206

Merged
icemac merged 3 commits into
masterfrom
fix-python-3.15-doctest-subtests
Jul 6, 2026
Merged

icemac merged 3 commits into
masterfrom
fix-python-3.15-doctest-subtests

Conversation

@icemac

@icemac icemac commented Jul 3, 2026

Copy link
Copy Markdown
Member
  • Restore the pre-3.15 doctest failure reporting: Python 3.15 reports each doctest example as a separate subtest (Better integration of doctest with unittest and libregrtest python/cpython#108885), which swallowed zope.testrunner's failure output and corrupted the output of subsequent examples.
  • Allow for the new Did you mean suggestion in ModuleNotFoundError messages.
  • Add Python 3.15 to CI and tox via the meta configuration.

— Comment created by Claude

icemac added 3 commits July 3, 2026 15:56
Python 3.15 changed doctest.DocTestCase to report each example as a
separate subtest (python/cpython#108885).  The subtest reports happen
while doctest has sys.stdout redirected to its internal buffer, so
zope.testrunner's immediate failure output was swallowed by that buffer
and corrupted the output of the following examples.

Restore the pre-3.15 behavior of raising a single failure for the whole
doctest after sys.stdout has been restored.

Also allow for the new 'Did you mean' suggestion in ModuleNotFoundError
messages on Python 3.15 and revert the report file count workaround
from #205 which is no longer needed.
@icemac
icemac requested a review from dataflake July 3, 2026 14:04
@icemac
icemac enabled auto-merge (squash) July 3, 2026 14:04
@icemac icemac self-assigned this Jul 3, 2026
@icemac
icemac merged commit 1757141 into master Jul 6, 2026
36 checks passed
@icemac
icemac deleted the fix-python-3.15-doctest-subtests branch July 6, 2026 14:55
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