Nick Coghlan
cee29b46a1
bpo-35486: Note Py3.6 import system API requirement change (GH-11540)
...
While the introduction of ModuleNotFoundError was fully backwards
compatible on the import API consumer side, folks providing alternative
implementations of `__import__` need to make an update to be
forward compatible with clients that start relying on the new subclass.
https://bugs.python.org/issue35486
2019-01-17 02:41:29 -08:00
Serhiy Storchaka
2b57c43f21
bpo-35506: Remove redundant and incorrect links from keywords. (GH-11174)
2018-12-19 08:09:46 +02:00
E Kawashima
16c8a53490
[Docs] Fix required version of an example of importlib (GH-10118)
...
§31.5.6.3. Importing a source file directly: `module_from_spec` is new in Python 3.5.
2018-11-05 23:41:17 +01:00
Stéphane Wirtel
e483f02423
bpo-35044, doc: Use the :exc: role for the exceptions (GH-10037)
2018-10-26 12:52:11 +02:00
orlnub123
78401f7156
importlib doc: Fix approximated import_module() code (GH-9945)
...
The spec gets stored on modules with the __spec__ attribute, not spec.
2018-10-25 01:32:26 +02:00
Andrés Delfino
65b5ef02ec
Fix the versionadded indentation in exec_module doc (GH-8719)
2018-08-11 23:50:46 -07:00
Xtreak
c151f7846d
bpo-33859: Fix spelling mistakes in docs. (GH-7691)
2018-06-16 08:08:31 +03:00
Brett Cannon
3ab9365dca
bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467)
2018-04-30 11:31:45 -07:00
Brett Cannon
9e2be60634
bpo-33169: Remove values of `None` from sys.path_importer_cache when invalidating caches (GH-6402)
...
An entry of None in sys.path_importer_cache represents a negative/missing finder for a path, so clearing it out makes sense.
2018-04-06 16:10:18 -07:00
Himanshu Lakhara
5cbb84106e
bpo-27428: Fix WindowsRegistryFinder documentation to list appropriate ABC (GH-6061)
2018-03-23 14:26:35 -07:00
Barry Warsaw
997b8c140e
Update and sync importlib.resources documentation ( #5694 )
2018-02-16 10:45:39 -05:00
Barry Warsaw
bbbcf8693b
bpo-32303 - Consistency fixes for namespace loaders ( #5481 )
...
* Make sure ``__spec__.loader`` matches ``__loader__`` for namespace packages.
* Make sure ``__spec__.origin` matches ``__file__`` for namespace packages.
https://bugs.python.org/issue32303
https://bugs.python.org/issue32305
2018-02-02 15:15:58 -05:00
Brett Cannon
bca42186b6
bpo-32248: Introduce the concept of Loader.get_resource_reader() (GH-5108)
2018-01-12 15:08:59 -08:00
Barry Warsaw
deae6b451f
bpo-32248 - Implement importlib.resources ( #4911 )
...
Port importlib_resources to importlib.resources
2017-12-30 15:18:06 -05:00
Brett Cannon
4ac5150e06
bpo-32248: Implement importlib.abc.ResourceReader (GH-4892)
2017-12-15 16:29:35 -08:00
Benjamin Peterson
42aa93b8ff
closes bpo-31650: PEP 552 (Deterministic pycs) implementation ( #4575 )
...
Python now supports checking bytecode cache up-to-dateness with a hash of the
source contents rather than volatile source metadata. See the PEP for details.
While a fairly straightforward idea, quite a lot of code had to be modified due
to the pervasiveness of pyc implementation details in the codebase. Changes in
this commit include:
- The core changes to importlib to understand how to read, validate, and
regenerate hash-based pycs.
- Support for generating hash-based pycs in py_compile and compileall.
- Modifications to our siphash implementation to support passing a custom
key. We then expose it to importlib through _imp.
- Updates to all places in the interpreter, standard library, and tests that
manually generate or parse pyc files to grok the new format.
- Support in the interpreter command line code for long options like
--check-hash-based-pycs.
- Tests and documentation for all of the above.
2017-12-09 10:26:52 -08:00
Barry Warsaw
191e313820
bpo-31799: Make module.__spec__ more discoverable ( #4010 )
...
bpo-31799: Make module.__spec__ more discoverable
2017-10-17 15:52:38 -04:00
Benjamin Peterson
60dbed1850
link to legacy doc on the non-legacy website ( #3362 )
2017-09-05 16:24:39 -07:00
Milan Oberkirch
8c3f05e9f0
bpo-30436: Raise ModuleNotFoundError for importlib.util.find_spec() when parent isn't a package (GH-1899)
...
Previously AttributeError was raised, but that's not very reflective of the fact that the requested module can't be found since the specified parent isn't actually a package.
2017-06-14 14:34:50 -07:00
Garvit Khatri
94987826e8
bpo-29851: Have importlib.reload() raise ImportError if the module's spec is not found (GH-972)
2017-05-24 15:19:50 -07:00
Steve Dower
20367420c8
Issue #28896 : Deprecate WindowsRegistryFinder
2016-12-07 13:02:27 -08:00
Serhiy Storchaka
e418432dfb
Fixed double hyphens that are rendered to literal en-dashes in the documenation.
2016-12-04 10:22:09 +02:00
Serhiy Storchaka
29b0a26822
Fixed double hyphens that are rendered to literal en-dashes in the documenation.
2016-12-04 10:20:55 +02:00
Serhiy Storchaka
989db5c880
Issue #19795 : Mark up None as literal text.
2016-10-19 16:37:13 +03:00
Serhiy Storchaka
ecf41da83e
Issue #19795 : Mark up None as literal text.
2016-10-19 16:29:26 +03:00
Benjamin Peterson
f7e2ea2f33
remove ungrammarical apostrophe ( closes #27957 )
2016-09-05 14:02:59 -07:00
Brett Cannon
2376316857
Issue #27853 : Add section headers to the importlib example docs
2016-09-08 10:12:47 -07:00
Brett Cannon
035a100382
Issue #26667 : Add path-like object support to importlib.util.
2016-09-07 18:39:18 -07:00
Benjamin Peterson
942dd9f3f7
merge 3.5 ( #27957 )
2016-09-05 14:03:08 -07:00
Martin Panter
8bde911115
Issue #27626 : Merge spelling fixes from 3.5
2016-07-28 01:30:58 +00:00
Martin Panter
eb9957065a
Issue #27626 : Spelling fixes in docs, comments and internal names
...
Based on patch by Ville Skyttä.
2016-07-28 01:11:04 +00:00
Brett Cannon
696c35e86b
Issue #26186 : Remove the restriction that built-in and extension
...
modules can't be lazily loaded.
Thanks to Python 3.6 allowing for types.ModuleType to have its
__class__ mutated, the restriction can be lifted by calling
create_module() on the wrapped loader.
2016-06-25 10:58:17 -07:00
Terry Jan Reedy
58d3f59c2f
Merge with 3.5
2016-06-22 22:46:51 -04:00
Terry Jan Reedy
dcb6c88a24
Issue #27304 : Source code links for sub-packages in the same file.
...
Patch by Yoni Lavi
2016-06-22 22:46:34 -04:00
Terry Jan Reedy
4da945f361
Merge Issue #22558 .
2016-06-11 15:06:08 -04:00
Terry Jan Reedy
fa089b9b0b
Issue #22558 : Add remaining doc links to source code for Python-coded modules.
...
Reformat header above separator line (added if missing) to a common format.
Patch by Yoni Lavi.
2016-06-11 15:02:54 -04:00
Eric Snow
dc4f7c09cc
Issue #27147 : Mention PEP 420 in the importlib docs.
2016-05-28 11:08:20 -07:00
Eric Snow
338502b307
Issue #27147 : Mention PEP 420 in the importlib docs.
2016-05-28 11:56:53 -06:00
Brett Cannon
5936313651
Issue #26252 : Add an example on how to register a finder
2016-03-18 11:54:22 -07:00
Brett Cannon
86a8be00ed
Fix a name in an example
2016-02-20 18:47:09 -08:00
Brett Cannon
4cbab346df
Issue #26397 : Update an importlib example to use util.module_from_spec() instead of create_module()
2016-02-20 18:45:56 -08:00
Brett Cannon
fe1941ebf8
Merge w/ 3.5
2016-02-20 18:40:18 -08:00
Brett Cannon
27c712e149
List what classes from importlib.machinery don't work with importlib.util.LazyLoader
2016-02-20 18:40:02 -08:00
Berker Peksag
89e54338d0
Issue #26242 : Fix another one in importlib.rst
2016-01-30 19:30:22 +02:00
Berker Peksag
fe5f614418
Issue #26242 : Fix another one in importlib.rst
2016-01-30 19:30:06 +02:00
Brett Cannon
52c854a838
Merge from 3.5
2016-01-22 14:05:41 -08:00
Brett Cannon
3bf1d87bbd
Fix a typo in a code example
2016-01-22 14:03:27 -08:00
Brett Cannon
a85e927e39
Issue #25802 : Add an examples section to importlib.
...
Thanks to Berker Peksag for the patch review.
2016-01-08 14:33:09 -08:00
Brett Cannon
eae3079041
Issue #25802 : Deprecate load_module() on importlib.machinery.SourceFileLoader and SourcelessFileLoader.
...
They were the only remaining implementations of load_module() not
documented as deprecated.
2015-12-28 17:55:27 -08:00
Berker Peksag
6e9d2e687b
Issue #21240 : Add an abstractmethod directive to mark abstract methods in the docs more explicitly
2015-12-08 12:14:50 +02:00