Skip to content

Test error in python 3.15 #3207

Closed
Closed

Description

@coogor

Python-Werkzeug:Test fails due to deprecated modules in Python 3.15.

Visit https://build.opensuse.org/package/live_build_log/devel:languages:python/python-Werkzeug:test/py315/x86_64

Package devel:languages:python/python-Werkzeug:test failed to build in py315/x86_64

Last lines of build log:
[ 18s] from cProfile import Profile
[ 18s] /usr/lib64/python3.15/cProfile.py:7: in
[ 18s] from profiling.tracing import run, runctx, Profile
[ 18s] E ModuleNotFoundError: Standard library module 'profiling' was not found
[ 18s]
[ 18s] During handling of the above exception, another exception occurred:
[ 18s] tests/middleware/test_profiler.py:7: in
[ 18s] from werkzeug.middleware.profiler import Profile
[ 18s] /usr/lib/python3.15/site-packages/werkzeug/middleware/profiler.py:26: in
[ 18s] from profile import Profile # type: ignore
[ 18s] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 18s] /usr/lib64/python3.15/profile.py:36: in
[ 18s] warnings.warn(
[ 18s] E DeprecationWarning: The profile module is deprecated and will be removed in Python 3.17. Use profiling.tracing (or cProfile) for tracing profilers instead.
[ 18s] =========================== short test summary info ============================
[ 18s] ERROR tests/middleware/test_profiler.py - DeprecationWarning: The profile mod...
[ 18s] !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
[ 18s] ======================= 43 deselected, 1 error in 2.11s ========================
[ 18s] pytest-xprocess reminder::Be sure to terminate the started process by running 'pytest --xkill' if you have not explicitly done so in your fixture with 'xprocess.getinfo(<process_name>).terminate()'.
[ 19s] error: Bad exit status from /var/tmp/rpm-tmp.vlR7h1 (%check)

Activity

  1. davidism commented on Jul 30, 2026

    @davidism
    Member

    I couldn't reproduce this at first, I realized that somehow your Python build doesn't include cProfile, so it falls back to profile. And only profile raises the warning.

    It looks like you're also not building profiling.tracing? You should probably fix that, as there won't be a fallback module anymore. If you fix that, it will also solve this, as cProfile remains available on all versions (profiling.tracing is a rename of it).

  2. added this to the 3.2.0 milestone on Jul 30, 2026
  3. linked a pull request that will close this issueuse `profiling.tracing` on Python 3.15 #3216on Jul 30, 2026
  4. modified the milestones: 3.2.0, 3.1.9 on Jul 30, 2026
  5. locked as resolved and limited conversation to collaborators on Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions