Commit Graph

7563 Commits

Author SHA1 Message Date
Hynek Schlawack 69168354c2 #10053: Don't close FDs when FileIO.__init__ fails
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:58:31 +02:00
Hynek Schlawack 9ed8b4e4ca #10053: Don't close FDs when FileIO.__init__ fails
Loosely based on the work by Hirokazu Yamamoto.
2012-06-21 20:20:25 +02:00
Ned Deily 69192238ba Issue #14225: Fix Unicode support for curses (#12567) on OS X:
1. on OS X, there is no separate /usr/lib/libcursesw nor libpanelw
    2. _XOPEN_SOURCE_EXTENDED must be enabled for _curses build
2012-06-20 23:47:14 -07:00
Nadeem Vawda fd8a838d58 Issue #14684: Add support for predefined compression dictionaries to the zlib module.
Original patch by Sam Rushing.
2012-06-21 02:13:12 +02:00
doko@ubuntu.com d8623e8e66 Do not italicize punctuation in python(1) manual page (Matt Kraai). 2012-06-20 13:16:31 +02:00
Christian Heimes 0b3847de6d Issue #15096: Drop support for the ur string prefix 2012-06-20 11:17:58 +02:00
Nadeem Vawda 10c8791978 Fix GzipFile's handling of filenames given as bytes objects.
Add relevant tests for GzipFile, and also for BZ2File and LZMAFile.
2012-06-20 01:48:50 +02:00
Nadeem Vawda 103e8113e4 Fix GzipFile's handling of filenames given as bytes objects. 2012-06-20 01:35:22 +02:00
Antoine Pitrou e67f48ce5e Issue #14928: Fix importlib bootstrap issues by using a custom executable (Modules/_freeze_importlib) to build Python/importlib.h. 2012-06-19 22:29:35 +02:00
Brian Curtin 0d0a1dedbc Fix #14772: Return the destination from some shutil functions. 2012-06-18 18:41:07 -05:00
Kristján Valur Jónsson e75ff35af2 Issue #15038: Optimize python Locks on Windows
Extract cross-platform condition variable support into a separate file and
provide user-mode non-recursive locks for Windows.
2012-06-18 20:30:44 +00:00
Richard Oudkerk d69cfe88ea Issue #15064: Implement context manager protocol for multiprocessing types 2012-06-18 17:47:52 +01:00
Richard Oudkerk 0f884273b0 Issue #15101: Make pool finalizer avoid joining current thread. 2012-06-18 16:02:49 +01:00
Richard Oudkerk f29ec4b0c8 Issue #15101: Make pool finalizer avoid joining current thread. 2012-06-18 15:54:57 +01:00
Petri Lehtinen 10e65881d5 Fix NEWS entry for #15036 2012-06-18 10:45:56 +03:00
Petri Lehtinen da7a6e7da0 Fix NEWS entry for #15036 2012-06-18 10:43:53 +03:00
Antoine Pitrou 48114b952b Issue #14657: The frozen instance of importlib used for bootstrap is now also the module imported as importlib._bootstrap. 2012-06-17 22:33:38 +02:00
Ezio Melotti 5b1406fbce #14840: merge with 3.2. 2012-06-17 14:12:42 +02:00
Ezio Melotti f90ea1f0a0 #14840: Add a bit on the difference between tuples and lists. Initial patch by Zachary Ware. 2012-06-17 14:10:59 +02:00
Nick Coghlan 307ef8aee5 Merge from 3.2 (Ignore X-Antivirus headers in test_nntplib) 2012-06-17 21:30:35 +10:00
Nick Coghlan 14d99a1491 Ignore X-Antivirus headers in test_nntplib 2012-06-17 21:27:18 +10:00
Nick Coghlan 9aff2a7c41 Merge from 3.2 (Issue #15043: skip test_gdb if the custom hooks can't be loaded) 2012-06-17 19:16:02 +10:00
Nick Coghlan be4e4b5691 Issue #15043: skip test_gdb if the custom hooks can't be loaded 2012-06-17 18:57:20 +10:00
Martin v. Löwis bce166681c Issue #14055: Add __sizeof__ support to _elementtree. 2012-06-17 10:41:22 +02:00
Nick Coghlan 9680bdb567 Issue #14814: Add first draft of PEP 3144 ipaddress module documentation (initial patch by Sandro Tosi) 2012-06-17 17:24:10 +10:00
Nick Coghlan 5b0dac12b8 Issue #13783: PEP 380 cleanup part 2, using the new identifier APIs in the generator implementation 2012-06-17 15:45:11 +10:00
Nick Coghlan c40bc09942 Issue #13783: the PEP 380 implementation no longer expands the public C API 2012-06-17 15:15:49 +10:00
Meador Inge 8d5c0b8c19 Issue #15054: Fix incorrect tokenization of 'b' string literals.
Patch by Serhiy Storchaka.
2012-06-16 21:49:08 -05:00
Antoine Pitrou aaefac76dd Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.
Patch by Serhiy Storchaka.
2012-06-16 22:48:21 +02:00
Alexander Belopolsky 0831382d69 Issue #15006: Allow equality comparison between naive and aware time
or datetime objects.
2012-06-15 20:19:47 -04:00
Brett Cannon ea0b823940 Issue #14938: importlib.abc.SourceLoader.is_package() now takes the
module name into consideration when determining whether a module is a
package or not. This prevents importing a module's __init__ module
directly and having it considered a package, which can lead to
duplicate sub-modules.

Thanks to Ronan Lamy for reporting the bug.
2012-06-15 20:00:53 -04:00
Brett Cannon 47b3239cc6 Closes issue #14982: Document that pkgutil's walk_packages() and
iter_modules() requires iter_modules() be defined on an importer. The
importers in importlib do not define this non-standard method.
2012-06-15 19:21:07 -04:00
Antoine Pitrou 27f6a3b0bf Issue #15026: utf-16 encoding is now significantly faster (up to 10x).
Patch by Serhiy Storchaka.
2012-06-15 22:15:23 +02:00
Petri Lehtinen a717d563d0 #15036: Make a repeated changes and flushes work with single-file mailboxes 2012-06-15 21:01:56 +03:00
Petri Lehtinen 02653f1b11 #15036: Make a repeated changes and flushes work with single-file mailboxes 2012-06-15 20:59:31 +03:00
Richard Oudkerk 3730a17a58 Issue #14059: Implement multiprocessing.Barrier 2012-06-15 18:26:07 +01:00
Nick Coghlan 96f806bccb Fix typos in NEWS entry 2012-06-15 21:16:25 +10:00
Nick Coghlan 807770ec1b Issue #15061: Don't oversell the capabilities of the new non-shortcircuiting comparison function in hmac 2012-06-15 21:14:08 +10:00
Richard Oudkerk 73d9a292ae Issue #13841: Make child processes exit using sys.exit() on Windows 2012-06-14 15:30:10 +01:00
Martin v. Löwis bc07cb883e Issue #14936: curses_panel was converted to PEP 3121 and PEP 384 API.
Patch by Robin Schreiber.
2012-06-14 16:01:23 +02:00
Martin v. Löwis c838ec1f82 Issue #14936: curses_panel was converted to PEP 3121 API.
Patch by Robin Schreiber.
2012-06-14 16:00:24 +02:00
Alexander Belopolsky c142bba2a7 Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fields
in struct tm, time.struct_time objects returned by time.gmtime(),
time.localtime() and time.strptime() functions now have tm_zone and
tm_gmtoff attributes.  Original patch by Paul Boddie.
2012-06-13 22:15:26 -04:00
Victor Stinner 2b89fdf7eb PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() result
Fix also its value on Windows and Linux according to its documentation:
"adjustable" indicates if the clock *can be* adjusted, not if it is or was
adjusted.

In most cases, it is not possible to indicate if a clock is or was adjusted.
2012-06-12 22:46:37 +02:00
Richard Oudkerk f0604fddc3 Issue #3518: Remove references to non-existent BaseManager.from_address()
method
2012-06-11 17:56:08 +01:00
Richard Oudkerk 197651b4e3 Issue #10133: Make multiprocessing deallocate buffer if socket read fails.
Patch by Hallvard B Furuseth.
2012-06-11 15:12:12 +01:00
Nick Coghlan 4fae8cdaea Close #13857: Added textwrap.indent() function (initial patch by Ezra
Berch)
2012-06-11 23:07:51 +10:00
Alexander Belopolsky a4415141da Issue #2736: Added datetime.timestamp() method. 2012-06-08 12:33:09 -04:00
Terry Jan Reedy 571ee57695 Merge from 3.2, #12510 2012-06-07 20:04:17 -04:00
Terry Jan Reedy 2a2ce4f673 Issue #12510: Revise and triple # of calltip tests, with an eye to unittest
use. Make the get_entity 'method' a module function as it did not use 'self'.
Delete buggy _find_constructor function that is not needed, at least in 3.x.
Revise get_argspec so all tests pass.  Add and fix NEWS entries.
2012-06-07 19:41:04 -04:00
Richard Oudkerk 58ba47f97b Merge fixes for #13854 and #12157. 2012-06-07 20:38:11 +01:00
Alexander Belopolsky 74482201b8 Issue #11823: disassembly now shows argument counts on calls with keyword args 2012-06-07 14:28:14 -04:00
Richard Oudkerk 29471de459 Issue #13854: Properly handle non-integer, non-string arg to SystemExit
Previously multiprocessing only expected int or str.  It also wrongly
used an exit code of 1 when the argument was a string instead of zero.
2012-06-06 19:04:57 +01:00
Richard Oudkerk e41682b994 Issue #12157: pool.map() does not handle empty iterable correctly
Initial patch by mouad
2012-06-06 19:04:57 +01:00
Gregory P. Smith 902274e948 Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call. 2012-06-05 13:30:24 -07:00
Gregory P. Smith 58f07a9d6d Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call. 2012-06-05 13:26:39 -07: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 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 90ca5c2aa1 Add NEWS entry. 2012-06-04 09:51:53 -04:00
Gregory P. Smith 61ed804cd7 Move the 14992 note to the correct section. 2012-06-03 14:36:01 -07:00
Gregory P. Smith f0a9a9b502 Fixes Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
when the path existed and had the S_ISGID mode bit set when it was
not explicitly asked for.  This is no longer an exception as mkdir
cannot control if the OS sets that bit for it or not.
2012-06-03 14:35:09 -07:00
Gregory P. Smith a81c856436 Fixes Issue #14992: os.makedirs(path, exist_ok=True) would raise an OSError
when the path existed and had the S_ISGID mode bit set when it was not
explicitly asked for.  This is no longer an exception as mkdir cannot control
if the OS sets that bit for it or not.
2012-06-03 14:30:44 -07: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
Brett Cannon 2b88fcf693 Issue #14987: Add a missing import statement 2012-06-02 22:28:42 -04:00
R David Murray 07ea53cb21 #1079: Fix parsing of encoded words.
This is a behavior change: before this leading and trailing spaces were
stripped from ASCII parts, now they are preserved.  Without this fix we didn't
parse the examples in the RFC correctly, so I think breaking backward
compatibility here is justified.

