Miro Hrončok <m...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue44451>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to