[issue35673] Loader for namespace packages

2021-10-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Oct 20, 2021, at 11:27, Brett Cannon wrote: > >> That should probably be a separate issue/PR in either case. > > https://bugs.python.org/issue38782 and I was trying to rope you into doing > the work.  Ha! You should have nosied me then :D - but

[issue35673] Loader for namespace packages

2021-10-20 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35673] Loader for namespace packages

2021-10-20 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: New changeset 876fc7fcec9a79a11546b7588d3683a5ccb4d31c by Barry Warsaw in branch 'main': bpo-35673: Add a public alias for namespace package __loader__ attribute (#29049) https://github.com/python/cpython/commit/876fc7fcec9a79a11546b7588d3683a5ccb4d31c

[issue35673] Loader for namespace packages

2021-10-20 Thread Eric Snow
Eric Snow added the comment: On Mon, Jan 7, 2019 at 11:41 PM Eric V. Smith wrote: > Namespace packages (PEP 420) predate ModuleSpec (PEP 451). So, I think this > probably happened when 451 was implemented. Maybe Eric Snow recalls? PEP 451 talks about this a little

[issue35673] Loader for namespace packages

2021-10-20 Thread Brett Cannon
Brett Cannon added the comment: > What benefit would be gained? The ABCs are broader than what the import system actually requires due to their helper methods. So for typing purposes they are actually not a perfect fit. > That should probably be a separate issue/PR in either case.

[issue35673] Loader for namespace packages

2021-10-19 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I don't know. What benefit would be gained? That should probably be a separate issue/PR in either case. -- ___ Python tracker ___

[issue35673] Loader for namespace packages

2021-10-19 Thread Brett Cannon
Brett Cannon added the comment: Should we register with the ABC or is it time to do proper typing.Protocol classes and have the ABCs inherit from those? -- ___ Python tracker

[issue35673] Loader for namespace packages

2021-10-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: Since the documentation problem reported here has since been fixed, and really all that's left is to expose NamespaceLoader publicly and register it with the abc, this is technically a new feature so it can't be backported. Thus, targeting only 3.11.

[issue35673] Loader for namespace packages

2021-10-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: First crack at a PR for this issue. -- keywords: +needs review -patch ___ Python tracker ___

[issue35673] Loader for namespace packages

2021-10-18 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- keywords: +patch pull_requests: +27320 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29049 ___ Python tracker ___

[issue35673] Loader for namespace packages

2021-10-18 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- versions: +Python 3.10, Python 3.11, Python 3.9 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue35673] Loader for namespace packages

2021-10-18 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: I'm going to take a look at this during the Python core sprint. -- assignee: -> barry ___ Python tracker ___

[issue35673] Loader for namespace packages

2021-07-31 Thread Filipe Laíns
Change by Filipe Laíns : -- nosy: +FFY00 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35673] Loader for namespace packages

2021-07-16 Thread Eric V. Smith
Eric V. Smith added the comment: I think a PR with tests would be a good first step. -- ___ Python tracker ___ ___

[issue35673] Loader for namespace packages

2021-07-16 Thread Isaac
Isaac added the comment: Not sure if it's proper etiquette to bump issues on the tracker, but is there any interest in this issue for 3.11? -- nosy: +fwahhab ___ Python tracker

[issue35673] Loader for namespace packages

2019-01-08 Thread Eric V. Smith
Eric V. Smith added the comment: I think exposing _NamespaceLoader as NamespaceLoader and registering the ABC make sense. That would make this in to a feature request for 3.8. -- ___ Python tracker

[issue35673] Loader for namespace packages

2019-01-08 Thread Ronald Oussoren
Ronald Oussoren added the comment: The background for all of this: I'm currently rewriting modulegraph (https://pypi.org/project/modulegraph/) to use importlib instead of its own implementation of the import mechanism. I currently detect PEP420 style namespace packages, but I'm not sure if

[issue35673] Loader for namespace packages

2019-01-07 Thread Eric V. Smith
Eric V. Smith added the comment: Namespace packages (PEP 420) predate ModuleSpec (PEP 451). So, I think this probably happened when 451 was implemented. Maybe Eric Snow recalls? I say this without having looked at it very deeply. As to why the namespace package loader is a private class: it

[issue35673] Loader for namespace packages

2019-01-07 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Jan 7, 2019, at 03:16, Ronald Oussoren wrote: > > Do you know why the namespace package loader lies about the source and code? > Both .get_source() and .get_code() return a value that isn't None. > And likewise: Why is the namespace package loader a

[issue35673] Loader for namespace packages

2019-01-07 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35673] Loader for namespace packages

2019-01-07 Thread Ronald Oussoren
Ronald Oussoren added the comment: @barry: I agree on both. Do you know why the namespace package loader lies about the source and code? Both .get_source() and .get_code() return a value that isn't None. And likewise: Why is the namespace package loader a private class, other loaders are

[issue35673] Loader for namespace packages

2019-01-06 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On the first point, I'd categorize this as a documentation bug, and in fact, it's inconsistent with the language reference, which doesn't have the same language: https://docs.python.org/3/reference/import.html#__loader__ On the second point, it probably

[issue35673] Loader for namespace packages

2019-01-06 Thread Barry A. Warsaw
Change by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35673] Loader for namespace packages

2019-01-06 Thread Ronald Oussoren
New submission from Ronald Oussoren : The documentation for import lib.machinery.ModuleSpec says that the attribute "loader" should be None for namespace packages (see ) In reality the loader for namespace