Patch by Ralf Schlatterbeck.
2012-06-02 17:56:49 -04:00
Nick Coghlan 77452fc121 Close #14969: Improve the handling of exception chaining in contextlib.ExitStack 2012-06-01 22:48:32 +10:00
Brian Curtin 2e185e17ce Reformat two issue numbers 2012-06-01 00:07:28 -05:00
Georg Brandl 8e0ed333b9 Post-release update. 2012-05-31 22:41:51 +02:00
Ned Deily d3487be876 Issue #14962: merge 2012-05-31 09:58:08 -07:00
Ned Deily 8b2a56b89d Issue #14962: Update text coloring in IDLE shell window after changing
options.  Patch by Roger Serwy.
2012-05-31 09:17:29 -07:00
Nick Coghlan a5bd2a18ce Close #14963: Use an iterative algorithm in contextlib.ExitStack.__exit__ (Patch by Alon Horev) 2012-06-01 00:00:38 +10:00
Nick Coghlan c73e8c2830 Issue #14963: Added test cases for contextlib.ExitStack exception handling behaviour (Initial patch by Alon Horev) 2012-05-31 23:49:26 +10:00
Georg Brandl f0397b9953 Bump version to 3.3.0a4. 2012-05-30 22:04:31 +02:00
Victor Stinner 949d8c986e Close #14690: Use monotonic clock instead of system clock in the sched,
subprocess and trace modules.
2012-05-30 13:30:32 +02:00
Ned Deily 5e92a1ef5a Issue #14958: Change IDLE systax highlighting to recognize all string and
byte literals supported in Python 3.3.
2012-05-29 22:55:43 -07:00
Brian Curtin e8eb912722 Merge 3.2 news item 2012-05-29 18:44:17 -05:00
Brian Curtin cf4a1b7ecf Add news item for #14943 2012-05-29 18:41:30 -05:00
Ned Deily 01d63a6e06 Issue #10997: merge from 3.2 2012-05-29 10:51:38 -07:00
Ned Deily 3aee9416a0 Issue #10997: Prevent a duplicate entry in IDLE's "Recent Files" menu. 2012-05-29 10:43:36 -07:00
Victor Stinner d3f0882dfb Issue #14744: Use the new _PyUnicodeWriter internal API to speed up str%args and str.format(args)
* Formatting string, int, float and complex use the _PyUnicodeWriter API. It
   avoids a temporary buffer in most cases.
 * Add _PyUnicodeWriter_WriteStr() to restore the PyAccu optimization: just
   keep a reference to the string if the output is only composed of one string
 * Disable overallocation when formatting the last argument of str%args and
   str.format(args)
 * Overallocation allocates at least 100 characters: add min_length attribute
   to the _PyUnicodeWriter structure
 * Add new private functions: _PyUnicode_FastCopyCharacters(),
   _PyUnicode_FastFill() and _PyUnicode_FromASCII()

