Skip to content

Prepare sage.doctest for namespace packages #33033

@mkoeppe

Description

@mkoeppe

The Sage doctester decides whether a Python file is part of a package based on the presence of __init__.py files. This is no longer appropriate because PEP 420 implicit namespace packages do not have __init__.py files; see #32501.

We implement a new function sage.misc.package_dir.is_package_or_sage_namespace_package_dir, which we will also use in #28925.

This change also removes a runtime dependency of the doctester on Cython, see #33029.

CC: @tobiasdiez @kwankyu @kiwifb @antonio-rojas @seblabbe

Component: doctest framework

Author: Matthias Koeppe

Branch/Commit: 5adae47

Reviewer: Tobias Diez, Kwankyu Lee

Issue created by migration from https://trac.sagemath.org/ticket/33033

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions