Skip to content

Zero-warning Sphinx docs and Python 3.13 floor - #46

Merged
zedrdave merged 4 commits into
mainfrom
chore/py313-docs-warnings
Nov 20, 2026
Merged

zedrdave merged 4 commits into
mainfrom
chore/py313-docs-warnings

Conversation

@zedrdave

Copy link
Copy Markdown
Member

Stacked on #45 (base: chore/marshmallow4-deps-resolver-fix); retarget to main once #45 merges.

Docs: zero Sphinx warnings, gated

  • docs/api.rst: one recursive autosummary tree instead of re-listing submodules (removed 42 duplicate-object and 28 ambiguous-xref warnings).
  • docs/conf.py: registers the default perms models before autodoc so perms.user_schemas imports; ignore-module-all; napoleon_use_ivar = True; suppresses only sphinx_autodoc_typehints.forward_reference and .guarded_import (third-party SQLAlchemy/Werkzeug names that can never resolve).
  • RST fixes in docs/crud.rst, docs/demoapp-style-integration.rst and four docstrings (crud_blueprint.py, error/exceptions.py, error/integrity.py, perms/user_registry.py); no runtime change.
  • .readthedocs.yaml fail_on_warning: true; CI lint job gets a sphinx-build -W step.

Python 3.13 floor

  • python = ">=3.13,<4.0", classifiers 3.13-3.15, ruff py313, pyright 3.13, tox envlist, CI matrix 3.13/3.14/3.15 (marshmallow 3/4 dimension kept), lint/build/publish/pre-commit jobs on 3.13, RTD on 3.13.
  • Unlocks Sphinx 9.2 and sphinx-autodoc-typehints 3.17 (lock + docs/requirements.txt).
  • ruff check --select UP --target-version py313 --fix: PEP 695 type aliases and type parameters, Generator[None] defaults; shadowed module-level TypeVars removed.
  • CHANGELOG: Added / Removed / Fixed / Dependencies.

Verification

Notes

  • DebugContextValue / DebugContext in error/exceptions.py are now type statements (TypeAliasType), which differ from the old unions for code introspecting them at runtime; they are annotation-only internally.
  • Deployment hosts need Python 3.13+ before upgrading to the next release.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The public constructor documentation still advertises unsupported extra positional and keyword arguments, misleading callers about how CRUDBlueprint handles them.

1 open issue
What changed in this PR

This PR raises flask-more-smorest’s minimum Python version to 3.13 and makes warning-free Sphinx builds a CI and Read the Docs requirement, building on #45’s compatibility updates.

Changes:

  • Aligns package metadata, tooling, and automation with Python 3.13–3.15.
  • Consolidates API documentation generation, refreshes reference pages, and fixes RST formatting.
  • Modernizes type annotations and upgrades documentation dependencies.
