Commit Graph

164 Commits

Author SHA1 Message Date
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 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 338502b307 Issue #27147: Mention PEP 420 in the importlib docs. 2016-05-28 11:56:53 -06: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 fe5f614418 Issue #26242: Fix another one in importlib.rst 2016-01-30 19:30:06 +02:00
Brett Cannon 3bf1d87bbd Fix a typo in a code example 2016-01-22 14:03: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
Martin Panter 84835ab1cb Issue #25161: Merge full stops from 3.4 into 3.5 2015-10-10 10:44:25 +00:00
Martin Panter d21e0b52f1 Issue #25161: Add full stops in documentation; patch by Takase Arihiro 2015-10-10 10:36:22 +00:00
Robert Collins 1ae28d2ff3 Issue #20769: Improve reload() docs. Patch by Dorian Pula. 2015-08-05 08:20:53 +12:00
Robert Collins b3ca31f5f1 Issue #20769: Improve reload() docs. Patch by Dorian Pula. 2015-08-05 08:28:53 +12:00
Nick Coghlan d5cacbb1d9 PEP 489: Multi-phase extension module initialization
Known limitations of the current implementation:

- documentation changes are incomplete
- there's a reference leak I haven't tracked down yet

The leak is most visible by running:

  ./python -m test -R3:3 test_importlib

However, you can also see it by running:

  ./python -X showrefcount

Importing the array or _testmultiphase modules, and
then deleting them from both sys.modules and the local
namespace shows significant increases in the total
number of active references each cycle. By contrast,
with _testcapi (which continues to use single-phase
initialisation) the global refcounts stabilise after
a couple of cycles.
2015-05-23 22:24:10 +10:00
R David Murray deed215313 Merge: #24081: Remove obsolete caveat from import docs. 2015-05-02 14:58:32 -04:00
R David Murray 6d877ef026 #24081: Remove obsolete caveat from import docs.
Per Eric Snow's research, this changed in Python 2.4 in changeset 331e60d8ce,
but these docs were not updated.

Patch by Peter Viktorin.
2015-05-02 14:57:54 -04:00
Larry Hastings 770ce204ee Regenerated pydoc-topics and fixed bad/suspicious doc markup for Python 3.5.0a4. 2015-04-19 13:50:12 -07:00
Brett Cannon f299abdafa Issue #23731: Implement PEP 488.
The concept of .pyo files no longer exists. Now .pyc files have an
optional `opt-` tag which specifies if any extra optimizations beyond
the peepholer were applied.
2015-04-13 14:21:02 -04:00
Brett Cannon 3fa84224fd Issue #23422: Clarify some things around importlib.import_module() 2015-02-20 10:34:20 -05:00
Brett Cannon 02d8454002 Issue #23014: Make importlib.abc.Loader.create_module() required when
importlib.abc.Loader.exec_module() is also defined.

Before this change, create_module() was optional **and** could return
None to trigger default semantics. This change now reduces the
options for choosing default semantics to one and in the most
backporting-friendly way (define create_module() to return None).
2015-01-09 11:39:21 -05:00
Brett Cannon b6e2556d8f Issue #22834: Have import suppress FileNotFoundError when the current
working directory no longer exists.

