Commit Graph

15491 Commits

Author SHA1 Message Date
Ezio Melotti 3e1e97a99a #16937: merge with 3.3. 2013-07-25 05:04:50 +02:00
Ezio Melotti 61b0c672b5 #16937: document that stdin is always buffered, even when -u is used. Patch by Elena Oat. 2013-07-25 05:04:02 +02:00
Vinay Sajip aca61703fa Closes #18541: merged update from 3.3. 2013-07-24 17:52:58 +01:00
Vinay Sajip a92fbe6dce Issue #18541: simplified LoggerAdapter example. 2013-07-24 17:52:01 +01:00
Ethan Furman f24bb35a69 closes issue18042 -- a `unique` decorator is added to enum.py
The docs also clarify the 'Interesting Example' duplicate-free enum is for
demonstration purposes.
2013-07-18 17:05:39 -07:00
Ned Deily eaaedcdd89 Closes #18471: Fix typo in heapq documentation (reported by François Pinard). 2013-07-15 19:09:27 -07:00
Ned Deily 676d7aa905 Issue #18471: Fix typo in heapq documentation (reported by François Pinard). 2013-07-15 19:08:13 -07:00
Barry Warsaw 224a599c0c - Issue #18440: Clarify that `hash()` can truncate the value returned from an
object's custom `__hash__()` method.
2013-07-15 14:47:29 -04:00
Barry Warsaw 4958f714bd - Issue #18440: Clarify that `hash()` can truncate the value returned from an
object's custom `__hash__()` method.
2013-07-15 15:21:41 -04:00
Nick Coghlan 24c05bc154 Close issue 17482: don't overwrite __wrapped__ 2013-07-15 21:13:08 +10:00
Ned Deily d57b268653 Closes #18452: fix several "occurrence" typos (reported by Févry Thibault). 2013-07-14 12:45:18 -07:00
Ned Deily 0995c47891 Issue #18452: fix several "occurrence" typos (reported by Févry Thibault). 2013-07-14 12:43:16 -07:00
R David Murray d0a03ad139 #18389: Clarify that relpath does not access the file system.
Initial patch by Madison May.
2013-07-12 17:43:53 -04:00
R David Murray ce10fab9f6 #18389: Clarify that relpath does not access the file system.
Initial patch by Madison May.
2013-07-12 17:43:11 -04:00
Vinay Sajip 11b38f17ca Closes #18433: Merged documentation update from 3.3. 2013-07-12 21:54:12 +01:00
Vinay Sajip 577d4ff6e0 Issue #18433: Clarified venv documentation. 2013-07-12 21:52:51 +01:00
Vinay Sajip c1a9d30354 Merged changes. 2013-07-12 21:46:05 +01:00
Vinay Sajip ad6bb031d7 Issue #18434: Updated example script to tidy up resources. 2013-07-12 21:44:35 +01:00
Vinay Sajip 62926eed68 Closes #18434: Merged documentation update from 3.3. 2013-07-12 20:58:14 +01:00
Vinay Sajip 3c557f298a Issue #18434: Updated example script in venv docs to use setuptools rather than Distribute. 2013-07-12 20:54:25 +01:00
Serhiy Storchaka 4fcf1b2bb7 Issue #18085: Add missed const modifier for some entries in refcounts.dat. 2013-07-11 22:00:57 +03:00
Serhiy Storchaka 244d6252f2 Issue #18085: Add missed const modifier for some entries in refcounts.dat. 2013-07-11 21:57:34 +03:00
R David Murray e173d01231 Merge #17987: properly document support.captured_xxx. 2013-07-11 12:29:31 -04:00
R David Murray 5a33f81348 #17987: properly document support.captured_xxx.
Patch by Dmi Baranov.
2013-07-11 12:28:40 -04:00
Serhiy Storchaka 491856074f Issue #18336. Fix a link to StreamReader's read() method. 2013-07-11 18:27:20 +03:00
Serhiy Storchaka cca40ffa97 Issue #18336. Fix a link to StreamReader's read() method. 2013-07-11 18:26:13 +03:00
Ezio Melotti d95bb3f981 #18403: merge with 3.3. 2013-07-08 17:53:32 +02:00
Ezio Melotti 93dd6934ff #18403: fix an off-by-one typo noticed by Xue Fuqiao. 2013-07-08 17:52:54 +02:00
Ronald Oussoren 5f8e78545c (3.3->default) Cleanup of documentation change from #17860
Reformulated the textual change, and applied it to the docstring as well.
2013-07-07 09:28:01 +02:00
Ronald Oussoren 385521c90e Cleanup of documentation change from #17860
Reformulated the textual change, and applied it to the docstring as well.
2013-07-07 09:26:45 +02:00
Victor Stinner 0507bf56f0 Issue #3329: Implement the PEP 445
Add new enum:

* PyMemAllocatorDomain

Add new structures:

* PyMemAllocator
* PyObjectArenaAllocator

Add new functions:

* PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree()
* PyMem_GetAllocator(), PyMem_SetAllocator()
* PyObject_GetArenaAllocator(), PyObject_SetArenaAllocator()
* PyMem_SetupDebugHooks()

Changes:

* PyMem_Malloc()/PyObject_Realloc() now always call malloc()/realloc(), instead
  of calling PyObject_Malloc()/PyObject_Realloc() in debug mode.
* PyObject_Malloc()/PyObject_Realloc() now falls back to
  PyMem_Malloc()/PyMem_Realloc() for allocations larger than 512 bytes.
* Redesign debug checks on memory block allocators as hooks, instead of using C
  macros
2013-07-07 02:05:46 +02:00
Ronald Oussoren c17d0c2218 (3.3->default) Issue #17860: explicitly mention that std* streams are opened in binary mode by default.
The documentation does mention that the streams are opened in text mode
when univeral_newlines is true, but not that that they are opened in
binary mode when that argument is false and that seems to confuse at
least some users.
2013-07-06 10:25:04 +02:00
Ronald Oussoren a68650553d Issue #17860: explicitly mention that std* streams are opened in binary mode by default.
The documentation does mention that the streams are opened in text mode
when univeral_newlines is true, but not that that they are opened in
binary mode when that argument is false and that seems to confuse at
least some users.
2013-07-06 10:23:59 +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
Richard Oudkerk 771b961d4e Issue #14206: Clarify docs for Queue.join_cancel_thread(). 2013-07-02 13:01:31 +01:00
Richard Oudkerk d7d3f376dd Issue #14206: Clarify docs for Queue.join_cancel_thread(). 2013-07-02 12:59:55 +01:00
Richard Oudkerk b0be62453f Issue #17273: Clarify that pool methods can only be used by parent process. 2013-07-02 12:41:00 +01:00
Richard Oudkerk b3c4b98c23 Issue #17273: Clarify that pool methods can only be used by parent process. 2013-07-02 12:32:00 +01:00
Christian Heimes 04926aeb2f Issue 18240: The HMAC module is no longer restricted to bytes and accepts
any bytes-like object, e.g. memoryview. Original patch by Jonas Borgström.
2013-07-01 13:08:42 +02:00
Terry Jan Reedy ec4bdac8dd (merge) Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
Patch by Tal Einat, Roget Serwy, and Todd Rovito.
2013-07-01 00:52:18 -04:00
Terry Jan Reedy 8a0b7756e2 Issue #7136: In the Idle File menu, "New Window" is renamed "New File".
Patch by Tal Einat, Roget Serwy, and Todd Rovito.
2013-07-01 00:42:52 -04:00
Terry Jan Reedy b7bb6f571b Merge with 3.3 2013-06-29 13:16:17 -04:00
Terry Jan Reedy c4565a9524 Issue #18237: Fix assertRaisesRegexp error caought by Jeff Tratner. 2013-06-29 13:15:43 -04:00
Ethan Furman e2563462fc Added rationale for defaulting to 1 in the functional API. 2013-06-28 19:37:17 -07:00
Ethan Furman 3fe70b4acc Added example to enum docs show access to name and value attributes of enum members. 2013-06-28 14:02:34 -07:00
R David Murray 9a2f139ba0 #18111: Add What's New entry for max/min default. 2013-06-28 13:31:19 -04:00
Charles-François Natali 37cfb0a920 Issue #17914: Use os.cpu_count() instead of multiprocessing.cpu_count() where
applicable.
2013-06-28 19:25:45 +02:00
R David Murray fe3ae3cdc7 Merge #18311: fix typo. 2013-06-26 15:11:32 -04:00
R David Murray c7f7579855 #18311: fix typo. 2013-06-26 15:11:12 -04:00
Raymond Hettinger 4d6018fe45 Issue 18111: Add a default argument to min() and max() 2013-06-24 22:43:02 -07:00
Ned Deily 2c72b51c44 Issue #18164: merge from 3.3 2013-06-24 14:23:35 -07:00
Ned Deily 51cee7d24a Issue #18164: Clarify the embedding docs regarding link options. 2013-06-24 14:22:09 -07:00
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
Christian Heimes 70833a8b1f ... also TLSv1.1 and TLSv1.2 2013-06-22 19:34:17 +02:00
Christian Heimes 24cd4cfc58 Add my SSL module patches to whatsnew 3.4 2013-06-22 19:31:58 +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
Victor Stinner 854ffcb6f3 whatsnew/3.4: mention functools.singledispatch, PEP 443 2013-06-21 00:36:30 +02:00
Victor Stinner 84e33c8431 whatsnew/3.4: mention the new enum module, PEP 435 2013-06-21 00:31:55 +02:00
Andrew Kuchling 7aed567f2b Merge from 3.3 2013-06-20 09:51:51 -04:00
Andrew Kuchling 2151fc6416 #4153: update Unicode howto for Python 3.3
* state that python3 source encoding is UTF-8, and give examples

