Commit graph

4944 commits

Author SHA1 Message Date
Richard Oudkerk
9d89ae64b9 Merge. 2013-06-24 20:39:28 +01:00
Richard Oudkerk
2b310dd8b9 Fix typo. 2013-06-24 20:38:46 +01:00
Richard Oudkerk
93b736ee15 Merge. 2013-06-24 18:13:54 +01:00
Richard Oudkerk
7b69da72b8 Clarify note and fix typo. 2013-06-24 18:12:57 +01:00
Richard Oudkerk
71e7dbd11d Issue #15818: Merge. 2013-06-24 15:43:35 +01:00
Richard Oudkerk
64c25b4282 Issue #15818: Typo in docs. 2013-06-24 15:42:00 +01:00
Richard Oudkerk
35d05537fc Issue #18277: Merge. 2013-06-24 14:52:14 +01:00
Richard Oudkerk
95fe1a793f Issue #18277: Document quirks of multiprocessing queue. 2013-06-24 14:48:07 +01:00
R David Murray
9dac840e3c Merge #18179: reflow paragraphs. 2013-06-23 16:06:13 -04:00
R David Murray
021362dbd4 #18179: reflow paragraphs. 2013-06-23 16:05:44 -04:00
R David Murray
ec94eac4c9 Merge #18179: document the local_hostname parameter.
Original patch by Berker Peksag.
2013-06-23 15:52:08 -04:00
R David Murray
36beb66be9 #18179: document the local_hostname parameter.
Original patch by Berker Peksag.
2013-06-23 15:47:50 -04:00
R David Murray
5707d508e1 #11390: convert doctest CLI to argparse and add -o and -f options.
This provides a way to specify arbitrary doctest options when using
the CLI interface to process test files, just as one can when calling
testmod or testfile programmatically.
2013-06-23 14:24:13 -04:00
Christian Heimes
c77d9f38c2 Issue #11016: Add C implementation of the stat module as _stat 2013-06-22 21:05:02 +02:00
Brett Cannon
27bc441f5e merge for issue #18278 2013-06-21 18:37:02 -04:00
Brett Cannon
29b2f174da Issue #18278: properly document how the loaders are called for FileFinder 2013-06-21 18:31:55 -04:00
Andrew Kuchling
4921a089e2 #12716: reorganize docs for os module a bit
* Move the constants used by os.open() to after the description of os.open(),
  instead of putting them in their own section.

* Move RTLD_* constants to "Miscellaneous System Information" section, and
  mention the sys functions they're used with.

* Mention dir_fd parameter in os.open() text.

* Typo fix ("are a supported by").
2013-06-21 11:49:57 -04:00
Andrew Kuchling
c61b913078 #13226: update references from ctypes/DLFCN modules to os module 2013-06-21 10:58:41 -04:00
Andrew Kuchling
3468d25a80 Merge from 3.3 2013-06-21 08:07:35 -04:00
Andrew Kuchling
edb4260ffd Closes #18218: use correct variable name for starting point 2013-06-21 08:00:58 -04:00
Andrew Kuchling
29303d4ea5 Merge from 3.3 2013-06-20 21:40:14 -04:00
Andrew Kuchling
c3db3739aa Closes #18267: use floor division in code example 2013-06-20 21:33:05 -04:00
Andrew Kuchling
f862dc53e8 Merge from 3.3 2013-06-20 21:20:20 -04:00
Andrew Kuchling
1d7d580d0e Closes #18272: use 'builtins' for 3.3 instead of __builtin__ 2013-06-20 21:17:41 -04:00
Brett Cannon
89df7b4e64 Issue #17177: Clarify some deprecations 2013-06-18 20:49:55 -04:00
Brett Cannon
8dd823340f Grammar tweak 2013-06-17 19:58:57 -04:00
Christian Heimes
9a5395ae2b Issue #18147: Add diagnostic functions to ssl.SSLContext().
get_ca_list() lists all loaded CA certificates and cert_store_stats() returns
amount of loaded X.509 certs, X.509 CA certs and CRLs.
2013-06-17 15:44:12 +02:00
Brett Cannon
a81d527ca9 documentation suggesting something which doesn't exist 2013-06-16 19:17:12 -04:00
Brett Cannon
390f6c1bf7 Merge doc/argument name fix 2013-06-16 19:09:46 -04:00
Brett Cannon
a269d821a1 merge 2013-06-16 19:07:16 -04:00
Brett Cannon
1d75382e81 Fix a misnaming of a method and an argument 2013-06-16 19:06:55 -04:00
Brett Cannon
f24fecd4ac Issue #18076: Introduce imoportlib.util.decode_source().
The helper function makes it easier to implement
imoprtlib.abc.InspectLoader.get_source() by making that function
require just the raw bytes for source code and handling all other
details.
2013-06-16 18:37:53 -04:00
Brett Cannon
645ab68f25 merge 2013-06-16 13:14:06 -04:00
Brett Cannon
e4f41deccf Issue #17177: The imp module is pending deprecation.
To make sure there is no issue with code that is both Python 2 and 3
compatible, there are no plans to remove the module any sooner than
Python 4 (unless the community moves to Python 3 solidly before then).
2013-06-16 13:13:40 -04:00
Andrew Kuchling
f567727abc Merge with 3.3 2013-06-16 13:02:55 -04:00
Andrew Kuchling
c7b6c50f29 Describe 'surrogateescape' in the documentation.
Also, improve some docstring descriptions of the 'errors' parameter.

Closes #14015.
2013-06-16 12:58:48 -04:00
Brett Cannon
a3c96154d2 Issue #17907: touch up the code for imp.new_module(). 2013-06-14 22:26:30 -04:00
Brett Cannon
15e489f7c5 Fix markup of the synopsis along with changing to state what is in the
module and not as a definition of what an enumeration is.
2013-06-14 21:59:16 -04:00
Ethan Furman
6b3d64ab5d Closes issue 17947. Adds PEP-0435 (Adding an Enum type to the Python standard library).
Missing files added.
News entry added.
2013-06-14 16:55:46 -07:00
Brett Cannon
2d77204180 Issue #17907: Document types.ModuleType's constructor and attributes,
allowing for documenting imp.new_module() as deprecated.
2013-06-14 19:19:57 -04:00
Brett Cannon
05a647deed Issue #18192: Introduce importlib.util.MAGIC_NUMBER and document the
deprecation of imp.get_magic().
2013-06-14 19:02:34 -04:00
Brett Cannon
8c18da20f9 merge 2013-06-14 18:33:21 -04:00
Brett Cannon
33915eba7c Issue #17222: Raise FileExistsError when py_compile.compile would
overwrite a symlink or non-regular file with a regular file.
2013-06-14 18:33:00 -04:00
Ned Deily
7bff3cbe3d Issue #18149: Add filecmp.clear_cache() to manually clear the filecmp cache.
Patch by Mark Levitt
2013-06-14 15:19:11 -07:00
Brett Cannon
3fe35e6503 Issue #18193: Add importlib.reload(), documenting (but not
implementing in code) the deprecation of imp.reload().

Thanks to Berker Peksag for the patch.
2013-06-14 15:04:26 -04:00
Ethan Furman
0fff6ad1a1 Closes issue 17947. Adds PEP-0435 (Enum, IntEnum) to the stdlib. 2013-06-14 00:30:27 -07: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
Ned Deily
982c6efeb5 Issue #18187: merge from 3.3 2013-06-11 14:40:23 -07:00
Ned Deily
3886120428 Issue #18187: Fix broken link in venv documentation. Patch by Berker Peksag. 2013-06-11 14:38:39 -07:00