Skip to content

No module named 'tomllib' #102

@mtelka

Description

@mtelka

Testing of version 1.0.2 fails with Python 3.9.25:

ERROR: testpypi_prepublish (unittest.loader._FailedTest)
----------------------------------------------------------------------
ImportError: Failed to import test module: testpypi_prepublish
Traceback (most recent call last):
  File "/usr/lib/python3.9/unittest/loader.py", line 436, in _find_test_path
    module = self._get_module_from_name(name)
  File "/usr/lib/python3.9/unittest/loader.py", line 377, in _get_module_from_name
    __import__(name)
  File "/data/builds/ul-mass-rebuild/components/python/pathspec/build/amd64-3.9/testpypi_prepublish.py", line 10, in <module>
    import tomllib
ModuleNotFoundError: No module named 'tomllib'

This is because tomllib is not in Python < 3.11 (see https://docs.python.org/3/library/tomllib.html).
Unfortunately, pathspec still declares support for Python >= 3.9 (see pyproject.toml).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions