Skip to content

asv bechmarks trigger "No module named 'profiling.tracing'" error on 3.15.0a8 #148316

@ngoldbaum

Description

@ngoldbaum

Bug report

Bug description:

You can reproduce this by installing 3.15.0a8, creating a venv that includes the asv package, and doing asv run in the root of this test repository:

https://github.com/ngoldbaum/asv-test

I triggered this originally in NumPy using the spin bench command there but it seems to happen for any asv invocation. It doesn't happen in Python 3.14.

I get this error related to the new profiling package:

   STDERR -------->
   Traceback (most recent call last):
     File "/Users/goldbaum/Documents/asv/asv/benchmark.py", line 28, in <module>
       from asv_runner.check import _check
     File "/Users/goldbaum/Documents/asv-test/.asv/env/cd798b7ef47a53e6e39627ac1d9d9f01/lib/python3.15t/site-packages/asv_runner/check.py", line 3, in <module>
       from ._aux import update_sys_path
     File "/Users/goldbaum/Documents/asv-test/.asv/env/cd798b7ef47a53e6e39627ac1d9d9f01/lib/python3.15t/site-packages/asv_runner/_aux.py", line 7, in <module>
       from .benchmarks._maxrss import set_cpu_affinity
     File "/Users/goldbaum/Documents/asv-test/.asv/env/cd798b7ef47a53e6e39627ac1d9d9f01/lib/python3.15t/site-packages/asv_runner/benchmarks/__init__.py", line 61, in <module>
       module = importlib.import_module(f"{pkgname}.{module_name}")
     File "/Users/goldbaum/.pyenv/versions/3.15.0a8t/lib/python3.15t/importlib/__init__.py", line 88, in import_module
       return _bootstrap._gcd_import(name[level:], package, level)
              ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/Users/goldbaum/Documents/asv-test/.asv/env/cd798b7ef47a53e6e39627ac1d9d9f01/lib/python3.15t/site-packages/asv_runner/benchmarks/mem.py", line 4, in <module>
       from ._base import Benchmark
     File "/Users/goldbaum/Documents/asv-test/.asv/env/cd798b7ef47a53e6e39627ac1d9d9f01/lib/python3.15t/site-packages/asv_runner/benchmarks/_base.py", line 1, in <module>
       import cProfile as profile
     File "/Users/goldbaum/.pyenv/versions/3.15.0a8t/lib/python3.15t/cProfile.py", line 7, in <module>
       from profiling.tracing import run, runctx, Profile
   ModuleNotFoundError: No module named 'profiling.tracing'; 'profiling' is not a package

CPython versions tested on:

3.15

Operating systems tested on:

macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.15new features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directorytopic-profilingtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions