Commit Graph

13294 Commits

Author SHA1 Message Date
Raymond Hettinger bfcb42936b Expand examples for ChainMap(). Improve markup. 2012-06-10 11:39:44 -07:00
Raymond Hettinger 7929cfb18c Note that the _asdict() method is outdated 2012-06-09 19:15:26 -07:00
Alexander Belopolsky a4415141da Issue #2736: Added datetime.timestamp() method. 2012-06-08 12:33:09 -04:00
Nick Coghlan cbc203e655 Merge from 3.2 2012-06-07 22:42:29 +10:00
Nick Coghlan a3a164a03c Nudge readers towards a more accurate mental model for loop else clauses 2012-06-07 22:41:34 +10:00
Victor Stinner a01f1adb87 Close #6203: Document that Python 3 sets LC_CTYPE at startup to the user's preferred locale encoding 2012-06-06 01:37:37 +02:00
Victor Stinner f86a5e8a93 Close #11022: TextIOWrapper doesn't call locale.setlocale() anymore
open() and io.TextIOWrapper are now calling locale.getpreferredencoding(False)
instead of locale.getpreferredencoding() in text mode if the encoding is not
specified. Don't change temporary the locale encoding using locale.setlocale(),
use the current locale encoding instead of the user preferred encoding.

Explain also in open() documentation that locale.getpreferredencoding(False) is
called if the encoding is not specified.
2012-06-05 13:43:22 +02:00
Victor Stinner 034d0aa217 Issue #14711: os.stat_float_times() has been deprecated. 2012-06-05 01:22:15 +02:00
Nadeem Vawda e860404eb7 Add a function lzma.open(), to match gzip.open() and bz2.open(). 2012-06-04 23:38:12 +02:00
Nadeem Vawda 6cbb20cdf6 Allow LZMAFile to accept modes with a "b" suffix. 2012-06-04 23:36:24 +02:00
Nadeem Vawda 33c34da574 Simplify usage of LZMAFile's fileobj support, like with BZ2File. 2012-06-04 23:34:07 +02:00
Nadeem Vawda af518c198e Add a function bz2.open(), to match gzip.open(). 2012-06-04 23:32:38 +02:00
Nadeem Vawda 50cb936bd0 Clarify acceptable values for BZ2File.__init__'s mode argument. 2012-06-04 23:31:22 +02:00
Nadeem Vawda aebcdba829 Make BZ2File's fileobj support easier to use.
The fileobj argument was added during the 3.3 development cycle, so this change
does not break backward compatibility with 3.2.
2012-06-04 23:31:20 +02:00
Nadeem Vawda 68721019ef Add fileobj support to gzip.open(). 2012-06-04 23:21:38 +02:00
Barry Warsaw 9b10e1fbb9 A few documentation improvements, spurred on by Brett's review. 2012-06-04 11:06:45 -04:00
Barry Warsaw c58c392da7 Trunk merge. 2012-06-04 09:41:48 -04:00
Raymond Hettinger 7d74effc67 Add usage note. 2012-06-04 00:32:15 -07:00
Barry Warsaw 409da157d7 Eric Snow's implementation of PEP 421.
Issue 14673: Add sys.implementation
2012-06-03 16:18:47 -04:00
Senthil Kumaran fe4dfd2b65 merge heads 2012-06-03 16:16:39 +08:00
Senthil Kumaran 1251fafcc5 Issue 14989: http.server --cgi option can enable the CGI http server. 2012-06-03 16:15:54 +08:00
Eli Bendersky 0813168e94 Issue #14090: fix some minor C API problems in default branch (3.3) 2012-06-03 08:07:47 +03:00
Eli Bendersky 11cfea9295 Issue #14424: Document PyType_GenericAlloc, and fix the documentation of PyType_GenericNew 2012-06-03 06:47:53 +03:00
Sandro Tosi 7f671338de backport c4bd68be5fc6 to 3.2 2012-06-02 23:41:19 +02:00
Sandro Tosi a894cbfa61 merge with 3.2 2012-06-02 18:22:31 +02:00
Sandro Tosi 964f205a34 refer to time.strftime 2012-06-02 18:22:02 +02:00
R David Murray f4b26ef250 #14957: fix doc typo. 2012-06-02 11:20:53 -04:00
R David Murray 554b3481fa #14957: fix doc typo. 2012-06-02 11:20:29 -04:00
Sandro Tosi c816290059 Issue #14814: use print() function 2012-06-02 17:16:33 +02:00
R David Murray 5a0d439126 #14957: clarify splitlines docs.
Initial patch by Michael Driscoll, I added the example.
2012-06-01 16:20:26 -04:00
R David Murray ae1b94b6e4 #14957: clarify splitlines docs.
Initial patch by Michael Driscoll, I added the example.
2012-06-01 16:19:36 -04:00
Sandro Tosi c10584a0d9 Issue #14968: merge with 3.2 2012-06-01 20:23:46 +02:00
Sandro Tosi 3f7d1d3303 Issue #14968: set 'Inplace Operators' as subsection; patch by Lars Buitinck 2012-06-01 20:23:20 +02:00
Eli Bendersky 1bf239446f fix trailing whitespace 2012-06-01 07:15:00 +03:00
Eli Bendersky 52467b167e Issue #14007: make XMLParser a real subclassable type exported from _elementtree. +cleanups 2012-06-01 07:13:08 +03:00
Nick Coghlan b7a455f326 Typo fix 2012-05-31 22:34:59 +10:00
Nick Coghlan 2722827071 Additional ExitStack examples, and a few other cleanups for the ExitStack docs 2012-05-31 22:17:08 +10:00
Georg Brandl 01d7058d6a Merge heads. 2012-05-30 22:04:57 +02:00
Georg Brandl 3539afd5c9 Update pydoc topics and fix new suspicious markup. 2012-05-30 22:03:20 +02:00
Eli Bendersky 48d358ba86 Issue #14007: implemented the 'element_factory' feature of TreeBuilder in
_elementtree, with a test.
2012-05-30 17:57:50 +03:00
Nick Coghlan a0cf90e3b1 Close #14947: add missing cross-reference to Language Definition from the new dynamic type creation functions. Also cleaned up the general wording of the docs 2012-05-30 22:17:30 +10:00
Brian Curtin d648fa2627 Fix #14943. Merge 3.2 2012-05-29 18:36:40 -05:00
Brian Curtin 13c70345ca Fix #14943. Update the proper default value and list the proper argument names in the explanation. 2012-05-29 18:34:45 -05:00
R David Murray abfc37491c #10839: raise an error on add of duplicate unique headers in new email policies
This feature was supposed to be part of the initial email6 checkin, but it got
lost in my big refactoring.

