Jason R. Coombs <jar...@jaraco.com> added the comment:

Thanks William for the detailed problem description.

If the issue has been fixed on Python 3.9 but not on 3.8, then it was likely a 
redesign that enabled the improved behavior, a redesign that won't be ported 
back to Python 3.8 and earlier. In these situations, the best recommendation is 
often to just rely on importlib_resources (the backport) for those older Python 
versions.

In this case, you've identified a fairly surgical fix that may be suitable to 
apply to these older affected Pythons, so I'll consider that, but before I do, 
have you considered using importlib_resources for Python 3.8 and earlier? That 
would likely also address the issue and you could adopt it sooner.

To some extent, the behavior you've described could be considered a bug or 
could be considered a feature request (add support for path on packages that 
have no __spec__.origin). I am not aware whether this limitation was by design 
or incidental.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42531>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to