* mention surrogateescape in the 'tips and tricks' section, and
  backslashreplace in the "Python's Unicode Support" section.

* Describe Unicode support provided by the re module.

* link to Nick Coghlan's and Ned Batchelder's notes/presentations.

* default filesystem encoding is now UTF-8, not ascii.

* Describe StreamRecoder class.

* update acks section

* remove usage of "I think", "I'm not going to", etc.

* various edits

* remove revision history and original outline
2013-06-20 09:29:09 -04:00
R David Murray 2f72aed1b4 Merge: Tweak programming faq examples so that it (mostly) passes doctest. 2013-06-19 16:59:22 -04:00
R David Murray fdf9503038 Tweak programming faq examples so that it (mostly) passes doctest.
The exception is the import related questions at the end, which
need to be rewritten anyway.
2013-06-19 16:58:26 -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 f4375ef4d4 importlib.abc.SourceLoader.get_source() was re-raising SyntaxError and
UnicodeDecodeError as ImportError. That was over-reaching the point of
raising ImportError in get_source() (which is to signal the source
code was not found when it should have). Conflating the two exceptions
with ImportError could lead to masking errors with the source which
should be known outside of whether there was an error simply getting
the source to begin with.
2013-06-16 18:05:54 -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
Andrew Kuchling 0d0813a816 Fix typo; clarify that the methods were removed entirely 2013-06-15 13:29:09 -04:00
Brett Cannon 4f422e3414 Issue #17177: Update the programming FAQ to use importlib 2013-06-14 22:49:00 -04:00
Brett Cannon 82b3d6ae93 Move something to the right section of What's New 2013-06-14 22:37:11 -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
Victor Stinner d016900080 Merge heads 2013-06-15 03:37:45 +02:00
Victor Stinner 36f01ad9ac Revert changeset 6661a8154eb3: Issue #3329: Add new APIs to customize memory allocators
The new API require more discussion.
2013-06-15 03:37:01 +02: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
Victor Stinner 4d7056258b Issue #3329: Add new APIs to customize memory allocators
* Add a new PyMemAllocators structure
* New functions:

  - PyMem_RawMalloc(), PyMem_RawRealloc(), PyMem_RawFree(): GIL-free memory
    allocator functions
  - PyMem_GetRawAllocators(), PyMem_SetRawAllocators()
  - PyMem_GetAllocators(), PyMem_SetAllocators()
  - PyMem_SetupDebugHooks()
  - _PyObject_GetArenaAllocators(), _PyObject_SetArenaAllocators()

* Add unit test for PyMem_Malloc(0) and PyObject_Malloc(0)
* Add unit test for new get/set allocators functions
* PyObject_Malloc() now falls back on PyMem_Malloc() instead of malloc() if
  size is bigger than SMALL_REQUEST_THRESHOLD, and PyObject_Realloc() falls
  back on PyMem_Realloc() instead of realloc()
* PyMem_Malloc() and PyMem_Realloc() now always call malloc() and realloc(),
  instead of calling PyObject_Malloc() and PyObject_Realloc() in debug mode
