Skip to content

doctestplus failure with pytest 8.1.1 #243

@braingram

Description

@braingram

pytest 8.1.1 (just released) contains a consider_namespace_packages argument for import_path. The changes added in #241 use this argument for pytest >=8.2:

if PYTEST_GE_8_2:
consider_namespace_packages = self.config.getini("consider_namespace_packages")
module = import_path(fspath, mode=mode, root=self.config.rootpath,
consider_namespace_packages=consider_namespace_packages)

but unfortunately the above argument change was included in a "bugfix" 8.1.1 version. This produces errors like the following:

.tox/py39-parallel-cov/lib/python3.9/site-packages/pytest_doctestplus/plugin.py:268: in collect
    module = import_path(fspath, mode=mode, root=self.config.rootpath)
E   TypeError: import_path() missing 1 required keyword-only argument: 'consider_namespace_packages'

when running pytest 8.1.1 with pytest-doctestplus 1.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions