summaryrefslogtreecommitdiffstats
path: root/Doc
Commit message (Collapse)AuthorAgeFilesLines
* Issue #15767: Touch up ModuleNotFoundError usage by import.Brett Cannon2013-06-134-7/+18
| | | | | | | | | | | | | Forgot to raise ModuleNotFoundError when None is found in sys.modules. This led to introducing the C function PyErr_SetImportErrorSubclass() to make setting ModuleNotFoundError easier. Also updated the reference docs to mention ModuleNotFoundError appropriately. Updated the docs for ModuleNotFoundError to mention the None in sys.modules case. Lastly, it was noticed that PyErr_SetImportError() was not setting an exception when returning None in one case. That issue is now fixed.
* Issue #15767: Introduce ModuleNotFoundError, a subclass ofBrett Cannon2013-06-123-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | ImportError. The exception is raised by import when a module could not be found. Technically this is defined as no viable loader could be found for the specified module. This includes ``from ... import`` statements so that the module usage is consistent for all situations where import couldn't find what was requested. This should allow for the common idiom of:: try: import something except ImportError: pass to be updated to using ModuleNotFoundError and not accidentally mask ImportError messages that should propagate (e.g. issues with a loader). This work was driven by the fact that the ``from ... import`` statement needed to be able to tell the difference between an ImportError that simply couldn't find a module (and thus silence the exception so that ceval can raise it) and an ImportError that represented an actual problem.
* Issue #18187: merge from 3.3Ned Deily2013-06-111-1/+1
|\
| * Issue #18187: Fix broken link in venv documentation. Patch by Berker Peksag.Ned Deily2013-06-111-1/+1
| |
* | Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store.Christian Heimes2013-06-091-0/+23
| |
* | removed accidental new lineChristian Heimes2013-06-091-2/+1
| |
* | Issue #18143: Implement ssl.get_default_verify_paths() in order to debugChristian Heimes2013-06-091-1/+19
| | | | | | | | the default locations for cafile and capath.
* | #18126: merge with 3.3.Ezio Melotti2013-06-082-5/+3
|\ \ | |/
| * #18126: update NumPy links in the documentation. Patch by Yury V. Zaytsev.Ezio Melotti2013-06-082-5/+3
| |
* | moved the single-dispatch generic function definitions to the glossaryŁukasz Langa2013-06-072-6/+15
| |
* | Closes #11959: SMTPServer and SMTPChannel now take an optional map, use of ↵Vinay Sajip2013-06-071-2/+17
| | | | | | | | which avoids affecting global state.
* | Add reference implementation for PEP 443Łukasz Langa2013-06-051-0/+110
| | | | | | | | PEP accepted: http://mail.python.org/pipermail/python-dev/2013-June/126734.html
* | mergeRaymond Hettinger2013-06-021-10/+10
|\ \ | |/
| * Clarify which dictionaries are updateableRaymond Hettinger2013-06-021-10/+10
| | | | | | | | by using the wording from the Py2.7 docs.
* | Issue #18065: For frozen packages set __path__ to [].Brett Cannon2013-06-011-0/+7
| | | | | | | | | | | | | | Previously __path__ was set to [__name__], but that could lead to bad results if someone managed to circumvent the frozen importer and somehow ended up with a finder that thought __name__ was a legit directory/location.
* | Issues #18088, 18089: IntroduceBrett Cannon2013-05-312-10/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | importlib.abc.Loader.init_module_attrs() and implement importlib.abc.InspectLoader.load_module(). The importlib.abc.Loader.init_module_attrs() method sets the various attributes on the module being loaded. It is done unconditionally to support reloading. Typically people used importlib.util.module_for_loader, but since that's a decorator there was no way to override it's actions, so init_module_attrs() came into existence to allow for overriding. This is also why module_for_loader is now pending deprecation (having its other use replaced by importlib.util.module_to_load). All of this allowed for importlib.abc.InspectLoader.load_module() to be implemented. At this point you can now implement a loader with nothing more than get_code() (which only requires get_source(); package support requires is_package()). Thanks to init_module_attrs() the implementation of load_module() is basically a context manager containing 2 methods calls, a call to exec(), and a return statement.
* | Add a reset_name argument to importlib.util.module_to_load in order toBrett Cannon2013-05-311-1/+5
| | | | | | | | | | control whether to reset the module's __name__ attribute in case a reload is being done.
* | Update What's New for importlib.util.module_to_load name changeBrett Cannon2013-05-311-1/+1
| |
* | Add a reference to module_to_loadBrett Cannon2013-05-311-2/+1
| |
* | Rename importlib.util.ModuleManager to module_to_load so that the nameBrett Cannon2013-05-301-6/+7
| | | | | | | | explains better what the context manager is providing.
* | Issue #9369: The types of `char*` arguments of PyObject_CallFunction() andSerhiy Storchaka2013-05-292-6/+12
| | | | | | | | | | PyObject_CallMethod() now changed to `const char*`. Based on patches by Jörg Müller and Lars Buitinck.
* | #1554133: Document PyOS_InputHook, PyOS_ReadlineFunctionPointerAndrew Kuchling2013-05-291-1/+23
| |
* | Undo a recommendation as load_module() methods might be called directlyBrett Cannon2013-05-281-5/+1
| |
* | Issue #18070: importlib.util.module_for_loader() now sets __loader__Brett Cannon2013-05-282-9/+20
| | | | | | | | | | and __package__ unconditionally in order to do the right thing for reloading.
* | Clarify some documentationBrett Cannon2013-05-281-31/+17
| |
* | Introduce importlib.util.ModuleManager which is a context manager toBrett Cannon2013-05-281-0/+13
| | | | | | | | | | | | | | | | handle providing (and cleaning up if needed) the module to be loaded. A future commit will use the context manager in Lib/importlib/_bootstrap.py and thus why the code is placed there instead of in Lib/importlib/util.py.
* | Issue #18085: Fix PyObject_CallMethodObjArgs()'s entry in refcounts.dat.Serhiy Storchaka2013-05-281-1/+1
|\ \ | |/
| * Issue #18085: Fix PyObject_CallMethodObjArgs()'s entry in refcounts.dat.Serhiy Storchaka2013-05-281-1/+1
| |
* | Issue #18011: base64.b32decode() now raises a binascii.Error if there areSerhiy Storchaka2013-05-281-1/+1
|\ \ | |/ | | | | | | non-alphabet characters present in the input string to conform a docstring. Updated the module documentation.
| * Issue #18011: base64.b32decode() now raises a binascii.Error if there areSerhiy Storchaka2013-05-281-1/+1
| | | | | | | | | | non-alphabet characters present in the input string to conform a docstring. Updated the module documentation.
* | Issue #18079: Fix a typo in the tutorial.Serhiy Storchaka2013-05-281-2/+2
|\ \ | |/
| * Issue #18079: Fix a typo in the tutorial.Serhiy Storchaka2013-05-281-2/+2
| |
* | Merge with 3.3Jason R. Coombs2013-05-281-3/+5
|\ \ | |/
| * Issue #13772: Restored directory detection of targets in `os.symlink` on ↵Jason R. Coombs2013-05-281-3/+5
| | | | | | | | Windows, which was temporarily removed in Python 3.2.3 due to an incomplete implementation. The implementation now works even if the symlink is created in a location other than the current directory.
* | Issue #18072: Implement get_code() for importlib.abc.InspectLoader andBrett Cannon2013-05-281-4/+8
| | | | | | | | ExecutionLoader.
* | Fix typo in embedding doc and update examples to 3.4.Ned Deily2013-05-271-4/+4
|\ \ | |/
| * Fix typo in embedding doc and update examples to 3.3.Ned Deily2013-05-271-4/+4
| |
* | Move importlib.abc.SourceLoader.source_to_code() to InspectLoader.Brett Cannon2013-05-261-11/+11
| | | | | | | | | | | | | | While the previous location was fine, it makes more sense to have the method higher up in the inheritance chain, especially at a point where get_source() is defined which is the earliest source_to_code() could programmatically be used in the inheritance tree in importlib.abc.
* | Fix #16832 - expose cache validity checking support in ABCMetaŁukasz Langa2013-05-251-0/+17
| |
* | mergeBrett Cannon2013-05-251-1/+5
|\ \ | |/
| * Mention __cached__ in the import ref.Brett Cannon2013-05-251-1/+5
| |
* | mergeBrett Cannon2013-05-251-1/+1
|\ \ | |/
| * Add a missing parenthesis.Brett Cannon2013-05-251-1/+1
| |
* | mergeBrett Cannon2013-05-251-3/+8
|\ \ | |/
| * Various tweaks to importlib docs.Brett Cannon2013-05-251-3/+8
| |
* | merge fix for issue #17953Brett Cannon2013-05-241-0/+2
|\ \ | |/
| * Issue #17953: document that sys.modules shouldn't be replaced (thanksBrett Cannon2013-05-241-0/+2
| | | | | | | | | | | | | | | | | | to interp->modules) and that deleting essential items from the dict can cause Python to blow up. Thanks to Terry Reedy for coming up with initial wording and Yogesh Chaudhari for coming up with a patch using that wording in parallel to my own patch.
* | Fix #17272 - Make Request.full_url and Request.get_full_url return same ↵Senthil Kumaran2013-05-241-0/+10
| | | | | | | | | | | | result under all circumstances. Document the change of Request.full_url to a property.
* | merge from 3.3Senthil Kumaran2013-05-231-5/+15
|\ \ | |/ | | | | Fix #18007 : Document CookieJar.add_cookie_header request parameter changes in 3.3 and 3.4.
| * Fix #18007 : Document CookieJar.add_cookie_header request parameter changes ↵Senthil Kumaran2013-05-231-5/+15
| | | | | | | | in 3.3