2013-06-15 00:37:46 +02: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
Christian Heimes 46bebee25f Issue #17134: Add ssl.enum_cert_store() as interface to Windows' cert store. 2013-06-09 19:03:31 +02:00
Christian Heimes 3e738f97f8 removed accidental new line 2013-06-09 18:07:16 +02:00
Christian Heimes 6d7ad13a45 Issue #18143: Implement ssl.get_default_verify_paths() in order to debug
the default locations for cafile and capath.
2013-06-09 18:02:55 +02:00
Ezio Melotti 7dc4c03344 #18126: merge with 3.3. 2013-06-09 01:05:16 +03:00
Ezio Melotti c1f5839412 #18126: update NumPy links in the documentation. Patch by Yury V. Zaytsev. 2013-06-09 01:04:21 +03:00
Łukasz Langa fdcf2b7d4e moved the single-dispatch generic function definitions to the glossary 2013-06-07 22:54:03 +02:00
Vinay Sajip 30298b468b Closes #11959: SMTPServer and SMTPChannel now take an optional map, use of which avoids affecting global state. 2013-06-07 15:21:41 +01:00
Łukasz Langa 6f69251980 Add reference implementation for PEP 443
PEP accepted: http://mail.python.org/pipermail/python-dev/2013-June/126734.html
2013-06-05 12:20:24 +02:00
Raymond Hettinger d71001749d Clarify which dictionaries are updateable
by using the wording from the Py2.7 docs.
2013-06-02 10:03:05 -07:00
Serhiy Storchaka dce05500a1 Issue #18085: Fix PyObject_CallMethodObjArgs()'s entry in refcounts.dat. 2013-05-28 22:46:15 +03:00
Serhiy Storchaka ea2b490f3d Issue #18011: base64.b32decode() now raises a binascii.Error if there are
non-alphabet characters present in the input string to conform a docstring.
Updated the module documentation.
2013-05-28 15:27:29 +03:00
Serhiy Storchaka fef952a607 Issue #18079: Fix a typo in the tutorial. 2013-05-28 12:49:34 +03:00
Jason R. Coombs 3a09286790 Issue #13772: Restored directory detection of targets in `os.symlink` on 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. 2013-05-27 23:21:28 -04:00
Ned Deily ecf0851809 Fix typo in embedding doc and update examples to 3.3. 2013-05-26 18:53:39 -07:00
Brett Cannon 4b4e38e7d4 Mention __cached__ in the import ref. 2013-05-25 11:32:50 -04:00
Brett Cannon 533f1ed334 Add a missing parenthesis. 2013-05-25 11:28:20 -04:00
Brett Cannon 2cefb3cf96 Various tweaks to importlib docs. 2013-05-25 11:26:11 -04:00
Brett Cannon c3511c1dd8 Issue #17953: document that sys.modules shouldn't be replaced (thanks
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.
2013-05-24 08:05:07 -04:00
Senthil Kumaran 05ec6aca3a Fix #18007 : Document CookieJar.add_cookie_header request parameter changes in 3.3 2013-05-23 05:27:38 -07:00
Nick Coghlan 650e322fc6 Issue 17844: Clarify meaning of different codec tables 2013-05-23 20:24:02 +10:00
Raymond Hettinger c1939b8f75 Issue #18031: %-formatting isn't dead yet and might pull through. 2013-05-23 00:14:47 -07:00
Serhiy Storchaka 9e62d35e65 Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs. 2013-05-22 15:33:09 +03:00
R David Murray 95ae99205e #17973: fix technical inaccuracy in faq entry (it now passes doctest). 2013-05-21 11:44:41 -04:00
Ned Deily ea3cfc5f34 Issue #18026: fix ctypes doc typo 2013-05-20 14:29:44 -07:00
R David Murray bcf06d364d #17973: Add FAQ entry for ([],)[0] += [1] both extending and raising.
This has come up often enough now on the tracker that it deserves a FAQ entry.
2013-05-20 10:32:46 -04:00
Ezio Melotti 86aecc360f #14097: improve the "introduction" page of the tutorial. 2013-05-20 08:12:32 +03:00
Raymond Hettinger 697fd46d15 merge 2013-06-02 10:04:59 -07:00
Brett Cannon 3e0651b5fa Issue #18065: For frozen packages set __path__ to [].
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.
2013-05-31 23:18:39 -04:00
Brett Cannon 0dbb4c7f13 Issues #18088, 18089: Introduce
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.
2013-05-31 18:56:47 -04:00
Brett Cannon b60a43eabf Add a reset_name argument to importlib.util.module_to_load in order to
control whether to reset the module's __name__ attribute in case a
reload is being done.
2013-05-31 18:11:17 -04:00
Brett Cannon 028d51236a Update What's New for importlib.util.module_to_load name change 2013-05-31 18:02:11 -04:00
Brett Cannon 177381116e Add a reference to module_to_load 2013-05-31 18:00:56 -04:00
Brett Cannon 357c9fb055 Rename importlib.util.ModuleManager to module_to_load so that the name
explains better what the context manager is providing.
2013-05-30 17:31:47 -04:00
Serhiy Storchaka 1cfebc73e0 Issue #9369: The types of `char*` arguments of PyObject_CallFunction() and
PyObject_CallMethod() now changed to `const char*`.
Based on patches by Jörg Müller and Lars Buitinck.
2013-05-29 18:50:54 +03:00
Andrew Kuchling 1e170bae71 #1554133: Document PyOS_InputHook, PyOS_ReadlineFunctionPointer 2013-05-28 21:48:28 -04:00
Brett Cannon 56dfc2127f Undo a recommendation as load_module() methods might be called directly 2013-05-28 18:40:31 -04:00
Brett Cannon 3dc48d6f69 Issue #18070: importlib.util.module_for_loader() now sets __loader__
and __package__ unconditionally in order to do the right thing for
reloading.
2013-05-28 18:35:54 -04:00
Brett Cannon a22faca714 Clarify some documentation 2013-05-28 17:50:14 -04:00
Brett Cannon a3687f0d68 Introduce importlib.util.ModuleManager which is a context manager to
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.
2013-05-28 17:29:34 -04:00
Serhiy Storchaka 4dbae88131 Issue #18085: Fix PyObject_CallMethodObjArgs()'s entry in refcounts.dat. 2013-05-28 22:47:36 +03:00
Serhiy Storchaka 77a3ad743f Issue #18011: base64.b32decode() now raises a binascii.Error if there are
non-alphabet characters present in the input string to conform a docstring.
Updated the module documentation.
2013-05-28 15:30:38 +03:00
Serhiy Storchaka 3801f632dc Issue #18079: Fix a typo in the tutorial. 2013-05-28 12:50:54 +03:00
Jason R. Coombs 8f1a8e32b1 Merge with 3.3 2013-05-27 23:26:36 -04:00
Brett Cannon 3b62ca88e4 Issue #18072: Implement get_code() for importlib.abc.InspectLoader and
ExecutionLoader.
2013-05-27 21:11:04 -04:00
Ned Deily e7b47dda64 Fix typo in embedding doc and update examples to 3.4. 2013-05-26 18:57:00 -07:00
Brett Cannon 9ffe85e1e8 Move importlib.abc.SourceLoader.source_to_code() to InspectLoader.
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.
2013-05-26 16:45:10 -04:00
Łukasz Langa eadd8cf507 Fix #16832 - expose cache validity checking support in ABCMeta 2013-05-25 18:41:50 +02:00
Brett Cannon b961955e95 merge 2013-05-25 11:33:13 -04:00
Brett Cannon 21cc628e4c merge 2013-05-25 11:29:03 -04:00
Brett Cannon b39567a00e merge 2013-05-25 11:26:36 -04:00
Brett Cannon 6489d0b380 merge fix for issue #17953 2013-05-24 17:31:37 -04:00
Senthil Kumaran 8307075ce8 Fix #17272 - Make Request.full_url and Request.get_full_url return same result under all circumstances.
Document the change of Request.full_url to a property.
2013-05-24 09:14:12 -07:00
Senthil Kumaran cbc77bbbc0 merge from 3.3
Fix #18007 : Document CookieJar.add_cookie_header request parameter changes in 3.3 and 3.4.
2013-05-23 05:28:34 -07:00
Nick Coghlan c633f97808 Merge issue 17844 from 3.3 2013-05-23 20:25:09 +10:00
Raymond Hettinger 8f34da3f5f merge 2013-05-23 00:15:19 -07:00
Serhiy Storchaka 549681c79b Issue #17844: Add links to encoders and decoders for bytes-to-bytes codecs. 2013-05-22 15:35:35 +03:00
Giampaolo Rodola' 80e1c43ddf Fix issue #17996: expose socket.AF_LINK constant on BSD and OSX. 2013-05-21 21:02:04 +02:00
R David Murray b3a579223e merge #17973: fix technical inaccuracy in faq entry (it now passes doctest). 2013-05-21 11:45:09 -04:00
Ned Deily de88c0d2f2 Issue #18026: merge 2013-05-20 14:32:06 -07:00
R David Murray 63f72908a1 Merge #17973: Add FAQ entry for ([],)[0] += [1] both extending and raising. 2013-05-20 10:33:27 -04:00
Andrew Kuchling 2a9c8e8cd3 #17955: minor updates to Functional howto
* Describe compress() and accumulate()
* Add a subsection on combinatoric functions.
* Add a forward link to skip the theoretical discussion in the first section.
* Clarify what filterfalse() is the opposite of.
* Remove the old outline and some notes at the end.
* Various small edits.
2013-05-20 10:14:53 -04:00
Charles-Francois Natali 44feda3cd0 Issue #17914: Add os.cpu_count(). Patch by Yogesh Chaudhari, based on an
initial patch by Trent Nelson.
2013-05-20 14:40:46 +02:00
Ezio Melotti 93c6770c72 #14097: merge with 3.3. 2013-05-20 08:14:14 +03:00
Eli Bendersky fb625448f8 Clarify docs too: events can be any sequence (not that the C code supports it) 2013-05-19 09:09:24 -07:00
Raymond Hettinger 163e9821b4 Undo the deprecation of _asdict().
Backed out changeset c4ca39bece9d
2013-05-18 00:05:20 -07:00
Raymond Hettinger 4e0172fd9a Deprecate nametuple._asdict() 2013-05-17 17:14:27 -07:00
Benjamin Peterson e8e14591eb rather than passing locals to the class body, just execute the class body in the proper environment 2013-05-16 14:37:25 -05:00
Barry Warsaw b710d7e4c3 - Issue #17977: The documentation for the cadefault argument's default value
in urllib.request.urlopen() is fixed to match the code.
2013-05-14 11:38:38 -04:00
Barry Warsaw d486707d2e - Issue #17977: The documentation for the cadefault argument's default value
in urllib.request.urlopen() is fixed to match the code.
2013-05-14 11:35:16 -04:00
Georg Brandl 7025349aa8 merge with 3.3 2013-05-12 12:37:12 +02:00
Georg Brandl 521ed52131 Closes issue #17732: ignore install-directory specific options in
distutils.cfg when a venv is active.
2013-05-12 12:36:07 +02:00
Raymond Hettinger 3f5228d402 Issue #16694: Add source code link for operator.py 2013-05-10 19:57:44 -07:00
Barry Warsaw 8c01ffa6ed Merge 3.3 2013-05-10 11:36:23 -04:00
Barry Warsaw d8f870d0fa I was confused before. It's correct to not call .close() inside the with
statement, but add a comment that clarifies the purpose of the code.
2013-05-10 11:35:38 -04:00
Ezio Melotti 9b149b94ff #17841: merge with 3.3. 2013-05-10 05:22:14 +03:00
Ezio Melotti 173d4109b5 #17841: remove missing codecs aliases from the documentation. Patch by Thomas Fenzl. 2013-05-10 05:21:35 +03:00
Andrew Kuchling 40e39fc8b8 #17700: merge with 3.3 2013-05-09 20:14:01 -04:00
Andrew Kuchling ddcb30440d #17700: update the curses HOWTO for 3.x 2013-05-09 20:05:20 -04:00
Ezio Melotti 1fbb773c29 #17938: merge with 3.3. 2013-05-09 15:34:09 +03:00
Ezio Melotti 955382ca54 #17938: remove duplicate paragraphs. 2013-05-09 15:33:53 +03:00
Ezio Melotti 0fbdf26158 #16523: merge with 3.3. 2013-05-08 10:56:32 +03:00
Ezio Melotti babc8227cc #16523: improve attrgetter/itemgetter/methodcaller documentation. 2013-05-08 10:53:11 +03:00
Ezio Melotti 3ed3b3b402 #17714: merge with 3.3. 2013-05-07 11:21:21 +03:00
Ezio Melotti c58a3ea72c #17714: document that the base64 codec adds a trailing newline. 2013-05-07 11:14:27 +03:00
Ezio Melotti 7168879eb2 #17871: merge with 3.3. 2013-05-07 09:47:08 +03:00
Ezio Melotti 9c939bceeb #17871: fix unittest.TextTestRunner signature in the docs. Patch by Yogesh Chaudhari. 2013-05-07 09:46:30 +03:00
Raymond Hettinger 6e6bee8d08 merge 2013-05-06 18:23:10 -07:00
Raymond Hettinger 12f588adeb Issue 17920: Fix-up terminology in the set documentation 2013-05-06 18:22:43 -07:00
Victor Stinner 8cecc8c262 Issue #7330: Implement width and precision (ex: "%5.3s") for the format string
of PyUnicode_FromFormat() function, original patch written by Ysj Ray.
2013-05-06 23:11:54 +02:00
R David Murray 5c29bb331a Merge #14187: Add glossary entry for 'function annotations'.
Patch by Chris Rebert.
2013-05-06 12:58:41 -04:00
R David Murray 25cd09115d #14187: Add glossary entry for 'function annotations'.
Patch by Chris Rebert.
2013-05-06 12:58:16 -04:00
Nick Coghlan b39fd0c9b8 Issue #11816: multiple improvements to the dis module
* get_instructions generator
* ability to redirect output to a file
* Bytecode and Instruction abstractions

