[Import-SIG] making it feasible to rely on loaders for reading intra-package data files

Nick Coghlan ncoghlan at gmail.com
Wed Feb 5 06:13:57 CET 2014


On 5 Feb 2014 02:28, "Barry Warsaw" <barry at python.org> wrote:
>
> On Feb 05, 2014, at 01:55 AM, Nick Coghlan wrote:
>
> >But unfortunately, you can't even import pkg_resources to get at those
> >without it version locking your entire sys.path.
>
> Which supports my point, i.e. that the stdlib should provide reasonable
> implementations of these APIs that we can promote far and wide.  But FWIW,
> I've never run into the pkg_resource problems you're describing.

If I hadn't started working on a production RHEL application in a Fedora
dev environment, I doubt I would have either :)

Fedora hits it because we use pkg_resources dependent layouts to ship
potentially API incompatible versions of Python packages (CherryPy2 v 3,
modern Sphinx in EPEL, etc) that target a common system Python install.

The problem is that pkg_resources assumes that either *all* packages are on
sys.path by default or none of them are, and doesn't allow requirements to
be supplied incrementally, so while this model *does* work, it isn't always
pretty and can generate some rather confusing error messages.

The key advantages of a new replacement package for the tasks that
pkg_resources handles are being able to improve the handling of this
scenario, break up the interface to better handle less-Chandler-like use
cases in general, simplify the implementation and decouple it from
setuptools. However, finding the roundtuits to work on it is a serious
challenge, especially when pkg_resources isn't generally *broken*, just
user-unfriendly in some cases. It also takes a fairly deep knowledge of
both packaging and the import system to even attempt to tackle it, so the
intersection between "has the required expertise" and "is interested and
available" is currently the null set :P

Cheers,
Nick.

>
> -Barry
>
> _______________________________________________
> Import-SIG mailing list
> Import-SIG at python.org
> https://mail.python.org/mailman/listinfo/import-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/import-sig/attachments/20140205/117b8ec4/attachment.html>


More information about the Import-SIG mailing list