ITADN

Test failures with setuptools_scm 10

#1258Openhroncok 创建于 2026-04-01
H
hroncokcommented
Hello. When trying to update setuptools_scm in Fedora to 10.0.5, we found out some test failures here: ``` [scikit-build-core (main)]$ uv venv --python=python3.14 venv [scikit-build-core (main)]$ . venv/bin/activate (venv) [scikit-build-core (main)]$ uv pip install . --group=test ... + setuptools-scm==10.0.5 ... (venv) [scikit-build-core (main)]$ pytest -nauto ... platform linux -- Python 3.14.3, pytest-9.0.2, pluggy-1.6.0 ... FAILED tests/test_module_dir.py::test_all_modules_filter_all - AssertionError: /home/churchyard/Dokumenty/RedHat/scikit-build-core/venv/lib64/python3.14/site-packages/scikit_build_core/_version.py has 'annotations' FAILED tests/test_setuptools_abi3.py::test_abi3_wheel - UserWarning: No GlobalOverrides context is active. Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. Consider using 'with GlobalOverrides.from_env("YOUR_TOOL"):' explicitly. FAILED tests/test_setuptools_pep517.py::test_pep517_sdist[simple_setuptools_ext] - UserWarning: No GlobalOverrides context is active. Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. Consider using 'with GlobalOverrides.from_env("YOUR_TOOL"):' explicitly. FAILED tests/test_setuptools_pep517.py::test_pep517_wheel[simple_setuptools_ext] - UserWarning: No GlobalOverrides context is active. Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. Consider using 'with GlobalOverrides.from_env("YOUR_TOOL"):' explicitly. FAILED tests/test_setuptools_pep517.py::test_toml_sdist[toml_setuptools_ext] - UserWarning: No GlobalOverrides context is active. Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. Consider using 'with GlobalOverrides.from_env("YOUR_TOOL"):' explicitly. FAILED tests/test_setuptools_pep517.py::test_toml_wheel[toml_setuptools_ext] - UserWarning: No GlobalOverrides context is active. Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. Consider using 'with GlobalOverrides.from_env("YOUR_TOOL"):' explicitly. FAILED tests/test_setuptools_pep517.py::test_mixed_wheel[mixed_setuptools] - UserWarning: No GlobalOverrides context is active. Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. Consider using 'with GlobalOverrides.from_env("YOUR_TOOL"):' explicitly. ... _________________________ test_all_modules_filter_all __________________________ [gw6] linux -- Python 3.14.3 .../scikit-build-core/venv/bin/python3 def test_all_modules_filter_all(): all_modules = on_all_modules("scikit_build_core", pkg=False) all_modules = (n for n in all_modules if not n.split(".")[-1].startswith("__")) for name in all_modules: try: module = importlib.import_module(name) except ModuleNotFoundError: continue try: dir_module = set(dir(module)) except Exception: print(f"dir() failed on {name}") raise items = ["annotations", "os", "sys"] for item in items: > assert item not in dir_module, f"{module.__file__} has {item!r}" E AssertionError: .../scikit-build-core/venv/lib64/python3.14/site-packages/scikit_build_core/_version.py has 'annotations' E assert 'annotations' not in {'__all__', '__annotations__', '__builtins__', '__cached__', '__commit_id__', '__conditional_annotations__', ...} tests/test_module_dir.py:46: AssertionError _______________________________ test_abi3_wheel ________________________________ [gw11] linux -- Python 3.14.3 .../scikit-build-core/venv/bin/python3 tmp_path = PosixPath('/tmp/pytest-of-.../pytest-139/popen-gw11/test_abi3_wheel0') monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f00725b5c50> virtualenv = <conftest.VEnv object at 0x7f006f5239d0> @pytest.mark.compile @pytest.mark.configure @pytest.mark.skipif( sys.implementation.name == "pypy", reason="pypy does not support abi3" ) @pytest.mark.skipif( sys.implementation.name == "graalpy", reason="graalpy does not support abi3" ) @pytest.mark.skipif( sysconfig.get_config_var("Py_GIL_DISABLED"), reason="Free-threaded Python does not support abi3", ) @pytest.mark.skipif( SYSCONFIGPLAT.startswith(("msys", "mingw")), reason="abi3 FindPython on MSYS/MinGW reports not found", ) def test_abi3_wheel(tmp_path, monkeypatch, virtualenv): dist = tmp_path / "dist" dist.mkdir() # create a temporary copy of the package source so we don't contaminate the # main source tree with build artefacts src = tmp_path / "src" shutil.copytree(ABI_PKG, src) monkeypatch.chdir(src) > out = build_wheel(str(dist)) ^^^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/tests/test_setuptools_abi3.py:44: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/build_meta.py:438: in build_wheel return _build(['bdist_wheel']) ^^^^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/build_meta.py:429: in _build return self._build_with_temp_dir( .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/build_meta.py:410: in _build_with_temp_dir self.run_setup() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/build_meta.py:317: in run_setup exec(code, locals()) <string>:3: in <module> ??? .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/__init__.py:117: in setup return distutils.core.setup(**attrs) # type: ignore[return-value] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/core.py:186: in setup return run_commands(dist) ^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/core.py:202: in run_commands dist.run_commands() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py:1000: in run_commands self.run_command(cmd) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/dist.py:1107: in run_command super().run_command(command) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py:1019: in run_command cmd_obj.run() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/command/bdist_wheel.py:405: in run self.run_command("install") .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/cmd.py:341: in run_command self.distribution.run_command(command) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/dist.py:1107: in run_command super().run_command(command) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py:1019: in run_command cmd_obj.run() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/command/install.py:700: in run self.run_command(cmd_name) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/cmd.py:341: in run_command self.distribution.run_command(command) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/dist.py:1107: in run_command super().run_command(command) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py:1019: in run_command cmd_obj.run() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/command/install_egg_info.py:32: in run self.run_command('egg_info') .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/cmd.py:341: in run_command self.distribution.run_command(command) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/dist.py:1107: in run_command super().run_command(command) .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/_distutils/dist.py:1019: in run_command cmd_obj.run() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/command/egg_info.py:312: in run self.find_sources() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/command/egg_info.py:320: in find_sources mm.run() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/command/egg_info.py:542: in run self.add_defaults() .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/command/egg_info.py:583: in add_defaults rcfiles = list(walk_revctrl()) ^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/setuptools/command/sdist.py:23: in walk_revctrl yield from ep.load()(dirname) ^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/vcs_versioning/_file_finders/__init__.py:109: in find_files res: list[str] = command(path) ^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/vcs_versioning/_file_finders/_git.py:114: in git_find_files toplevel = _git_toplevel(os.fspath(path)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/vcs_versioning/_file_finders/_git.py:22: in _git_toplevel res = _run(["git", "rev-parse", "HEAD"], cwd=cwd) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/vcs_versioning/_run_cmd.py:146: in run timeout = _get_timeout(os.environ) ^^^^^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/vcs_versioning/_run_cmd.py:23: in _get_timeout return get_subprocess_timeout() ^^^^^^^^^^^^^^^^^^^^^^^^ .../scikit-build-core/venv/lib64/python3.14/site-packages/vcs_versioning/overrides.py:609: in get_subprocess_timeout return get_active_overrides().subprocess_timeout ^^^^^^^^^^^^^^^^^^^^^^ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ def get_active_overrides() -> GlobalOverrides: """Get the currently active GlobalOverrides instance. If no context is active, creates one from the current environment using SETUPTOOLS_SCM prefix for legacy compatibility. Note: The auto-created instance reads from os.environ at call time, so it will pick up environment changes (e.g., from pytest monkeypatch). Returns: GlobalOverrides instance """ global _auto_create_warning_issued overrides = _active_overrides.get() if overrides is None: # Auto-create context from environment for backwards compatibility # Note: We create a fresh instance each time to pick up env changes if not _auto_create_warning_issued: > warnings.warn( "No GlobalOverrides context is active. " "Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. " "Consider using 'with GlobalOverrides.from_env(\"YOUR_TOOL\"):' explicitly.", UserWarning, stacklevel=2, ) E UserWarning: No GlobalOverrides context is active. Auto-creating one with SETUPTOOLS_SCM prefix for backwards compatibility. Consider using 'with GlobalOverrides.from_env("YOUR_TOOL"):' explicitly. .../scikit-build-core/venv/lib64/python3.14/site-packages/vcs_versioning/overrides.py:578: UserWarning ... ``` Full failed tests log: [log.txt](https://github.com/user-attachments/files/26416796/log.txt)
6 条评论