Skip to content

Add the stdlib doctest adapter package - #215

Open
Erotemic wants to merge 1 commit into
mainfrom
review/06-public-interop-api
Open

Add the stdlib doctest adapter package#215
Erotemic wants to merge 1 commit into
mainfrom
review/06-public-interop-api

Conversation

@Erotemic

@Erotemic Erotemic commented Jul 12, 2026

Copy link
Copy Markdown
Owner

What changed

  • Replaces the broad xdoctest.interop module with the specifically named xdoctest.stdlib_doctest adapter package.
  • Groups all existing stdlib-doctest support under that package:
    • stdlib_doctest/__init__.py is the documented public namespace and executable quick start.
    • stdlib_doctest/_checker.py contains checker registration, resolution, and the stdlib-shaped OutputChecker.
    • stdlib_doctest/_optionflags.py contains stdlib optionflag registration and runtime-state translation.
    • stdlib_doctest/_convert.py contains doctest.Example / doctest.DocTest intake.
  • Removes the old top-level implementation modules checker_facade.py, directive_facade.py, stdlib_compat.py, and interop.py rather than leaving forwarding wrappers.
  • Keeps the currently published top-level xdoctest aliases for now, but sources them from the single package.
  • Updates core call sites to name their current private dependencies on _checker and _optionflags explicitly. This is intentionally an organizational move, not yet a redesign of which dependencies belong in core.
  • Renames the dedicated tests and checked-in Sphinx page to match stdlib_doctest.

Public package

import xdoctest.stdlib_doctest as stdlib_doctest

The package re-exports the existing stdlib-shaped checker, optionflag, runtime-state conversion, and object-intake APIs. Its __init__.py contains documentation, the executable quick start, re-exports, and __all__; implementation remains in private modules.

Validation

  • 122 checker, directive, runner, intake, and warning tests passed; 2 environment-dependent tests skipped.
  • All 19 doctests in xdoctest.stdlib_doctest passed, including the package quick start.
  • Python 3.8 grammar and compilation checks passed.
  • mypy src/xdoctest and ty check src/xdoctest tests/ passed before packaging.
  • Fatal flake8 selectors and git diff --check passed before packaging.
  • The checked-in Sphinx API page rendered offline with no new package or duplicate-object diagnostics before packaging.

@Erotemic
Erotemic force-pushed the review/05-pytest-embedding branch from ac8e85c to 481f725 Compare July 12, 2026 00:38
@Erotemic
Erotemic force-pushed the review/06-public-interop-api branch from 9c89f00 to 3705ed6 Compare July 12, 2026 00:38
@Erotemic
Erotemic force-pushed the review/05-pytest-embedding branch from 481f725 to e2f2e0c Compare July 12, 2026 03:44
@Erotemic
Erotemic force-pushed the review/06-public-interop-api branch from 3705ed6 to 60f22c5 Compare July 12, 2026 03:44
@Erotemic
Erotemic force-pushed the review/05-pytest-embedding branch 4 times, most recently from 9fa8518 to 68e79bc Compare July 13, 2026 14:48
@Erotemic
Erotemic force-pushed the review/06-public-interop-api branch from 60f22c5 to 0934fce Compare July 14, 2026 01:23
@Erotemic
Erotemic changed the base branch from review/05-pytest-embedding to main July 14, 2026 01:23
@Erotemic
Erotemic marked this pull request as ready for review July 14, 2026 01:23
@Erotemic
Erotemic force-pushed the review/06-public-interop-api branch 3 times, most recently from 87ea3ed to 05aa399 Compare July 14, 2026 02:07
@Erotemic Erotemic changed the title Publish the xdoctest interop contract Add the stdlib doctest adapter package Jul 14, 2026
@Erotemic
Erotemic force-pushed the review/06-public-interop-api branch from 05aa399 to 2fe485c Compare July 14, 2026 02:36
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.

1 participant