Patch by Nick Coghlan, Ryan Kelly and Thomas Kluyver.
2013-05-06 23:59:20 +10:00
Raymond Hettinger 77371a5eea merge 2013-05-05 19:54:04 -07:00
Raymond Hettinger 44571daf0e Issue 17862: Improve the signature of itertools grouper() recipe.
Putting *n* after the *iterable* matches the signature of other itertools
and recipes.  Also, it reads better.

Suggested by Ezio Melotti.
2013-05-05 19:53:41 -07:00
Richard Oudkerk 7a3dae056d Issue #15528: Add weakref.finalize to support finalization using
weakref callbacks.

This is 2e446e87ac5b except that collections/__init__.py has been
modified to import proxy from _weakref instead of weakref.  This
eliminates an import cycle which seems to cause a problem on Unix but
not Windows.
2013-05-05 23:05:00 +01:00
Richard Oudkerk 39b17c513a Backout 2e446e87ac5b; it breaks the unix buildbots. 2013-05-05 22:12:34 +01:00
Richard Oudkerk f3593026de Issue #15528: Add weakref.finalize to support finalization using
weakref callbacks.
2013-05-05 20:59:04 +01:00
Antoine Pitrou 609a56f788 Elaborate on bytes-like objects. 2013-05-04 20:18:53 +02:00
Antoine Pitrou 5de183a07c Elaborate on bytes-like objects. 2013-05-04 20:18:34 +02:00
Antoine Pitrou 1a6cb30a34 Issue #5845: Enable tab-completion in the interactive interpreter by default, thanks to a new sys.__interactivehook__.
(original patch by Éric Araujo)
2013-05-04 20:08:35 +02:00
Brett Cannon 4c14b5de1c #17115,17116: Have modules initialize the __package__ and __loader__
attributes to None.

The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.

