Skip to content

stubtest: don't enforce @disjoint_base by default until PEP 800 is accepted #19737

@jorenham

Description

@jorenham

When running stubtest from the master branch on scipy-stubs (31 errors) and the numpy stubs from numtype (195 errors) there are a bunch of new errors about missing @disjoint_base, for example:

error: numpy.random.RandomState is a disjoint base at runtime, but isn't marked with @disjoint_base in the stub
Stub: in file src/numpy-stubs/random/__init__.pyi:77
<TypeInfo numpy.random.mtrand.RandomState>
Runtime:
<class 'numpy.random.mtrand.RandomState'>

I think it's a good check, but I'm a bit hesitant to add it before PEP 800 is accepted. Because if it were to be rejected, and typing_extensions.disjoint_base were to be removed, then I'm sure you can see how that could cause a bunch of problems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions