Filipe Laíns
ede5693be1
GH-119668: expose importlib.machinery.NamespacePath ( #119669 )
...
* GH-119668: expose importlib.NamespacePath
Signed-off-by: Filipe Laíns <lains@riseup.net>
* add news
Signed-off-by: Filipe Laíns <lains@riseup.net>
* add to docs
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Apply suggestions from code review
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
* Fix news (importlib.NamespacePath > importlib.machinery.NamespacePath)
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Link to module.__path__ in NamespacePath docs
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Mention the path argument in the documentation
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Simplify docs text
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Highlight argument names in docs text
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Update Lib/importlib/_bootstrap_external.py
Co-authored-by: Brett Cannon <brett@python.org>
* Rewrite NamespacePath's doc
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Specify path_finder's type in the NamespacePath docstring
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Fix doc tests
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Apply suggestions from code review
Co-authored-by: Barry Warsaw <barry@python.org>
* Fix doc lint
Signed-off-by: Filipe Laíns <lains@riseup.net>
* Update Doc/library/importlib.rst
Co-authored-by: Brett Cannon <brett@python.org>
---------
Signed-off-by: Filipe Laíns <lains@riseup.net>
Co-authored-by: Brett Cannon <brett@python.org>
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: Barry Warsaw <barry@python.org>
2025-11-01 00:39:48 +00:00
Tomas R.
bd3baa8b1a
gh-121604: Make sure all deprecated items in importlib raise DeprecationWarning ( #128007 )
...
Co-authored-by: rashansmith <smith.rashan@gmail.com>
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
Co-authored-by: Brett Cannon <brett@python.org>
2025-01-14 16:48:46 -08:00
Victor Stinner
05df063ad8
gh-120417: Fix "imported but unused" linter warnings ( #120461 )
...
Add __all__ to the following modules:
importlib.machinery, importlib.util and xml.sax.
Add also "# noqa: F401" in collections.abc,
subprocess and xml.sax.
* Sort __all__; remove collections.abc.__all__; remove private names
* Add tests
2024-06-14 20:39:50 +02:00
Russell Keith-Magee
408e127159
gh-114099 - Add iOS framework loading machinery. (GH-116454)
...
Co-authored-by: Malcolm Smith <smith@chaquo.com>
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
2024-03-19 08:36:19 -04:00
Barry Warsaw
876fc7fcec
bpo-35673: Add a public alias for namespace package __loader__ attribute ( #29049 )
...
Rename namespace package __loader__ class to be public.
Make the old name, i.e. _NamespaceLoader, an alias for the public name, for backward compatibility.
2021-10-20 14:05:29 -07:00
Victor Stinner
7d9d25dbed
bpo-42403: Fix pyflakes warnings in importlib (GH-23396)
...
Remove unused imports and unused local variables.
2020-11-19 11:20:57 +01:00
Eric Snow
32439d6eb6
Issue #23911 : Move path-based bootstrap code to a separate frozen module.
2015-05-02 19:15:18 -06:00
Eric Snow
b523f8433a
Implement PEP 451 (ModuleSpec).
2013-11-22 09:05:39 -07:00
Brett Cannon
ac9f2f3de3
Issue #15576 : Allow extension modules to be a package's __init__
...
module again. Also took the opportunity to stop accidentally exporting
_imp.extension_suffixes() as public.
2012-08-10 13:47:54 -04:00
Nick Coghlan
ff79486bb5
Close #15519 : Properly expose WindowsRegistryFinder in importlib and bring the name into line with normal import terminology. Original patch by Eric Snow
2012-08-02 21:45:24 +10:00
Nick Coghlan
76e077001d
Close #15387 : inspect.getmodulename() now uses a new importlib.machinery.all_suffixes() API rather than the deprecated inspect.getmoduleinfo()
2012-07-18 23:14:57 +10:00
Brett Cannon
cb66eb0dec
Issue #13959 : Deprecate imp.get_suffixes() for new attributes on
...
importlib.machinery that provide the suffix details for import.
The attributes were not put on imp so as to compartmentalize
everything importlib needs for setting up imports in
importlib.machinery.
This also led to an indirect deprecation of inspect.getmoduleinfo() as
it directly returned imp.get_suffix's returned tuple which no longer
makes sense.
2012-05-11 12:58:42 -04:00
Marc-Andre Lemburg
4fe29c9657
Issue #14605 : Rename _SourcelessFileLoader to SourcelessFileLoader.
...
This time also recreating the Python/importlib.h file to make
make happy. See the ticket for details.
2012-04-25 02:31:37 +02:00
Marc-Andre Lemburg
ac8805a01a
Issue #14605 : Revert renaming of _SourcelessFileLoader, since it caused
...
the buildbots to fail.
2012-04-25 02:11:07 +02:00
Marc-Andre Lemburg
2945e78b05
Issue #14605 : Rename _SourcelessFileLoader to SourcelessFileLoader
2012-04-25 01:36:48 +02:00
Brett Cannon
938d44d59c
Issue #14605 : Expose importlib.abc.FileLoader and
...
importlib.machinery.(FileFinder, SourceFileLoader,
_SourcelessFileLoader, ExtensionFileLoader).
This exposes all of importlib's mechanisms that will become public on
the sys module.
2012-04-22 19:58:33 -04:00
Brett Cannon
fa3d1fc6a3
Check in the fact that importlib.machinery.PathFinder now exists.
2009-02-05 02:52:57 +00:00
Brett Cannon
5abdc93eb8
Add importlib.machinery with its first tenants, BuitinImporter and
...
FrozenImporter. Docs forthcoming.
I plan on all finders and loaders (and most likely hooks) to live
in imoprtlib.machinery. Utility stuff will end up in importlib.util.
Higher-level API stuff will stay on imoprtlib directly (e.g. import_module).
2009-01-22 22:43:07 +00:00