Commit Graph

72 Commits

Author SHA1 Message Date
Berker Peksag 77a6b20a35 Issue #23432: Remove duplicate content from SystemExit docs.
Also, document SystemExit.code attribute explicitly.
2015-03-10 14:47:15 +02:00
Georg Brandl e4196d3f2e #22613: fix several factual errors in builtin docs (thanks Jacques Ducasse) 2014-10-31 09:41:46 +01:00
Terry Jan Reedy b6d1f48c14 Issue #21559: Add alternative (historical) reason for OverflowError. 2014-06-16 03:31:00 -04:00
Victor Stinner b2788fe854 Issue #16136: VMSError is done, bye bye VMS 2014-06-13 14:58:48 +02:00
Mark Dickinson abf079de25 Issue #20624: Exception docs wording tweak - clarify that it's okay to inherit from a subclass of Exception. 2014-04-14 11:20:12 -04:00
Benjamin Peterson 222ef82827 fix verb (closes #21174) 2014-04-07 19:34:33 -04:00
Andrew Svetlov 5898d4f4d9 IOError -> OSError 2014-04-01 00:44:13 +03:00
Larry Hastings 3732ed2414 Merge in all documentation changes since branching 3.4.0rc1. 2014-03-15 21:13:56 -07:00
Larry Hastings b082731fbb Issue #20517: Functions in the os module that accept two filenames
now register both filenames in the exception on failure.
This required adding new C API functions allowing OSError exceptions
to reference two filenames instead of one.
2014-02-09 22:05:19 -08:00
Antoine Pitrou c7cf5fca7c Issue #19691: remove outdated mention about RuntimeError 2013-11-25 19:11:07 +01:00
Antoine Pitrou 9527f16bf4 Issue #19691: remove outdated mention about RuntimeError 2013-11-25 19:08:32 +01:00
Serhiy Storchaka 98b28fddd8 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:12:09 +03:00
Serhiy Storchaka bfdcd436f0 Issue #18758: Fixed and improved cross-references. 2013-10-13 23:09:14 +03:00
Georg Brandl bc332a2415 merge with 3.3 2013-10-08 21:43:46 +02:00
Georg Brandl f24c1416eb Fix wrong link. 2013-10-08 21:43:39 +02:00
Brett Cannon 679ecb565b Issue #15767: back out 8a0ed9f63c6e, finishing the removal of
ModuleNotFoundError.
2013-07-04 17:51:50 -04:00
Brett Cannon 82da8886cc Issue #15767: Revert 3a50025f1900 for ModuleNotFoundError 2013-07-04 17:48:16 -04:00
Brett Cannon 8f5ac5106e Issue #15767: Touch up ModuleNotFoundError usage by import.
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.
2013-06-12 23:29:18 -04:00
Brett Cannon b1611e2772 Issue #15767: Introduce ModuleNotFoundError, a subclass of
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.
2013-06-12 16:59:46 -04:00
Nick Coghlan b4b8f234d4 Merge from 3.3 (issue #15209) 2012-12-09 16:22:17 +10:00
Nick Coghlan 0eee97cce6 Issue #15209: Fix typo and some additional wording tweaks 2012-12-09 16:21:46 +10:00
Nick Coghlan 10cdf99a90 Merge from 3.3 (Issue #15209) 2012-12-08 22:24:23 +10:00
Nick Coghlan 8e18fc8c0b Issue #15209: Clarify exception chaining description
- not allowed when implicitly re-raised the current exception
- last exception raised is always displayed last
- attempt to make it clearer when/if cause and context are shown
2012-12-08 21:39:24 +10:00
Andrew Svetlov b1715ea435 Merge 3.3 2012-12-05 11:12:50 +02:00
Andrew Svetlov 73a5a12dcf Fix typo. 2012-12-05 11:12:14 +02:00
Benjamin Peterson c77dd20698 merge 3.3 2012-12-02 11:33:14 -05:00
Benjamin Peterson 78f7e3a8dc document UnicodeError attributes 2012-12-02 11:33:06 -05:00
Victor Stinner 292c835548 Issue #15478: Raising an OSError doesn't decode or encode the filename anymore
Pass the original filename argument to OSError constructor, instead of trying
to encode it to or decode it from the filesystem encoding. This change avoids
an additionnal UnicodeDecodeError on Windows if the filename cannot be decoded
from the filesystem encoding (ANSI code page).
2012-10-30 02:17:38 +01:00
Ezio Melotti b24d3cf769 Fix indentation (or Sphinx will think these are attributes of ConnectionError). 2012-10-21 03:22:05 +03:00
Ezio Melotti 1dd7c30419 Merge __next__ method link fixes with 3.2. 2012-10-12 13:45:38 +03:00
Ezio Melotti 7fa822275b Fix links to the __next__ method. 2012-10-12 13:42:08 +03:00
Georg Brandl b8f2d29ea9 Remove attribution; this is for the whatsnew. 2012-06-24 13:06:44 +02:00
Benjamin Peterson d5a1c44455 PEP 415: Implement suppression of __context__ display with an exception attribute
This replaces the original PEP 409 implementation. See #14133.
2012-05-14 22:09:31 -07:00
Brett Cannon 79ec55e980 Issue #1559549: Add 'name' and 'path' attributes to ImportError.
Currently import does not use these attributes as they are planned
for use by importlib (which will be another commit).

Thanks to Filip Gruszczyński for the initial patch and Brian Curtin
for refining it.
2012-04-12 20:24:54 -04:00
Benjamin Peterson ad8586d075 typo 2012-02-27 10:59:10 -05:00
Nick Coghlan ab7bf2143e Close issue #6210: Implement PEP 409 2012-02-26 17:49:52 +10:00
Nick Coghlan 0ed8019c20 Add versionchanged notes for PEP 380 2012-01-14 14:43:24 +10:00
Nick Coghlan 1f7ce62bd6 Implement PEP 380 - 'yield from' (closes #11682) 2012-01-13 21:43:40 +10:00
Amaury Forgeot d'Arc 942d5ba125 Merge branch 3.2 2011-11-22 22:02:01 +01:00
Amaury Forgeot d'Arc 3b1acf11e9 bytes() can't be used to get a representation of an object. 2011-11-22 19:34:08 +01:00
Antoine Pitrou f55011f8b6 Update doc for BlockingIOError and its alias in the io module 2011-10-12 18:57:23 +02:00
Antoine Pitrou 195e702831 Mention the merging of other exceptions into OSError. 2011-10-12 16:46:46 +02:00
Antoine Pitrou f9c774696e Update exceptions doc for PEP 3151 2011-10-12 16:02:00 +02:00
Georg Brandl fb6fd5d019 #10856: document (Base)Exception.args better. 2011-01-07 18:28:45 +00:00
Georg Brandl 0bdfbfa276 #10723: add missing builtin exceptions. 2010-12-18 17:51:28 +00:00
Éric Araujo 713d3039dc Fix usage of :option: in the docs (#9312).
:option: is used to create a link to an option of python, not to mark
up any instance of any arbitrary command-line option.  These were
changed to ````.

For modules which do have a command-line interface, lists of options
have been properly marked up with the program/cmdoption directives
combo.  Options defined in such blocks can be linked to with :option:
later in the same file, they won’t link to an option of python.

Finally, the markup of command-line fragments in optparse.rst has
been cleaned to use ``x`` instead of ``"x"``, keeping that latter
form for actual Python strings.

Patch by Eli Bendersky and Éric Araujo.
2010-11-18 16:38:46 +00:00
Georg Brandl 08be72d0aa Add a new warning gategory, ResourceWarning, as discussed on python-dev. It is silent by default,
except when configured --with-pydebug.

Emit this warning from the GC shutdown procedure, rather than just printing to stderr.
2010-10-24 15:11:22 +00:00
Georg Brandl 60203b41b0 Migrate to Sphinx 1.0 C language constructs. 2010-10-06 10:11:56 +00:00
Antoine Pitrou 11cb961b38 Add cross-references to the glossary entry for file objects. 2010-09-15 11:11:28 +00:00
Benjamin Peterson b496badc32 remove reference to second argument to raise #8676 2010-05-10 20:49:20 +00:00