The speed up is around 20% in average.
2012-05-29 12:57:52 +02:00
Hynek Schlawack 52209d3a1e #14835: Make plistlib output empty arrays & dicts like OS X
Patch by Sidney San Martín.
2012-05-29 12:04:54 +02:00
Richard Oudkerk 3e0a1eb889 Issue #14930: Make memoryview objects weakrefable. 2012-05-28 21:35:09 +01:00
Antoine Pitrou 1cfe7d9a84 Issue #14775: Fix a potential quadratic dict build-up due to the garbage collector repeatedly trying to untrack dicts.
Additional comments by Tim Silk.
2012-05-28 22:23:42 +02:00
Antoine Pitrou e1ad3dac3d Issue #14775: Fix a potential quadratic dict build-up due to the garbage collector repeatedly trying to untrack dicts.
Additional comments by Tim Silk.
2012-05-28 22:22:34 +02:00
Meador Inge d102e04e4a Issue #9041: raised exception is misleading
An issue in ctypes.c_longdouble, ctypes.c_double, and ctypes.c_float that
caused an incorrect exception to be returned in the case of overflow has been
fixed.
2012-05-28 14:47:53 -05:00
Meador Inge 031e25b0f7 Issue #9041: raised exception is misleading
An issue in ctypes.c_longdouble, ctypes.c_double, and ctypes.c_float that
caused an incorrect exception to be returned in the case of overflow has been
fixed.
2012-05-28 14:21:16 -05:00
Nick Coghlan ab45e689be Merge from 3.2 2012-05-28 22:36:07 +10:00
Nick Coghlan 4b6045c30f Issue #14443: Tell rpmbuild to use the correct version of Python 2012-05-28 22:34:46 +10:00
Terry Jan Reedy c6aa93cf22 Merge 3.2 #14929 2012-05-27 23:06:14 -04:00
Terry Jan Reedy e1c5087802 Issue14929: Stop Idle 3.x from closing on Unicode decode errors when grepping.
Patch by Roger Serwy.
2012-05-27 22:56:49 -04: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
Terry Jan Reedy 48fd1fee38 Merge 3.2 closes #12510 2012-05-27 21:39:39 -04:00
Terry Jan Reedy c5301ef2df Issue12510: Attempting to get invalid tooltip no longer closes Idle.
Original patch by Roger Serwy.
2012-05-27 21:29:17 -04:00