Bug 2259516 - python-setuptools fails to build with Python 3.13: AssertionError (2 tests fail)
Summary: python-setuptools fails to build with Python 3.13: AssertionError (2 tests fail)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-setuptools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.13
TreeView+ depends on / blocked
 
Reported: 2024-01-22 07:57 UTC by Karolina Surma
Modified: 2024-05-14 19:38 UTC (History)
6 users (show)

Fixed In Version: python-setuptools-69.2.0-3.fc41
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-05-14 19:38:10 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-setuptools pull-request 114 0 None None None 2024-05-14 14:32:36 UTC
Github pypa setuptools issues 4196 0 None open [BUG] [doctest] pkg_resources.NullProvider._validate_resource_path and TestWriteEntries.test_invalid_entry_point fail wi... 2024-01-29 15:49:30 UTC
Github pypa setuptools pull 4356 0 None open Explicitly disallow resource paths starting with single backslash 2024-05-14 14:32:36 UTC
Github pypa setuptools pull 4357 0 None open Make the validation test for entry-points work with Python 3.13+ 2024-05-14 14:32:36 UTC

Description Karolina Surma 2024-01-22 07:57:28 UTC
python-setuptools fails to build with Python 3.13.0a2.

=================================== FAILURES ===================================
_________ [doctest] pkg_resources.NullProvider._validate_resource_path _________
1609 >>> vrp('foo/../../bar.txt')
1610 >>> bool(warned)
1611 True
1612 >>> warned.clear()
1613 >>> vrp('foo/f../bar.txt')
1614 >>> bool(warned)
1615 False
1616 
1617 Windows path separators are straight-up disallowed.
1618 >>> vrp(r'\foo/bar.txt')
Expected:
    Traceback (most recent call last):
    ...
    ValueError: Use of .. or absolute path in a resource path is not allowed.
Got nothing

/builddir/build/BUILD/setuptools-68.2.2/pkg_resources/__init__.py:1618: DocTestFailure
__________________ TestWriteEntries.test_invalid_entry_point ___________________

self = <setuptools.tests.test_egg_info.TestWriteEntries object at 0x7f7a39cef980>
tmpdir_cwd = local('/builddir/build/BUILD/setuptools-68.2.2')
env = '/tmp/setuptools-test.dm0g95jt'

    def test_invalid_entry_point(self, tmpdir_cwd, env):
        dist = Distribution({"name": "foo", "version": "0.0.1"})
        dist.entry_points = {"foo": "foo = invalid-identifier:foo"}
        cmd = dist.get_command_obj("egg_info")
        expected_msg = r"Problems to parse .*invalid-identifier.*"
        with pytest.raises(errors.OptionError, match=expected_msg) as ex:
>           write_entries(cmd, "entry_points", "entry_points.txt")

/builddir/build/BUILD/setuptools-68.2.2/setuptools/tests/test_egg_info.py:1310: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/builddir/build/BUILD/setuptools-68.2.2/setuptools/command/egg_info.py:719: in write_entries
    eps = _entry_points.load(cmd.distribution.entry_points)
/usr/lib64/python3.13/functools.py:911: in wrapper
    return dispatch(args[0].__class__)(*args, **kw)
/builddir/build/BUILD/setuptools-68.2.2/setuptools/_entry_points.py:59: in load
    return validate(metadata.EntryPoints(groups))
/builddir/build/BUILD/setuptools-68.2.2/setuptools/_entry_points.py:47: in validate
    consume(map(ensure_valid, ensure_unique(eps, key=by_group_and_name)))
/builddir/build/BUILD/setuptools-68.2.2/setuptools/_vendor/more_itertools/recipes.py:139: in consume
    deque(iterator, maxlen=0)
/builddir/build/BUILD/setuptools-68.2.2/setuptools/_entry_points.py:19: in ensure_valid
    ep.extras
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = EntryPoint(name='foo', value='invalid-identifier:foo', group='foo')

    @property
    def extras(self) -> List[str]:
        match = self.pattern.match(self.value)
>       assert match is not None
E       AssertionError

/usr/lib64/python3.13/importlib/metadata/__init__.py:197: AssertionError
=========================== short test summary info ============================
= 2 failed, 1051 passed, 20 skipped, 7 deselected, 5 xfailed, 1 xpassed in 82.91s (0:01:22) =

https://docs.python.org/3.13/whatsnew/3.13.html

For the build logs, see:
https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/06936898-python-setuptools/

For all our attempts to build python-setuptools with Python 3.13, see:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/python-setuptools/

Testing and mass rebuild of packages is happening in copr.
You can follow these instructions to test locally in mock if your package builds with Python 3.13:
https://copr.fedorainfracloud.org/coprs/g/python/python3.13/

Let us know here if you have any questions.

Python 3.13 is planned to be included in Fedora 41.
To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13.
A build failure prevents us from testing all dependent packages (transitive [Build]Requires),
so if this package is required a lot, it's important for us to get it fixed soon.

We'd appreciate help from the people who know this package best,
but if you don't want to work on this now, let us know so we can try to work around it on our side.

Comment 1 Karolina Surma 2024-01-29 15:49:31 UTC
Posted upstream: https://github.com/pypa/setuptools/issues/4196

Comment 2 Aoife Moloney 2024-02-15 23:11:01 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 40 development cycle.
Changing version to 40.

Comment 4 Fedora Update System 2024-05-14 16:16:12 UTC
FEDORA-2024-32c107568a (python-setuptools-69.2.0-3.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2024-32c107568a

Comment 5 Fedora Update System 2024-05-14 19:38:10 UTC
FEDORA-2024-32c107568a (python-setuptools-69.2.0-3.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.