File Description
tests/​unit/​test_performance_monitoring.py Simplifies fixture generator annotations.
tests/​unit/​test_custom_getter.py Simplifies fixture and test annotations.
tests/​unit/​conftest.py Modernizes shared fixture annotations.
tests/​testing_utils.py Simplifies context-manager annotations.
tests/​conftest.py Simplifies cleanup fixture annotations.
scripts/​bump_version.sh Updates the displayed CI Python range.
pyproject.toml Raises Python floor and aligns tooling and dependencies.
poetry.lock Locks updated documentation dependencies and Python constraints.
flask_more_smorest/​testing.py Simplifies authentication helper annotations.
flask_more_smorest/​sqla/​base_model.py Modernizes type alias and generator syntax.
flask_more_smorest/​perms/​user_registry.py Uses scoped type parameters and fixes docstring formatting.
flask_more_smorest/​perms/​user_context.py Uses scoped user type parameters.
flask_more_smorest/​perms/​base_perms_model.py Simplifies permission context-manager annotation.
flask_more_smorest/​error/​integrity.py Corrects return-value docstring formatting.
flask_more_smorest/​error/​exceptions.py Modernizes debug aliases and formats the response example.
flask_more_smorest/​crud/​crud_blueprint.py Revises constructor docstring formatting.
docs/​requirements.txt Raises Sphinx and type-hint extension minimums.
docs/​demoapp-style-integration.rst Corrects heading underline lengths.
docs/​crud.rst Marks illustrative response content as plain text.
docs/​conf.py Initializes permissions models and adjusts warning handling.
docs/​api.rst Consolidates recursive generation and corrects the database entry.
docs/​_autosummary/​flask_more_smorest.utils.rst Adds password-length validation to the reference.
docs/​_autosummary/​flask_more_smorest.testing.rst Adds testing helper reference page.
docs/​_autosummary/​flask_more_smorest.sqla.db.rst Removes the old database-object page.
docs/​_autosummary/​flask_more_smorest.rst Adds testing module navigation.
docs/​_autosummary/​flask_more_smorest.perms.user_registry.rst Adds registry function reference page.
docs/​_autosummary/​flask_more_smorest.perms.user_context.rst Removes outdated registry entries.
docs/​_autosummary/​flask_more_smorest.perms.rst Refreshes permissions package navigation.
docs/​_autosummary/​flask_more_smorest.perms.models.rst Adds abstract and default model modules.
docs/​_autosummary/​flask_more_smorest.perms.models.role.rst Removes an outdated role entry.
docs/​_autosummary/​flask_more_smorest.perms.models.defaults.rst Adds default models module page.
docs/​_autosummary/​flask_more_smorest.perms.models.base_roles.rst Adds base role enumeration reference.
docs/​_autosummary/​flask_more_smorest.perms.models.abstract_user.rst Adds abstract user reference.
docs/​_autosummary/​flask_more_smorest.perms.models.abstract_token.rst Adds abstract token reference.
docs/​_autosummary/​flask_more_smorest.perms.models.abstract_setting.rst Adds abstract setting reference.
docs/​_autosummary/​flask_more_smorest.perms.models.abstract_role.rst Adds abstract role and domain references.
docs/​_autosummary/​flask_more_smorest.error.rst Adds integrity module navigation.
docs/​_autosummary/​flask_more_smorest.error.integrity.rst Adds integrity error API reference.
docs/​_autosummary/​flask_more_smorest.error.exceptions.rst Refreshes documented exception names.
docs/​_autosummary/​flask_more_smorest.error.error_handlers.rst Adds integrity handler reference.
docs/​_autosummary/​flask_more_smorest.crud.blueprint_operationid.rst Adds suffix-stripping helper reference.
CONTRIBUTING.md Updates Python prerequisite and formats examples.
CHANGELOG.md Records Python support and documentation changes.
.readthedocs.yaml Uses Python 3.13 and fails on warnings.
.github/​workflows/​pre-commit.yml Runs pre-commit on Python 3.13.
.github/​workflows/​ci-cd.yml Updates Python versions and adds strict documentation builds.
.github/​AGENTS.md Updates documented CI Python range.

Review effort: Balanced

De-duplicate the API reference (single recursive autosummary tree,
ignore-module-all, napoleon_use_ivar), register the default perms models
in conf.py so user_schemas imports under autodoc, fix RST syntax in
docstrings and pages, and suppress the two third-party typehints
warnings that cannot be fixed here. ReadTheDocs now fails on warnings.
Raise the floor to >=3.13 (pyproject, classifiers, ruff/pyright targets,
tox, CI matrix 3.13-3.15, pre-commit workflow, RTD), unlock Sphinx 9.2
and sphinx-autodoc-typehints 3.17, apply ruff UP fixes for the new
target (PEP 695 type statements and type parameters, Generator defaults),
add a docs build step to the CI lint job, and update the CHANGELOG.
@zedrdave
zedrdave force-pushed the chore/py313-docs-warnings branch from 8d24162 to 2732da1 Compare November 20, 2026 13:47
Base automatically changed from chore/marshmallow4-deps-resolver-fix to main November 20, 2026 13:47
@zedrdave zedrdave closed this Nov 20, 2026
@zedrdave zedrdave reopened this Nov 20, 2026
@zedrdave
zedrdave merged commit 31666d2 into main Nov 20, 2026
11 checks passed
@zedrdave
zedrdave deleted the chore/py313-docs-warnings branch November 20, 2026 13:54
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