[issue44451] test_entry_points_by_index (test.test_importlib.test_metadata_api.APITests) fails on Fedora 33 and 34

Miro Hrončok report at bugs.python.org
Fri Jun 18 08:36:13 EDT 2021


Miro Hrončok <miro at hroncok.cz> added the comment:

I get the DeprecationWarning the tests assumes when not running via the test:

$ cat distinfo_pkg-1.0.0.dist-info/entry_points.txt 
[entries]
main = mod:main
ns:sub = mod:main

$ ./python
Python 3.11.0a0 (heads/main:0982ded179, Jun 18 2021, 14:14:16) [GCC 10.3.1 20210422 (Red Hat 10.3.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys
>>> sys.path.insert(0, os.path.abspath('.'))
>>> from importlib.metadata import distribution
>>> distribution('distinfo-pkg')
<importlib.metadata.PathDistribution object at 0x7f1796d8bcd0>
>>> eps = distribution('distinfo-pkg').entry_points
>>> eps[0]
<stdin>:1: DeprecationWarning: Accessing entry points by index is deprecated. Cast to tuple if needed.
EntryPoint(name='main', value='mod:main', group='entries')


Not sure why I don't get it in the test yet.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44451>
_______________________________________


More information about the Python-bugs-list mailing list