In this patch I'm not providing an easy way to turn off the errors, but they
only happen when a header is added programmatically, and it is almost never
the right thing to do to allow the duplicate to be added.  An application that
needs to add duplicates of unique headers can create a policy subclass to
allow it.
2012-05-29 09:14:44 -04:00
Vinay Sajip aa88d32574 Merged upstream changes. 2012-05-29 12:53:00 +01:00
Vinay Sajip 4126a7dc17 Added pyvenv docs to 'Python Setup and Usage' section. 2012-05-29 12:52:14 +01:00
Richard Oudkerk 87ea780e8e Use Python 3.x-style keyword only arg in Array()
Previously a Python 2.x compatible hack was used for
multiprocessing.sharedctypes.Array().  Also the documented
signature was wrong.
2012-05-29 12:01:47 +01:00
Eli Bendersky 737b173355 Issue 14814: Add namespaces keyword arg to find(*) methods in _elementtree.
Add attrib keyword to Element and SubElement in _elementtree.
Patch developed with Ezio Melotti.
2012-05-29 06:02:56 +03:00
R David Murray 7ef3ff3f2e #12515: email now registers a defect if the MIME end boundary is missing.
This commit also restores the news item for 167256 that it looks like
Terry inadvertently deleted.  (Either that, or I don't understand
now merging works...which is equally possible.)
2012-05-27 22:20:42 -04:00
R David Murray 80e0aee95b #1672568: email now registers defects for base64 payload format errors.
Which also means that it is now producing *something* for any base64
payload, which is what leads to the couple of older test changes in
test_email.  This is a slightly backward incompatible behavior change,
but the new behavior is so much more useful than the old (you can now
*reliably* detect errors, and any program that was detecting errors by
sniffing for a base64 return from get_payload(decode=True) and then doing
its own error-recovery decode will just get the error-recovery decode
right away).  So this seems to me to be worth the small risk inherent
in this behavior change.

This patch also refactors the defect tests into a separate test file,
since they are no longer just parser tests.
2012-05-27 21:23:34 -04:00