This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
2013-05-04 13:56:58 -04:00
Ezio Melotti 4cfc0b5411 #16518: merge with 3.3. 2013-05-04 18:07:12 +03:00
Ezio Melotti c228e96726 #16518: use "bytes-like object" throughout the docs. 2013-05-04 18:06:34 +03:00
Charles-Francois Natali f18a82d956 Issue #17529: Fix os.sendfile() documentation regarding the type of file
descriptor supported.
2013-05-01 15:13:12 +02:00
Charles-Francois Natali a771a1b48e Issue #17529: Fix os.sendfile() documentation regarding the type of file
descriptor supported.
2013-05-01 15:12:20 +02:00
Ezio Melotti e1419e80cf #16518: merge with 3.3. 2013-04-30 23:34:41 +03:00
Ezio Melotti aa54e2ff5e #16518: add "bytes-like object" to the glossary. 2013-04-30 23:33:31 +03:00
Benjamin Peterson 3b0431dc60 check local class namespace before reaching for cells (closes #17853) 2013-04-30 09:41:40 -04:00
Ezio Melotti f256f5f3eb #17881: merge with 3.3. 2013-04-30 16:34:30 +03:00
Ezio Melotti ab6ab15e7d #17881: clarify documentation of plistlib. 2013-04-30 16:34:04 +03:00
R David Murray 775ccdf1fc #7152: Remove incorrectly added reference to DataHandler. 2013-04-28 17:06:01 -04:00
R David Murray d4c1b36c39 Merge: Reflow paragraphs.
(I got a merge conflict on this in urllib.request.rst, which makes no sense to
me.  Hopefully I didn't screw up the previous 3.3 commit.)
2013-04-28 11:30:19 -04:00
R David Murray 9330a94467 Reflow paragraphs.
I know one of them looks worse, but now it is <80 chars and
matches the 2.7 text.
2013-04-28 11:24:35 -04:00
R David Murray 876f08e3ae Merge #7152: Clarify that ProxyHandler is added only if proxy settings are detected.
Behavior confirmation and initial patch by Jessica McKellar.
2013-04-28 11:08:27 -04:00
R David Murray 5aea37ad1d #7152: Clarify that ProxyHandler is added only if proxy settings are detected.
Behavior confirmation and initial patch by Jessica McKellar.
2013-04-28 11:07:16 -04:00
Brett Cannon 1f6ee73c1e merge for issue #17357 2013-04-27 23:20:55 -04:00
Brett Cannon 4067aa272e Issue #17357: Use more stern wording for
importlib.invalidate_caches().
2013-04-27 23:20:32 -04:00
Antoine Pitrou 9f14681959 Issue #17804: New function ``struct.iter_unpack`` allows for streaming struct unpacking. 2013-04-27 00:20:04 +02:00
Ezio Melotti cbe19e56ea #17729: merge with 3.3. 2013-04-23 09:58:04 +03:00
Ezio Melotti d638381ee0 #17729: remove the Advocacy HOWTO from the index. 2013-04-23 09:56:30 +03:00
Ezio Melotti 99b3caf514 #17729: merge with 3.3. 2013-04-23 09:25:45 +03:00
Ezio Melotti 8bdcaf794a #17729: remove the outdated Advocacy HOWTO, as suggested by the author. 2013-04-23 09:24:51 +03:00
Serhiy Storchaka fcd9f22238 Issue #16624: `subprocess.check_output` now accepts an `input` argument,
allowing the subprocess's stdin to be provided as a (byte) string.
Patch by Zack Weinberg.
2013-04-22 20:20:54 +03:00
R David Murray ca3f29413e #15575: Clarify tutorial description of when modules are executed. 2013-04-21 16:59:04 -04:00
R David Murray 25187e666b #15575: Clarify tutorial description of when modules are executed. 2013-04-21 16:58:36 -04:00
Ned Deily 7503b4f463 Issue #17670: merge from 3.3 2013-04-21 13:07:27 -07:00
Ned Deily bebe91a0ef Issue #17670: Provide an example of expandtabs() usage. 2013-04-21 13:05:21 -07:00
R David Murray a6d67e6c5d Merge #17409: Document RLIM_INFINITY and use it to clarify the setrlimit docs. 2013-04-20 13:40:33 -04:00
R David Murray bdf940d3bd #17409: Document RLIM_INFINITY and use it to clarify the setrlimit docs. 2013-04-20 13:37:34 -04:00
Eli Bendersky 3bdead1113 Add some documentation for IncrementalParesr 2013-04-20 09:06:27 -07:00
Eli Bendersky 10e0af8493 Fix trailing whitespace 2013-04-20 05:54:29 -07:00
Eli Bendersky ab2a76c8a8 Update ET documentation reprhasing the mention of the new IncrementalParser in
the doc for iterparse.
2013-04-20 05:53:50 -07:00
Barry Warsaw 24aa15959b Merge 3.3 2013-04-19 11:32:54 -04:00
Barry Warsaw 0aa685a33c Minor typo in example. 2013-04-19 11:32:25 -04:00
Antoine Pitrou 5b235d0923 Issue #17741: Add ElementTree.IncrementalParser, an event-driven parser for non-blocking applications. 2013-04-18 19:37:06 +02:00
R David Murray bca1a2629a #17135: Add note in imp to use importlib for new programs. 2013-04-18 09:51:17 -04:00
R David Murray 33a3c50db5 #17135: mark imp as deprecated as of 3.4. 2013-04-17 18:50:12 -04:00
Ezio Melotti 5aa7685a1c #17771: merge with 3.3. 2013-04-17 07:34:31 +03:00
Ezio Melotti a68c1ab571 #17771: fix typo. Patch by Andriy Mysyk. 2013-04-17 07:34:13 +03:00
Ezio Melotti 3533ef2d21 #17740: merge with 3.3. 2013-04-17 04:10:51 +03:00
Ezio Melotti c048d98501 #17740: fix links to the socket function. Initial patch by Zachary Ware. 2013-04-17 04:10:26 +03:00
Antoine Pitrou 9b42128e2c Issue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for server sockets.
Thanks to David D Lowe for reporting.
2013-04-16 20:28:15 +02:00
Antoine Pitrou d34941ad4e Issue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for server sockets.
Thanks to David D Lowe for reporting.
2013-04-16 20:27:17 +02:00
Ezio Melotti acfc454c10 #13510: merge with 3.3. 2013-04-15 19:09:29 +03:00
Ezio Melotti ed3cd7e445 #13510: clarify that f.readlines() is note necessary to iterate over a file. Patch by Dan Riti. 2013-04-15 19:08:31 +03:00
Eric V. Smith 7d55a40b9a Issue #17728: Merge with 3.3. 2013-04-15 09:53:49 -04:00
Eric V. Smith 45fe62dc9c Issue #17728: Specify default precision for float.format for presentation types e, f, and g. 2013-04-15 09:51:54 -04:00
R David Murray 8a34596bbe #2118: IOError is deprecated, use OSError. 2013-04-14 06:46:35 -04:00
Georg Brandl c8fb047d69 merge with 3.3 2013-04-14 12:03:01 +02:00
Georg Brandl 1aca953a40 Fix example ignoring ".svn" directories in compileall. 2013-04-14 12:02:43 +02:00
Georg Brandl e827ea866d merge with 3.3 2013-04-14 11:59:19 +02:00
Georg Brandl 1e1134a314 The Integral class does not contain implementations for the bit-shifting operations. (See #3056.) 2013-04-14 11:58:54 +02:00
Georg Brandl 015427e659 merge with 3.3 2013-04-14 11:55:44 +02:00
Georg Brandl 5e2954e083 Clarify that the function *definition* creates the function and the binding in the module globals. 2013-04-14 11:47:46 +02:00
Georg Brandl f36f20f850 merge with 3.3 2013-04-14 11:16:46 +02:00
Georg Brandl 991fc5736e Closes #13638: document PyErr_SetFromErrnoWithFilenameObject,
PyErr_SetFromWindowsErrWithFilenameObject, and
PyErr_SetExcFromWindowsErrWithFilenameObject.

Note that PyErr_SetExcFromWindowsErrWithFilenameObjectAndSomeOtherParametersSoThatTheNameGetsSoLongThatNobodyIsEverGonnaUseThisStrangeFunctionForAnything is still undocumented.
2013-04-14 11:12:16 +02:00
Georg Brandl 1e6a3a2fe9 merge with 3.3 2013-04-14 10:59:17 +02:00
Georg Brandl a204636b91 bind('') does not do the same as bind('localhost') 2013-04-14 10:59:04 +02:00
Georg Brandl f221377d8b merge with 3.3 2013-04-14 10:50:13 +02:00
Georg Brandl 5f4b4ac73e Update code examples using collections.abc classes. 2013-04-14 10:50:05 +02:00
Georg Brandl 9def20566a merge with 3.3 2013-04-14 10:31:24 +02:00
Georg Brandl 7b8c1324d7 Closes #17726: small clarification in design FAQ. 2013-04-14 10:31:06 +02:00
Georg Brandl 94a9a2da32 merge with 3.3 2013-04-14 10:19:31 +02:00
Georg Brandl e09596862a Update using/mac documentation which was still on 2.5. 2013-04-14 10:17:35 +02:00
Georg Brandl cf72c5e4ea merge with 3.3 2013-04-14 10:13:50 +02:00
Georg Brandl dec3b3f704 Clarify point in name mangling doc. 2013-04-14 10:13:42 +02:00
R David Murray 8e37d5df95 #2118: Make SMTPException a subclass of IOError.
Initial patch by Ned Jackson Lovely.
2013-04-13 14:49:48 -04:00
R David Murray c1d3daf58b Merge #2118: clarify smtplib exception documentation. 2013-04-13 14:42:36 -04:00
R David Murray 0bfd6acf03 Reflow paragraph. 2013-04-13 14:40:51 -04:00
R David Murray 14ee3cf244 #2118: clarify smtplib exception documentation. 2013-04-13 14:40:33 -04:00
Ezio Melotti 5c965dafbd #17686: merge with 3.3. 2013-04-13 20:07:58 +03:00
Ezio Melotti ac3da87553 #17686: fix broken link in Doc/using/unix.rst. Patch by Dan Riti. 2013-04-13 20:07:42 +03:00
Mark Dickinson 9b6fdf8401 Fix incorrect indentation on 'versionadded' for weakref.ref.__callback__. 2013-04-13 16:09:18 +01:00
Mark Dickinson 556e94b8fe Issue #17643: Add __callback__ attribute to weakref.ref. 2013-04-13 15:45:44 +01:00
Ezio Melotti 3121e32952 #17653: merge with 3.3. 2013-04-12 19:19:45 +03:00
Ezio Melotti a3b255f275 #17653: fix typo in socketserver docs. Patch by Tshepang Lekhonkhobe. 2013-04-12 19:19:21 +03:00
Vinay Sajip a713079ed8 Closed #9556: Allowed specifying a time-of-day for a TimedRotatingFileHandler to rotate. 2013-04-12 17:04:23 +01:00
Ezio Melotti 15a98cd30c Merge heads. 2013-04-12 16:24:12 +03:00
Ezio Melotti 6ebdb61b67 Merge heads. 2013-04-12 16:23:24 +03:00
Andrew Svetlov 2175b4ff28 #17688: fix declaration for richcmp example in the docs.
Thanks to Daniel Mullner
2013-04-12 16:09:00 +03:00
Andrew Svetlov 59d6d2dbeb #17688: fix declaration for richcmp example in the docs.
Thanks to Daniel Mullner
2013-04-12 16:08:40 +03:00
Ezio Melotti cbc2d29636 #6696: merge with 3.3. 2013-04-12 15:44:37 +03:00
Ezio Melotti 075d87cf05 #6696: add documentation for the Profile objects, and improve profile/cProfile docs. Patch by Tom Pinckney. 2013-04-12 15:42:06 +03:00
Antoine Pitrou 50b24d0d7c Fix a crash when setting a servername callback on a SSL server socket and the client doesn't send a server name.
Patch by Kazuhiro Yoshida.
(originally issue #8109)
2013-04-11 20:48:42 +02:00
Georg Brandl 526575d537 Fix invalid markup. 2013-04-11 16:10:13 +02:00
R David Murray 671cd3290b #17487: wave.getparams now returns a namedtuple.
Patch by Claudiu Popa.
2013-04-10 12:31:43 -04:00
Ezio Melotti 3f5ffbee23 #17635: merge with 3.3. 2013-04-10 18:01:22 +03:00
Ezio Melotti c09959ae0f #17635: fix wrong function name in multiprocessing docs. 2013-04-10 17:59:20 +03:00
Brett Cannon 777622b6ca What's new entry for issue #17093 2013-04-09 17:03:10 -04:00
Brett Cannon 100883f0cb Issue #17093,17566,17567: Methods from classes in importlib.abc now raise/return
the default exception/value when called instead of raising/returning
NotimplementedError/NotImplemented (except where appropriate).
This should allow for the ABCs to act as the bottom/end of the MRO with expected
default results.

As part of this work, also make importlib.abc.Loader.module_repr()
optional instead of an abstractmethod.
2013-04-09 16:59:39 -04:00
Andrew Svetlov 595365de32 Merge heads 2013-04-07 14:47:05 +03:00
Andrew Svetlov 5cd72b7b9c Update argparse docs to follow order of ArgumentParser() arguments. 2013-04-07 14:44:34 +03:00
Andrew Svetlov 5b6e1cad37 Update argparse docs to follow order of ArgumentParser() arguments. 2013-04-07 14:43:17 +03:00
Raymond Hettinger 1a2ea9c592 merge 2013-04-06 20:28:05 -07:00
Raymond Hettinger 17328e4fae Clean-up lru_cache examples. The print() not is needed. Set maxsize to a power of two. 2013-04-06 20:27:33 -07:00
Andrew Svetlov c53fd51278 Change wording as Eli Bendersky suggests. 2013-04-06 18:55:31 +03:00
Andrew Svetlov e16f4dc80a Change wording as Eli Bendersky suggests. 2013-04-06 18:55:07 +03:00
Georg Brandl a4f988c2bd merge with 3.3 2013-04-06 16:49:23 +02:00
Georg Brandl 03b273f4d1 Add 3.3.1 to LICENSE files. 2013-04-06 16:48:55 +02:00
Georg Brandl 98297f4807 merge with 3.3 2013-04-06 16:47:34 +02:00
Georg Brandl cca5548159 merge with 3.3.1 release clone 2013-04-06 16:42:43 +02:00
Georg Brandl 2fd4abe6a1 merge with 3.2 branch 2013-04-06 16:39:49 +02:00
Andrew Svetlov cb04acf425 Add link to glossary for hashable term in docs for set type 2013-04-05 16:22:01 +03:00
Andrew Svetlov 9a411ce9ea Add link to glossary for hashable term in docs for set type 2013-04-05 16:21:50 +03:00
Andrew Svetlov a5b89c178b Fix typo 2013-04-05 11:40:01 +03:00
Andrew Svetlov e463b668e8 Fix typo 2013-04-05 11:39:50 +03:00
Andrew Svetlov 974045523b Fix typo. 2013-04-05 10:11:25 +03:00
Andrew Svetlov 815b0e23bf Fix typo. 2013-04-05 10:10:12 +03:00
Ezio Melotti b9e2147dee #8913: merge with 3.3. 2013-04-04 09:16:42 +03:00
Ezio Melotti 09f0ddec21 #8913: add examples and docs for date/time/datetime.__format__. Patch by Heikki Partanen. 2013-04-04 09:16:15 +03:00
Terry Jan Reedy fd4bba1bf3 Merge with 3.3 2013-04-03 12:45:47 -04:00
Terry Jan Reedy 41459a9b29 Issue #15940: Replace tab. 2013-04-03 12:45:24 -04:00
Terry Jan Reedy 670e1b7b1e Merge with 3.3 2013-04-03 12:35:25 -04:00
Terry Jan Reedy b5e2e7e93a Issue #15940: Specify effect of locale on time functions. 2013-04-03 12:34:57 -04:00
R David Murray 9c7dfbf720 Merge #17623: fix whatsnew typo
Patch by Thomas Heller.
2013-04-03 06:17:30 -04:00
R David Murray 03b2a1ce51 #17623: fix whatsnew typo
Patch by Thomas Heller.
2013-04-03 06:16:14 -04:00
Ned Deily 05bdd853ec Issue #17586: fix typo in contextlib.rst 2013-03-31 17:06:15 -07:00
R David Murray 5cbf3a0d6e Merge #17435: Don't use mutable default values in Timer.
Patch by Denver Coneybeare with some test modifications by me.
2013-03-30 17:22:30 -04:00
R David Murray 19aeb439c6 Issue #17435: Don't use mutable default values in Timer.
Patch by Denver Coneybeare with some test modifications by me.
2013-03-30 17:19:38 -04:00
Vinay Sajip 3fdd4f1935 Merged documentation update from 3.3. 2013-03-30 11:57:09 +00:00
Vinay Sajip 8028a5cf15 Updated logging cookbook with additional example for output using str.format(). 2013-03-30 11:56:18 +00:00
Ezio Melotti 9d67238439 #17539: merge with 3.3. 2013-03-30 05:56:21 +02:00
Ezio Melotti b40a2203ad #17539: fix MagicMock example. Patch by Berker Peksag. 2013-03-30 05:55:52 +02:00
Ezio Melotti e612c1e29f #17438: merge with 3.3. 2013-03-29 04:02:14 +02:00
Ezio Melotti 6d2bc6e80b #17438: add links to the conversion tables in dump(s)/load(s). 2013-03-29 03:59:29 +02:00
Antoine Pitrou 2463e5fee4 Issue #16692: The ssl module now supports TLS 1.1 and TLS 1.2. Initial patch by Michele Orrù. 2013-03-28 22:24:43 +01:00
Ezio Melotti f2c64ed9eb Merge improvements to the suspicious builder and cleanup from 3.3. 2013-03-28 17:46:20 +02:00
Ezio Melotti a5d55baecc Update the suspicious builder to detect unused rules, and remove currently unusued rules. 2013-03-28 17:40:24 +02:00
Georg Brandl 1bab7134a8 Merge with 3.3. 2013-03-28 13:28:55 +01:00
Georg Brandl 44ea77bd81 Closes #4159: add LaTeX tabular column specifications to tables that otherwise are cut off or have overlapping text. 2013-03-28 13:28:44 +01:00
Georg Brandl 8cb15bf6ff merge with 3.3 2013-03-28 09:11:59 +01:00
Georg Brandl 6ba6b13e32 Fix XML vulnerability link targets. 2013-03-28 09:11:44 +01:00
Georg Brandl 6f18a8648b Fix XML vulnerability link references. 2013-03-28 09:02:18 +01:00
Georg Brandl f5390fc162 merge with last upstream doc changes in 3.2 2013-03-28 08:57:50 +01:00
Ezio Melotti f92b063c4e Update suspicious ignore file. 2013-03-28 05:12:31 +02:00
Ezio Melotti e5caf29743 Update suspicious ignore file. 2013-03-28 04:54:58 +02:00
Ezio Melotti fd4365a4d8 Update suspicious ignore file. 2013-03-28 04:31:53 +02:00
Ezio Melotti 67ddccafc3 #17329: merge with 3.3. 2013-03-27 20:13:59 +02:00
Ezio Melotti 184e59357e #17329: merge with 3.2. 2013-03-27 20:12:55 +02:00
Ezio Melotti 265281ac02 #17329: document unittest.SkipTest. Initial patch by Zachary Ware. 2013-03-27 20:11:55 +02:00
Christian Heimes 9869e60dc2 Issue 17538: Document XML vulnerabilties 2013-03-26 17:48:28 +01:00
Christian Heimes 768f6a5360 Issue 17538: Document XML vulnerabilties 2013-03-26 17:47:23 +01:00
Christian Heimes 1df04e88ae Issue 17538: Document XML vulnerabilties 2013-03-26 17:35:55 +01:00
Christian Heimes 7380a67267 Issue 17538: Document XML vulnerabilties 2013-03-26 17:35:55 +01:00
Kristjan Valur Jonsson a1e8244afa Issue #16475: Add a whatsnew entry for 3.4 2013-03-26 13:56:14 +00:00
Ezio Melotti 711c37076a Merge versionadded addition and typo fix from 3.3. 2013-03-26 02:38:40 +02:00
Ezio Melotti a1eb483d8f Add versionadded for `-X faulthandler` (also fix typo and markup). 2013-03-26 02:36:28 +02:00
Ezio Melotti 1f8898a591 #17323: The "[X refs, Y blocks]" printed by debug builds has been disabled by default. It can be re-enabled with the `-X showrefcount` option. 2013-03-26 01:59:56 +02:00
Georg Brandl a809e4a540 merge with upstream 3.3 branch 2013-03-25 07:01:37 +01:00
Georg Brandl 4eb5f1a567 merge with main repo 3.2 branch 2013-03-25 06:56:31 +01:00
Antoine Pitrou 64c16c3311 Issue #17150: pprint now uses line continuations to wrap long string literals. 2013-03-23 20:30:39 +01:00
Gregory P. Smith 4a8ea9e2a6 Fixes issue #17488: Change the subprocess.Popen bufsize parameter default value
from unbuffered (0) to buffering (-1) to match the behavior existing code
expects and match the behavior of the subprocess module in Python 2 to avoid
introducing hard to track down bugs.
2013-03-23 12:00:00 -07:00
Gregory P. Smith a1b9ed32ee Fixes issue #17488: Change the subprocess.Popen bufsize parameter default value
from unbuffered (0) to buffering (-1) to match the behavior existing code
expects and match the behavior of the subprocess module in Python 2 to avoid
introducing hard to track down bugs.
2013-03-23 11:54:22 -07:00
Gregory P. Smith a1ed539268 Fixes issue #17488: Change the subprocess.Popen bufsize parameter default value
from unbuffered (0) to buffering (-1) to match the behavior existing code
expects and match the behavior of the subprocess module in Python 2 to avoid
introducing hard to track down bugs.
2013-03-23 11:44:25 -07:00
Raymond Hettinger 59addb7dec merge 2013-03-23 09:08:18 -07:00
Raymond Hettinger 3ddba16aa6 Update collections ABC table to match the __abstractmethods__ attribute for each container. 2013-03-23 09:07:36 -07:00
Raymond Hettinger 51612fd803 merge 2013-03-23 08:21:52 -07:00
Raymond Hettinger 378170d5d9 Issue 17447: Clarify that str.isidentifier doesn't check for reserved keywords. 2013-03-23 08:21:12 -07:00
Georg Brandl a7d2f0061f Copyright update to 2013. 2013-03-23 16:06:13 +01:00
Georg Brandl d50fe7216d Fix suspicious markup in the docs. 2013-03-23 16:00:41 +01:00
Georg Brandl 0a1bc11c66 Fix suspicious markup in the docs. 2013-03-23 15:59:46 +01:00
Kristján Valur Jónsson 34870c4142 Issue #17522: Minor documentation fix 2013-03-23 03:56:16 -07:00
Kristján Valur Jónsson 684cd0e643 Issue #17522: Add the PyGILState_Check() API. 2013-03-23 03:36:16 -07:00
Gregory P. Smith d4296fc19c cleanup references to PyString_ APIs in the 3.x docs. 2013-03-22 13:49:53 -07:00
Gregory P. Smith bcd2aa6d06 cleanup references to PyString_ APIs from 2.x in the 3.3 docs. 2013-03-22 13:49:26 -07:00
Gregory P. Smith 4b52ae8f97 Clean up references to the no longer existing PyString_ APIs in our docs. 2013-03-22 13:43:30 -07:00
Raymond Hettinger 671ddbe5a0 merge 2013-03-22 07:26:57 -07:00
Raymond Hettinger 8f35c891e7 Modernize unittest example 2013-03-22 07:26:18 -07:00
Terry Jan Reedy 2b6c26ebe3 Issue #13248: NEWS and What's New items 2013-03-21 19:36:26 -04:00
doko@ubuntu.com 6d3d0fe0b2 - Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
2013-03-21 13:39:52 -07:00
doko@ubuntu.com 1621d77fc8 - Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
2013-03-21 13:31:41 -07:00
doko@ubuntu.com d5537d071c - Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
  SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
2013-03-21 13:21:49 -07:00
Gregory P. Smith e25df59427 merge 2013-03-20 18:32:45 -07:00
Gregory P. Smith 74b24047e3 merge 2013-03-20 18:32:22 -07:00
Gregory P. Smith 1f8a40b81d remove the long obsolete mention of universal newlines mode only being
available when configured at compile time.
2013-03-20 18:32:03 -07:00
Antoine Pitrou c9b3ef2df0 Issue #16997: unittest.TestCase now provides a subTest() context manager to procedurally generate, in an easy way, small test instances. 2013-03-20 20:16:47 +01:00
Ezio Melotti c622bf3f85 Merge usage of argument/parameter and markup fixes from 3.3. 2013-03-20 13:54:30 +02:00
Ezio Melotti ba7dd670cb Merge usage of argument/parameter and markup fixes from 3.2. 2013-03-20 13:54:18 +02:00
Ezio Melotti 93115e0914 Fix usage of argument/parameter and markup. 2013-03-20 13:53:32 +02:00
Gregory P. Smith 6409989dc8 clarifiy the documentation for issue17285. see also commit
ee30400efceb which updated the docstring.
2013-03-19 23:36:59 -07:00
Gregory P. Smith f16455aa4a clarifiy the documentation for issue17285. see also commit
ee30400efceb which updated the docstring.
2013-03-19 23:36:31 -07:00
Senthil Kumaran 08c73e80df Automated merge with ssh://hg.python.org/cpython 2013-03-19 21:27:21 -07:00
Senthil Kumaran 6ddec17f01 #17474 - merge from 3.3. Update default Docs with versionchanged markup on what's removed 2013-03-19 18:03:39 -07:00
Kristján Valur Jónsson d7009c6913 Issue #16475: Support object instancing, recursion and interned strings
in marshal
2013-03-19 18:02:10 -07:00
Senthil Kumaran cd3bb8b73c #17474 - Mark the deprecated Request methods as deprecated-removed. Review by Ezio Melotti 2013-03-19 18:01:43 -07:00
Michael Foord 04cbe0c35b Closes issue 17467. Add readline and readlines support to unittest.mock.mock_open 2013-03-19 17:22:51 -07:00
R David Murray 90cb1050d3 Merge: #1525919: Document MIMEText+set_payload encoding behavior. 2013-03-19 18:21:50 -04:00
R David Murray 432a48a0c8 Merge: #1525919: Document MIMEText+set_payload encoding behavior. 2013-03-19 18:21:22 -04:00
R David Murray 14b0124a29 #1525919: Document MIMEText+set_payload encoding behavior. 2013-03-19 18:18:55 -04:00
Senthil Kumaran aced69fd3f #17460 - merge from 3.3 2013-03-19 01:22:56 -07:00
Senthil Kumaran 2f306c03d3 #17460 - merge from 3.2 2013-03-19 00:58:46 -07:00
Senthil Kumaran 0492ec07e0 #17460 - Adding relevant warning messages regarding strict removal in docs 2013-03-19 00:51:08 -07:00
Senthil Kumaran 41518b4af0 #17474 - Remove the various deprecated methods of Request class. 2013-03-18 18:06:00 -07:00
Michael Foord 80cbc9e998 Closes issue 16709. unittest test discovery sorts test files for consistent test ordering 2013-03-18 17:50:12 -07:00
Senthil Kumaran 7f6d79721d #10050 : merge to default 2013-03-18 17:10:45 -07:00
Senthil Kumaran 6227c6952e #10050 - Document DeprecationWarnings for URLopener and FancyURLopener (msg172874 ) 2013-03-18 17:09:50 -07:00
Michael Foord 35266f78b7 Merge 2013-03-18 15:04:33 -07:00
Michael Foord f575230981 Documentation corrections for unittest.mock 2013-03-18 15:04:03 -07:00
Senthil Kumaran 052ddb01b3 #17460: Remove the strict argument of HTTPConnection and removing the
DeprecationWarning being issued from 3.2 onwards.
2013-03-18 14:11:41 -07:00
R David Murray fbb1815491 Merge #16057: Clarify why the base method default is called in custom encoders.
Original patch by Kushal Das.
2013-03-17 21:53:48 -04:00
R David Murray 1f2a49cfc6 Merge #16057: Clarify why the base method default is called in custom encoders.
Original patch by Kushal Das.
2013-03-17 21:53:23 -04:00
R David Murray dd246171e4 #16057: Clarify why the base method default is called in custom encoders.
Original patch by Kushal Das.
2013-03-17 21:52:35 -04:00
Terry Jan Reedy 15cddb498e Merge with 3.3 2013-03-17 15:29:19 -04:00
Terry Jan Reedy b271727bad Merge with 3.2 2013-03-17 15:28:52 -04:00
Terry Jan Reedy f3460414d5 Issue #17415: Trim trailing whitespace 2013-03-17 15:28:10 -04:00
Terry Jan Reedy a52c2d6d2f Merge with 3.3 2013-03-17 15:25:12 -04:00
Terry Jan Reedy 3380170ea5 Merge with 3.2 2013-03-17 15:22:00 -04:00
Terry Jan Reedy ec6e132987 Issue #17415: Clarify 'this' referent by moving containing sentence just after
the sentence referred to. Make other minor edits to improve flow.
2013-03-17 15:21:26 -04:00
Ezio Melotti 2acd293077 Fix markup/wording. 2013-03-16 22:23:30 +02:00
Terry Jan Reedy 8b8df5a8fb Merge with 3.3 2013-03-16 15:57:27 -04:00
Terry Jan Reedy f39cab1076 Merge with 3.2 2013-03-16 15:56:50 -04:00
Terry Jan Reedy dff04f44bc Issue #17418: specify that buffer sizes are bytes as soon as possible. 2013-03-16 15:56:27 -04:00
Georg Brandl 694bafa04e merge with 3.3 2013-03-16 08:03:51 +01:00
Georg Brandl 1f68a2f27f Remove row-spanning cell, which the Sphinx text writer does not support. 2013-03-16 08:01:49 +01:00
Terry Jan Reedy b0dc5c3bc5 Merge with 3.3 2013-03-15 16:51:21 -04:00
Terry Jan Reedy ca99440c2c Merge with 3.2 2013-03-15 16:50:54 -04:00
Terry Jan Reedy f3f0681794 Issue #17398: document url argument of RobotFileParser 2013-03-15 16:50:23 -04:00
Senthil Kumaran 2688644eef #1291 http.server's send_error takes an optional explain argument 2013-03-15 07:53:21 -07:00
Eli Bendersky f50d6bcbb7 Small cosmetic fixes 2013-03-14 14:39:51 -07:00
Terry Jan Reedy dfde54b66f Merge with 3.3: Issue #17386 2013-03-13 21:35:46 -04:00
Terry Jan Reedy ac356fcf8e Merge with 3.2: Issue #17386 2013-03-13 21:35:07 -04:00
Terry Jan Reedy 3b220e11eb Issue #17386 make.bat must run with Python 2 until Sphinx runs with Python 3.
If PYTHON is undefined, this fails without the launcher (installed with 3.3 or
from PyPI), but this is better than always failing. Patch from Zachary Ware.
2013-03-13 21:33:50 -04:00
Senthil Kumaran 1428e1335f #17307 - merge from 3.3 2013-03-13 13:43:23 -07:00
Senthil Kumaran e66cc8172d #17307 - merge from 3.2 2013-03-13 13:42:47 -07:00
Senthil Kumaran b5fe2479c1 #17307 - Example of HTTP PUT Request using http.client 2013-03-13 13:38:33 -07:00
Brett Cannon 327992330e Issue #17099: Have importlib.find_loader() raise ValueError when
__loader__ is not set on a module. This brings the exception in line
with when __loader__ is None (which is equivalent to not having the
attribute defined).
2013-03-13 11:09:08 -07:00
Brett Cannon 115309acec Issue #17176: Document that imp.NullImporter is no longer
automatically used by import.
2013-03-13 10:58:50 -07:00
Brett Cannon 2514b4871f Issue #17176: Document that imp.NullImporter is no longer inserted
into sys.path_importer_cache.
2013-03-13 10:46:22 -07:00
Brett Cannon 4802becb16 Issue #17117: Have both import itself and importlib.util.set_loader()
set __loader__ on a module when set to None.

Thanks to Gökcen Eraslan for the fix.
2013-03-13 10:41:36 -07:00
Brett Cannon aa73a1c9c9 Issue #17222: Document that py_compile now uses importlib for its file
writing and thus its semantics.
2013-03-13 09:37:42 -07:00
Benjamin Peterson 3b965a237c expose O_PATH if possible 2013-03-13 10:27:41 -05:00
Ezio Melotti fe1c471cb1 #17402: merge with 3.3. 2013-03-13 02:27:53 +02:00