Thanks to Martin Panter for the bug report.
2014-11-21 12:19:28 -05:00
Georg Brandl bad8d4bb53 merge with 3.4 2014-10-29 10:57:42 +01:00
Georg Brandl b7354a65ce Fixing broken links in doc, part 4: some more breaks and redirects 2014-10-29 10:57:37 +01:00
Georg Brandl cadc3fdcb5 Merge with 3.4 2014-10-29 08:37:29 +01:00
Georg Brandl e73778c1ac Use https:// URLs when referring to python.org hosts. 2014-10-29 08:36:35 +01:00
Brett Cannon 2a17bde930 Issue #20383: Introduce importlib.util.module_from_spec().
Along the way, dismantle importlib._bootstrap._SpecMethods as it was
no longer relevant and constructing the new function required
partially dismantling the class anyway.
2014-05-30 14:55:29 -04:00
Brett Cannon 6eaac13c92 Issue #21156: importlib.abc.InspectLoader.source_to_code() is now a
staticmethod.
2014-05-09 12:28:22 -04:00
Brett Cannon a237a98753 Merge for issue #21438 2014-05-09 11:56:07 -04:00
Brett Cannon 062fcac9a4 Issue #21438: Document what loaders don't require a module name for
load_module().
2014-05-09 11:55:49 -04:00
Brett Cannon a04dbe4fe7 Issue #17621: Introduce importlib.util.LazyLoader. 2014-04-04 13:53:38 -04:00
Andrew Svetlov 08af00047b Get rid of deprecated IOError in the doc 2014-04-01 01:13:30 +03:00
Georg Brandl df48b97855 Fix a few scoping issues with versionadded/versionchanged directives. 2014-03-24 09:06:18 +01:00
Larry Hastings 3732ed2414 Merge in all documentation changes since branching 3.4.0rc1. 2014-03-15 21:13:56 -07:00
Brett Cannon 3303b6abc8 Merge for issue #20488 2014-02-06 09:49:53 -05:00
Brett Cannon 07fbd78473 Issue #20488: Update docs to say importlib is *the* implementaiton of
import and not *an* implementation.
2014-02-06 09:46:08 -05:00
Eric Snow 6029e08691 Issue 19944: Fix importlib.find_spec() so it imports parents as needed.
The function is also moved to importlib.util.
2014-01-25 15:32:46 -07:00
R David Murray 0ae7ae1fc9 whatsnew: InspectLoader.get_code now concrete, b32decode raises binascii.Error.
And a news item rephrase.
2014-01-08 18:16:02 -05:00
Brett Cannon 8d942296bb Issue #19719: Update various finder and loader ABCs such that their
old methods now provide implementations when PEP 451 APIs are present.

This should help with backwards-compatibility with code which has not
been updated to work with PEP 451.
2014-01-07 15:52:42 -05:00
Eric Snow ca2d854df8 Issue #19713: Update importlib docs for module spec changes, including deprecations. 2013-12-16 23:06:52 -07:00
Brett Cannon 706a7296d7 merge for issue #19963 2013-12-13 13:58:47 -05:00
Brett Cannon 98620d87f2 Issue #19963: Document that importlib.import_module() will import
parent packages automatically.
2013-12-13 13:57:41 -05:00
Eric Snow b282b3d804 Issue #18864: Add a setter for ModuleSpec.has_location. 2013-12-10 22:16:41 -07:00
Serhiy Storchaka 0e90e99188 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:19:53 +02:00
Serhiy Storchaka fbc1c26803 Issue #19795: Improved markup of True/False constants. 2013-11-29 12:17:13 +02:00
Serhiy Storchaka 889d24ee3a Revert unrelated changes introduced by changeset b2066bc8cab9 (issue #19795). 2013-11-29 23:40:35 +02:00
Eric Snow b523f8433a Implement PEP 451 (ModuleSpec). 2013-11-22 09:05:39 -07:00
Brett Cannon f6901c8baa Issue #19410: Put back in special-casing of '' for
importlib.machinery.FileFinder.

While originally moved to stop special-casing '' as PathFinder farther
up the typical call chain now uses the cwd in the instance of '', it
was deemed an unnecessary risk to breaking subclasses of FileFinder to
take the special-casing out.
2013-11-01 10:37:57 -04:00
Brett Cannon 8ad37860c9 Tweak some doc wording for importlib.reload 2013-10-25 13:52:46 -04:00
Georg Brandl 0f5bff24ab Doc markup fixes. 2013-10-19 17:46:38 +02:00
Brett Cannon 27e27f7ee1 Issue #18416: Have importlib.machinery.PathFinder treat '' as the cwd
and stop importlib.machinery.FileFinder treating '' as '.'.

Previous PathFinder transformed '' into '.' which led to __file__ for
modules imported from the cwd to always be relative paths. This meant
the values of the attribute were wrong as soon as the cwd changed.
This change now means that as long as the site module is run (which
makes all entries in sys.path absolute) then all values for __file__
will also be absolute unless it's for __main__ when specified by file
path in a relative way (modules imported by runpy will have an
absolute path).

Now that PathFinder is no longer treating '' as '.' it only makes
sense for FileFinder to stop doing so as well. Now no transformation
is performed for the directory given to the __init__ method.

Thanks to Madison May for the initial patch.
2013-10-18 11:39:04 -04:00
Serhiy Storchaka 98b28fddd8 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:12:09 +03:00
Eric Snow dcd01b4932 [issue 19152] Add versionadded for ExtensionFileLoader.get_filename(). 2013-10-04 20:35:34 -06:00