Skip to content

Test suite expects _stat extension to be available #108638

Closed
@vstinner

Description

@vstinner

Bug report

Checklist

  • I am confident this is a bug in CPython, not a bug in a third-party project
  • I have searched the CPython issue tracker,
    and am confident this bug has not been reported before

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

No response

A clear and concise description of the bug:

The _stat extension is specific to CPython. For example, PyPy has no _stat module.

But the Python test suite expects the _stat module to be available: test_inspect, test_pydoc, and test_tarfile fail with it's missing.

Disable compilation of the _stat extension to reproduce the issue:

diff --git a/Modules/Setup.bootstrap.in b/Modules/Setup.bootstrap.in
index 8ef0f203a8..a1f6b8cc85 100644
--- a/Modules/Setup.bootstrap.in
+++ b/Modules/Setup.bootstrap.in
@@ -29,7 +29,7 @@ _abc _abc.c
 _functools _functoolsmodule.c
 _locale _localemodule.c
 _operator _operator.c
-_stat _stat.c
+#_stat _stat.c
 _symtable symtablemodule.c
 
 # for systems without $HOME env, used by site._getuserbase()

Example:

$ ./python -c 'import _stat'
ModuleNotFoundError: No module named '_stat'

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions