PEP 376 & pkgutil - Quick question

Hi all, PEP 376 mentions several new functions that were anticipated to be implemented in pkgutil to read from the dist-info directories that are created when a wheel is installed: https://www.python.org/dev/peps/pep-0376/#new-functions-and-classes-in-pkgut... But, I don't see them implemented at least as of Python 3.7: https://docs.python.org/3.7/library/pkgutil.html Are those functions implemented somewhere, perhaps outside the standard library? --Eric

First, I would advise against using pkgutil as I'm working towards deprecating it (it predates Python's modern import implementation and so it makes some bad assumptions). Second, it sounds like you're interested in https://pypi.org/project/importlib-metadata/. On Wed, Apr 10, 2019 at 12:50 PM Eric Peterson < epeterson@interactivebrokers.com> wrote:
Hi all,
PEP 376 mentions several new functions that were anticipated to be implemented in pkgutil to read from the dist-info directories that are created when a wheel is installed:
https://www.python.org/dev/peps/pep-0376/#new-functions-and-classes-in-pkgut...
But, I don't see them implemented at least as of Python 3.7:
https://docs.python.org/3.7/library/pkgutil.html
Are those functions implemented somewhere, perhaps outside the standard library?
--Eric -- Distutils-SIG mailing list -- distutils-sig@python.org To unsubscribe send an email to distutils-sig-leave@python.org https://mail.python.org/mailman3/lists/distutils-sig.python.org/ Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/FIFTW...

Thanks very much for the information, I will take a look at the importlib-metadata project. After looking into it further, It seems like many, perhaps all, of the functions in PEP 376 were implemented in distlib: https://pypi.org/project/distlib/ https://bitbucket.org/pypa/distlib —Eric On Apr 11, 2019, at 4:28 PM, Brett Cannon <brett@python.org<mailto:brett@python.org>> wrote: First, I would advise against using pkgutil as I'm working towards deprecating it (it predates Python's modern import implementation and so it makes some bad assumptions). Second, it sounds like you're interested in https://pypi.org/project/importlib-metadata/<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpypi.org%2Fproject%2Fimportlib-metadata%2F&data=01%7C01%7Cepeterson%40interactivebrokers.com%7C94b581248b6f4c848f6808d6bebc599b%7C7abd04ef837d48e69ba869d84f65a110%7C0&sdata=QoPgkkogL9UmiB2lWq4SMBc5VL8U8SzkW4POAoWaGWA%3D&reserved=0>. On Wed, Apr 10, 2019 at 12:50 PM Eric Peterson <epeterson@interactivebrokers.com<mailto:epeterson@interactivebrokers.com>> wrote: Hi all, PEP 376 mentions several new functions that were anticipated to be implemented in pkgutil to read from the dist-info directories that are created when a wheel is installed: https://www.python.org/dev/peps/pep-0376/#new-functions-and-classes-in-pkgutil<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.python.org%2Fdev%2Fpeps%2Fpep-0376%2F%23new-functions-and-classes-in-pkgutil&data=01%7C01%7Cepeterson%40interactivebrokers.com%7C94b581248b6f4c848f6808d6bebc599b%7C7abd04ef837d48e69ba869d84f65a110%7C0&sdata=49lWHwhSjwA0y1SR3hxWL%2FIrUj7lARyN5av6UnBpP8o%3D&reserved=0> But, I don't see them implemented at least as of Python 3.7: https://docs.python.org/3.7/library/pkgutil.html<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.python.org%2F3.7%2Flibrary%2Fpkgutil.html&data=01%7C01%7Cepeterson%40interactivebrokers.com%7C94b581248b6f4c848f6808d6bebc599b%7C7abd04ef837d48e69ba869d84f65a110%7C0&sdata=bx3wwGKHx1lQQS%2BDhhAul%2BRGfihY2l0dRsovncEJ0tc%3D&reserved=0> Are those functions implemented somewhere, perhaps outside the standard library? --Eric -- Distutils-SIG mailing list -- distutils-sig@python.org<mailto:distutils-sig@python.org> To unsubscribe send an email to distutils-sig-leave@python.org<mailto:distutils-sig-leave@python.org> https://mail.python.org/mailman3/lists/distutils-sig.python.org/<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Fmailman3%2Flists%2Fdistutils-sig.python.org%2F&data=01%7C01%7Cepeterson%40interactivebrokers.com%7C94b581248b6f4c848f6808d6bebc599b%7C7abd04ef837d48e69ba869d84f65a110%7C0&sdata=rVA8CIv1AbSyfHe9srLLt%2BxyGAqLAhZMEkA%2FlLTbVL0%3D&reserved=0> Message archived at https://mail.python.org/archives/list/distutils-sig@python.org/message/FIFTW63X3CQCZYSLHY6TXC4U43ZFU4QH/<https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.python.org%2Farchives%2Flist%2Fdistutils-sig%40python.org%2Fmessage%2FFIFTW63X3CQCZYSLHY6TXC4U43ZFU4QH%2F&data=01%7C01%7Cepeterson%40interactivebrokers.com%7C94b581248b6f4c848f6808d6bebc599b%7C7abd04ef837d48e69ba869d84f65a110%7C0&sdata=Ki6CDCJ4A8fJYFMTTNW7q6MzwOAFt%2FuIogh7QLcK61k%3D&reserved=0>

On Fri, 12 Apr 2019 at 06:39, Eric Peterson <epeterson@interactivebrokers.com> wrote:
Thanks very much for the information, I will take a look at the importlib-metadata project.
After looking into it further, It seems like many, perhaps all, of the functions in PEP 376 were implemented in distlib:
https://pypi.org/project/distlib/ https://bitbucket.org/pypa/distlib
Aye, that's the most comprehensive toolkit for packaging related tasks, since it covers many of the never-actually-standardised pieces that were defined by the distutils and setuptools implementations. I've filed https://github.com/python/peps/issues/998 to note that we should clean up that old "Implementation Details" section in PEP 376 to better match what actually happened. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (3)
-
Brett Cannon
-
Eric Peterson
-
Nick Coghlan