Skip to content

[BUG] pkgutil find_loader is deprecated in Python 3.14. #3326

Description

@vex87

Thank you so much for helping improve the quality of Dash!

We do our best to catch bugs during the release process, but we rely on your help to find the ones that slip through.

Describe your context
Please provide us your environment, so we can easily reproduce the issue.

  • replace the result of pip list | grep dash below
dash                    3.0.4
dash_mantine_components 1.2.0
  • if frontend related, tell us your Browser, Version and OS

    • OS: win11

Describe the bug

    app.run(debug=True)
    ~~~~~~~^^^^^^^^^^^^
  File "E:\project\ElasticsearchTool\.venv\Lib\site-packages\dash\dash.py", line 2186, in run
    debug = self.enable_dev_tools(
        debug,
    ...<9 lines>...
        dev_tools_prune_errors,
    )
  File "E:\project\ElasticsearchTool\.venv\Lib\site-packages\dash\dash.py", line 1895, in enable_dev_tools
    pkgutil.find_loader(x)
    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'find_loader'

Use importlib.util.find_spec() instead. Will be removed in Python 3.14.Pylance

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots or screen recording to help explain your problem.

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