Skip to content

importlib.abc.Traversable is removed in Python 3.14 #401

Closed

Description

@neuromechanist

What

src/eegprep/functions/guifunc/pophelp.py:6 imports:

from importlib.abc import Traversable

importlib.abc.Traversable is deprecated since Python 3.12 and removed in 3.14.
It emits a DeprecationWarning on 3.13, which is visible at test collection today.

Why it is not urgent, and why it should not be forgotten

Not a problem for the current floor. #399 sets requires-python = ">=3.12" and tests 3.12 and
3.13, and the import still works on both.

It becomes a hard failure the moment the project moves to 3.14, and there is a specific reason
that will come up sooner than usual here: Pyodide's bundled CPython is what the browser target
runs, currently 3.13.2, and it tracks upstream. When a Pyodide release ships 3.14, this import
stops working in the browser rather than in someone's local environment.

Fix

The replacement is importlib.resources.abc.Traversable, available since 3.11, so on a 3.12 floor
it can simply be swapped with no compatibility shim:

from importlib.resources.abc import Traversable

Worth grepping for other importlib.abc uses at the same time.

Related

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions