]> granicus.if.org Git - python/log
python
11 years agoPartial revert of changeset 9744b2df134c
Victor Stinner [Thu, 18 Apr 2013 07:41:34 +0000 (09:41 +0200)]
Partial revert of changeset 9744b2df134c

PyUnicode_Append() cannot call directly resize_compact(): I forgot that a
string can be ready *and* not compact (a legacy string can also be ready).

11 years agoSplit PyUnicode_DecodeCharmap() into subfunction for readability
Victor Stinner [Wed, 17 Apr 2013 23:44:27 +0000 (01:44 +0200)]
Split PyUnicode_DecodeCharmap() into subfunction for readability

11 years ago#17135: mark imp as deprecated as of 3.4.
R David Murray [Wed, 17 Apr 2013 22:50:12 +0000 (18:50 -0400)]
#17135: mark imp as deprecated as of 3.4.

11 years agoFix bug in Unicode decoders related to _PyUnicodeWriter
Victor Stinner [Wed, 17 Apr 2013 22:25:28 +0000 (00:25 +0200)]
Fix bug in Unicode decoders related to _PyUnicodeWriter

Bug introduced by changesets 7ed9993d53b4 and edf029fc9591.

11 years agoFix typo in unicode_decode_call_errorhandler_writer()
Victor Stinner [Wed, 17 Apr 2013 21:58:16 +0000 (23:58 +0200)]
Fix typo in unicode_decode_call_errorhandler_writer()

Bug introduced by changeset 7ed9993d53b4.

11 years agoClose #17694: Add minimum length to _PyUnicodeWriter
Victor Stinner [Wed, 17 Apr 2013 21:02:17 +0000 (23:02 +0200)]
Close #17694: Add minimum length to _PyUnicodeWriter

 * Add also min_char attribute to _PyUnicodeWriter structure (currently unused)
 * _PyUnicodeWriter_Init() has no more argument (except the writer itself):
   min_length and overallocate must be set explicitly
 * In error handlers, only enable overallocation if the replacement string
   is longer than 1 character
 * CJK decoders don't use overallocation anymore
 * Set min_length, instead of preallocating memory using
   _PyUnicodeWriter_Prepare(), in many decoders
 * _PyUnicode_DecodeUnicodeInternal() checks for integer overflow

11 years agoMerge.
Richard Oudkerk [Wed, 17 Apr 2013 20:27:17 +0000 (21:27 +0100)]
Merge.

11 years agoMerge.
Richard Oudkerk [Wed, 17 Apr 2013 20:24:58 +0000 (21:24 +0100)]
Merge.

11 years agoMerge.
Richard Oudkerk [Wed, 17 Apr 2013 20:16:52 +0000 (21:16 +0100)]
Merge.

11 years agoIssue #17555: Fix ForkAwareThreadLock so that size of after fork
Richard Oudkerk [Wed, 17 Apr 2013 20:09:38 +0000 (21:09 +0100)]
Issue #17555: Fix ForkAwareThreadLock so that size of after fork
registry does not grow exponentially with generation of process.

11 years agoIssue #17782: Fix undefined behaviour on platforms where ``struct timespec``'s "tv_ns...
Antoine Pitrou [Wed, 17 Apr 2013 20:07:51 +0000 (22:07 +0200)]
Issue #17782: Fix undefined behaviour on platforms where ``struct timespec``'s "tv_nsec" member is not a C long.

11 years ago- Issue #17782: Fix undefined behaviour on platforms where ``struct timespec``'s...
Antoine Pitrou [Wed, 17 Apr 2013 20:06:44 +0000 (22:06 +0200)]
- Issue #17782: Fix undefined behaviour on platforms where ``struct timespec``'s "tv_nsec" member is not a C long.

11 years agoIssue #17555: Fix ForkAwareThreadLock so that size of after fork
Richard Oudkerk [Wed, 17 Apr 2013 19:58:00 +0000 (20:58 +0100)]
Issue #17555: Fix ForkAwareThreadLock so that size of after fork
registry does not grow exponentially with generation of process.

11 years agomerge 3.3
Benjamin Peterson [Wed, 17 Apr 2013 14:24:58 +0000 (10:24 -0400)]
merge 3.3

11 years agoFix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts.
Giampaolo Rodola' [Wed, 17 Apr 2013 11:12:27 +0000 (13:12 +0200)]
Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts.

11 years agoFix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts.
Giampaolo Rodola' [Wed, 17 Apr 2013 11:08:59 +0000 (13:08 +0200)]
Fix issue #17707: multiprocessing.Queue's get() method does not block for short timeouts.

11 years ago#14735: merge with 3.3.
Roger Serwy [Wed, 17 Apr 2013 05:27:31 +0000 (00:27 -0500)]
#14735: merge with 3.3.

11 years ago#14735: Update IDLE docs to omit "Control-z on Windows".
Roger Serwy [Wed, 17 Apr 2013 05:22:50 +0000 (00:22 -0500)]
#14735: Update IDLE docs to omit "Control-z on Windows".

11 years ago#17771: merge with 3.3.
Ezio Melotti [Wed, 17 Apr 2013 04:34:31 +0000 (07:34 +0300)]
#17771: merge with 3.3.

11 years ago#17771: fix typo. Patch by Andriy Mysyk.
Ezio Melotti [Wed, 17 Apr 2013 04:34:13 +0000 (07:34 +0300)]
#17771: fix typo.  Patch by Andriy Mysyk.

11 years ago#17766: merge with 3.3.
Ezio Melotti [Wed, 17 Apr 2013 01:36:45 +0000 (04:36 +0300)]
#17766: merge with 3.3.

11 years ago#17766: test_iterlen now works with unittest test discovery. Patch by Zachary Ware.
Ezio Melotti [Wed, 17 Apr 2013 01:34:05 +0000 (04:34 +0300)]
#17766: test_iterlen now works with unittest test discovery.  Patch by Zachary Ware.

11 years ago#17740: merge with 3.3.
Ezio Melotti [Wed, 17 Apr 2013 01:10:51 +0000 (04:10 +0300)]
#17740: merge with 3.3.

11 years ago#17740: fix links to the socket function. Initial patch by Zachary Ware.
Ezio Melotti [Wed, 17 Apr 2013 01:10:26 +0000 (04:10 +0300)]
#17740: fix links to the socket function.  Initial patch by Zachary Ware.

11 years agoIssue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for...
Antoine Pitrou [Tue, 16 Apr 2013 18:28:15 +0000 (20:28 +0200)]
Issue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for server sockets.
Thanks to David D Lowe for reporting.

11 years agoIssue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for...
Antoine Pitrou [Tue, 16 Apr 2013 18:27:17 +0000 (20:27 +0200)]
Issue #17739: fix the description of SSLSocket.getpeercert(binary_form=True) for server sockets.
Thanks to David D Lowe for reporting.

11 years agoRemove unused import
Barry Warsaw [Tue, 16 Apr 2013 15:19:11 +0000 (11:19 -0400)]
Remove unused import

11 years agoRemove unused import.
Barry Warsaw [Tue, 16 Apr 2013 15:18:53 +0000 (11:18 -0400)]
Remove unused import.

11 years ago- Issue #17012: shutil.which() no longer fallbacks to the PATH environment
Barry Warsaw [Tue, 16 Apr 2013 15:18:18 +0000 (11:18 -0400)]
- Issue #17012: shutil.which() no longer fallbacks to the PATH environment
  variable if empty path argument is specified.  Patch by Serhiy Storchaka.

11 years ago- Issue #17012: shutil.which() no longer fallbacks to the PATH environment
Barry Warsaw [Tue, 16 Apr 2013 15:05:03 +0000 (11:05 -0400)]
- Issue #17012: shutil.which() no longer fallbacks to the PATH environment
  variable if empty path argument is specified.  Patch by Serhiy Storchaka.

11 years agoMake C and Python implementations of pickle load STRING opcodes the same way.
Alexandre Vassalotti [Tue, 16 Apr 2013 06:14:55 +0000 (23:14 -0700)]
Make C and Python implementations of pickle load STRING opcodes the same way.

The C version tried to remove trailing whitespace between the last quote and
the newline character. I am not sure why it had this because pickle never
generated such pickles---for this to happen repr(some_string) would need to
return trailing whitespace. It was maybe there to make it easier for people
to write pickles in text editors. Anyhow, the Python version doesn't do this
so there is no point keeping this around anymore.

Also, I've changed the exception raised when a bad pickle is encountered.
Again this unlikely to make much difference to anyone though it does make
testing slightly nicer for us.

11 years agomerge 3.3
Benjamin Peterson [Tue, 16 Apr 2013 01:38:33 +0000 (21:38 -0400)]
merge 3.3

11 years agoremove pointless code (closes #17738)
Benjamin Peterson [Tue, 16 Apr 2013 01:38:25 +0000 (21:38 -0400)]
remove pointless code (closes #17738)

11 years agoIssue #17710: Fix pickle raising a SystemError on bogus input.
Antoine Pitrou [Mon, 15 Apr 2013 19:55:14 +0000 (21:55 +0200)]
Issue #17710: Fix pickle raising a SystemError on bogus input.

11 years agoIssue #17710: Fix pickle raising a SystemError on bogus input.
Antoine Pitrou [Mon, 15 Apr 2013 19:51:09 +0000 (21:51 +0200)]
Issue #17710: Fix pickle raising a SystemError on bogus input.

11 years ago#13510: merge with 3.3.
Ezio Melotti [Mon, 15 Apr 2013 16:09:29 +0000 (19:09 +0300)]
#13510: merge with 3.3.

11 years ago#13510: clarify that f.readlines() is note necessary to iterate over a file. Patch...
Ezio Melotti [Mon, 15 Apr 2013 16:08:31 +0000 (19:08 +0300)]
#13510: clarify that f.readlines() is note necessary to iterate over a file.  Patch by Dan Riti.

11 years agoIssue #17728: Merge with 3.3.
Eric V. Smith [Mon, 15 Apr 2013 13:53:49 +0000 (09:53 -0400)]
Issue #17728: Merge with 3.3.

11 years agoIssue #17728: Specify default precision for float.format for presentation types e...
Eric V. Smith [Mon, 15 Apr 2013 13:51:54 +0000 (09:51 -0400)]
Issue #17728: Specify default precision for float.format for presentation types e, f, and g.

11 years agoMerge fix for #17731 from 3.3
Nick Coghlan [Mon, 15 Apr 2013 12:57:57 +0000 (22:57 +1000)]
Merge fix for #17731 from 3.3

11 years agoClose #17731: Clean up properly in test_import
Nick Coghlan [Mon, 15 Apr 2013 12:56:51 +0000 (22:56 +1000)]
Close #17731: Clean up properly in test_import

11 years agoIssue #17713: Added failure diagnostics to test.
Vinay Sajip [Mon, 15 Apr 2013 10:59:35 +0000 (11:59 +0100)]
Issue #17713: Added failure diagnostics to test.

11 years agoCleanup PyUnicode_Contains()
Victor Stinner [Sun, 14 Apr 2013 17:22:47 +0000 (19:22 +0200)]
Cleanup PyUnicode_Contains()

 * No need to double-check that strings are ready: test already done by
   PyUnicode_FromObject()
 * Remove useless kind variable (use kind1 instead)

11 years agoMinor change: fix character in do_strip() for the ASCII case
Victor Stinner [Sun, 14 Apr 2013 17:17:42 +0000 (19:17 +0200)]
Minor change: fix character in do_strip() for the ASCII case

11 years agoCleanup PyUnicode_Append()
Victor Stinner [Sun, 14 Apr 2013 17:13:03 +0000 (19:13 +0200)]
Cleanup PyUnicode_Append()

 * Check also that right is a Unicode object
 * call directly resize_compact() instead of unicode_resize() for a more
   explicit error handling, and to avoid testing some properties twice
   (ex: unicode_modifiable())

11 years ago#17341: Include name in re error message about invalid group name.
R David Murray [Sun, 14 Apr 2013 17:00:54 +0000 (13:00 -0400)]
#17341: Include name in re error message about invalid group name.

Patch by Jason Michalski.

11 years agoPyUnicode_Join(): move use_memcpy test out of the loop to cleanup and optimize the...
Victor Stinner [Sun, 14 Apr 2013 16:56:46 +0000 (18:56 +0200)]
PyUnicode_Join(): move use_memcpy test out of the loop to cleanup and optimize the code

11 years agoOptimize repr(str): use _PyUnicode_FastCopyCharacters() when no character is escaped
Victor Stinner [Sun, 14 Apr 2013 16:45:39 +0000 (18:45 +0200)]
Optimize repr(str): use _PyUnicode_FastCopyCharacters() when no character is escaped

11 years agoOptimize ascii(str): don't encode/decode repr if repr is already ASCII
Victor Stinner [Sun, 14 Apr 2013 16:44:10 +0000 (18:44 +0200)]
Optimize ascii(str): don't encode/decode repr if repr is already ASCII

11 years agoIssue #17693: Fix memory/reference leaks
Victor Stinner [Sun, 14 Apr 2013 16:11:41 +0000 (18:11 +0200)]
Issue #17693: Fix memory/reference leaks

11 years agoMerge #17341: Include name in re error message about invalid group name.
R David Murray [Sun, 14 Apr 2013 17:03:14 +0000 (13:03 -0400)]
Merge #17341: Include name in re error message about invalid group name.

Patch by Jason Michalski.

11 years agoadd a newline
Brett Cannon [Sun, 14 Apr 2013 16:51:36 +0000 (12:51 -0400)]
add a newline

11 years agomerge
Brett Cannon [Sun, 14 Apr 2013 16:50:51 +0000 (12:50 -0400)]
merge

11 years agoIssue #17244: Don't mask exceptions raised during the creation of
Brett Cannon [Sun, 14 Apr 2013 16:48:15 +0000 (12:48 -0400)]
Issue #17244: Don't mask exceptions raised during the creation of
bytecode files in py_compile.

Thanks to Arfrever Frehtes Taifersar Arahesis for the bug report.

11 years agoIssue #17221: Resort Misc/NEWS.
Serhiy Storchaka [Sun, 14 Apr 2013 15:57:24 +0000 (18:57 +0300)]
Issue #17221: Resort Misc/NEWS.

11 years agoIssue #17221: Resort Misc/NEWS.
Serhiy Storchaka [Sun, 14 Apr 2013 15:53:39 +0000 (18:53 +0300)]
Issue #17221: Resort Misc/NEWS.

11 years ago(Merge 3.3) Issue #17702: use assertRaises() for the unit test
Victor Stinner [Sun, 14 Apr 2013 14:43:38 +0000 (16:43 +0200)]
(Merge 3.3) Issue #17702: use assertRaises() for the unit test

11 years agoIssue #17702: use assertRaises() for the unit test
Victor Stinner [Sun, 14 Apr 2013 14:43:03 +0000 (16:43 +0200)]
Issue #17702: use assertRaises() for the unit test

11 years ago(Merge 3.3) Close #17702: os.environ now raises KeyError with the original
Victor Stinner [Sun, 14 Apr 2013 14:38:35 +0000 (16:38 +0200)]
(Merge 3.3) Close #17702: os.environ now raises KeyError with the original
environment variable name (str on UNIX), instead of using the encoded name
(bytes on UNIX).

11 years agoClose #17702: os.environ now raises KeyError with the original environment
Victor Stinner [Sun, 14 Apr 2013 14:35:04 +0000 (16:35 +0200)]
Close #17702: os.environ now raises KeyError with the original environment
variable name (str on UNIX), instead of using the encoded name (bytes on UNIX).

11 years agostringlib: remove unused STRINGLIB_RESIZE macro
Victor Stinner [Sun, 14 Apr 2013 14:29:09 +0000 (16:29 +0200)]
stringlib: remove unused STRINGLIB_RESIZE macro

11 years agoMerge fix for #16163 from 3.3
Nick Coghlan [Sun, 14 Apr 2013 13:01:11 +0000 (23:01 +1000)]
Merge fix for #16163 from 3.3

11 years agoClose issue #16163: handle submodules in pkgutil.iter_importers
Nick Coghlan [Sun, 14 Apr 2013 12:30:42 +0000 (22:30 +1000)]
Close issue #16163: handle submodules in pkgutil.iter_importers

11 years agoIssue #17713: additional tweak to test.
Vinay Sajip [Sun, 14 Apr 2013 11:25:25 +0000 (12:25 +0100)]
Issue #17713: additional tweak to test.

11 years agoCloses #17713: Fixed bug in test_compute_rollover_weekly_attime.
Vinay Sajip [Sun, 14 Apr 2013 11:20:46 +0000 (12:20 +0100)]
Closes #17713: Fixed bug in test_compute_rollover_weekly_attime.

11 years ago#2118: IOError is deprecated, use OSError.
R David Murray [Sun, 14 Apr 2013 10:46:35 +0000 (06:46 -0400)]
#2118: IOError is deprecated, use OSError.

11 years agoMerge 3.3
Alexandre Vassalotti [Sun, 14 Apr 2013 10:44:47 +0000 (03:44 -0700)]
Merge 3.3

11 years agoCloses #16551. Cleanup pickle.py.
Serhiy Storchaka [Sun, 14 Apr 2013 10:37:02 +0000 (13:37 +0300)]
Closes #16551. Cleanup pickle.py.

11 years agoMerge heads.
Alexandre Vassalotti [Sun, 14 Apr 2013 10:31:40 +0000 (03:31 -0700)]
Merge heads.

11 years agoIssue #16550: Update the opcode descriptions of pickletools to use unsigned
Alexandre Vassalotti [Sun, 14 Apr 2013 10:30:35 +0000 (03:30 -0700)]
Issue #16550: Update the opcode descriptions of pickletools to use unsigned
integers where appropriate.  Initial patch by Serhiy Storchaka.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 10:03:01 +0000 (12:03 +0200)]
merge with 3.3

11 years agoFix example ignoring ".svn" directories in compileall.
Georg Brandl [Sun, 14 Apr 2013 10:02:43 +0000 (12:02 +0200)]
Fix example ignoring ".svn" directories in compileall.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 09:59:19 +0000 (11:59 +0200)]
merge with 3.3

11 years agoThe Integral class does not contain implementations for the bit-shifting operations...
Georg Brandl [Sun, 14 Apr 2013 09:58:54 +0000 (11:58 +0200)]
The Integral class does not contain implementations for the bit-shifting operations. (See #3056.)

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 09:55:44 +0000 (11:55 +0200)]
merge with 3.3

11 years agoClarify that the function *definition* creates the function and the binding in the...
Georg Brandl [Sun, 14 Apr 2013 09:47:46 +0000 (11:47 +0200)]
Clarify that the function *definition* creates the function and the binding in the module globals.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 09:40:27 +0000 (11:40 +0200)]
merge with 3.3

11 years agoCloses #14462: allow any valid Python identifier in sre group names, as documented.
Georg Brandl [Sun, 14 Apr 2013 09:40:00 +0000 (11:40 +0200)]
Closes #14462: allow any valid Python identifier in sre group names, as documented.

11 years agoStyle cleanups for pickle.py and _pickle.
Alexandre Vassalotti [Sun, 14 Apr 2013 09:25:10 +0000 (02:25 -0700)]
Style cleanups for pickle.py and _pickle.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 09:16:46 +0000 (11:16 +0200)]
merge with 3.3

11 years agoCloses #13638: document PyErr_SetFromErrnoWithFilenameObject,
Georg Brandl [Sun, 14 Apr 2013 09:12:16 +0000 (11:12 +0200)]
Closes #13638: document PyErr_SetFromErrnoWithFilenameObject,
PyErr_SetFromWindowsErrWithFilenameObject, and
PyErr_SetExcFromWindowsErrWithFilenameObject.

Note that PyErr_SetExcFromWindowsErrWithFilenameObjectAndSomeOtherParametersSoThatTheNameGetsSoLongThatNobodyIsEverGonnaUseThisStrangeFunctionForAnything is still undocumented.

11 years agoMerge 3.3
Alexandre Vassalotti [Sun, 14 Apr 2013 09:11:16 +0000 (02:11 -0700)]
Merge 3.3

11 years agoMerge heads.
Alexandre Vassalotti [Sun, 14 Apr 2013 09:10:14 +0000 (02:10 -0700)]
Merge heads.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 08:59:17 +0000 (10:59 +0200)]
merge with 3.3

11 years agobind('') does not do the same as bind('localhost')
Georg Brandl [Sun, 14 Apr 2013 08:59:04 +0000 (10:59 +0200)]
bind('') does not do the same as bind('localhost')

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 08:50:13 +0000 (10:50 +0200)]
merge with 3.3

11 years agoUpdate code examples using collections.abc classes.
Georg Brandl [Sun, 14 Apr 2013 08:50:05 +0000 (10:50 +0200)]
Update code examples using collections.abc classes.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 08:31:24 +0000 (10:31 +0200)]
merge with 3.3

11 years agoCloses #17726: small clarification in design FAQ.
Georg Brandl [Sun, 14 Apr 2013 08:31:06 +0000 (10:31 +0200)]
Closes #17726: small clarification in design FAQ.

11 years agoClean up error messages raised by save_reduce in _pickle.
Alexandre Vassalotti [Sun, 14 Apr 2013 08:28:01 +0000 (01:28 -0700)]
Clean up error messages raised by save_reduce in _pickle.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 08:19:31 +0000 (10:19 +0200)]
merge with 3.3

11 years agoUpdate using/mac documentation which was still on 2.5.
Georg Brandl [Sun, 14 Apr 2013 08:17:35 +0000 (10:17 +0200)]
Update using/mac documentation which was still on 2.5.

11 years agomerge with 3.3
Georg Brandl [Sun, 14 Apr 2013 08:13:50 +0000 (10:13 +0200)]
merge with 3.3

11 years agoClarify point in name mangling doc.
Georg Brandl [Sun, 14 Apr 2013 08:13:42 +0000 (10:13 +0200)]
Clarify point in name mangling doc.

11 years agoMerge 3.3
Alexandre Vassalotti [Sun, 14 Apr 2013 07:58:28 +0000 (00:58 -0700)]
Merge 3.3

11 years agoFix pickling test in test_memoryio.
Alexandre Vassalotti [Sun, 14 Apr 2013 07:56:39 +0000 (00:56 -0700)]
Fix pickling test in test_memoryio.

The test was closing the orginal object instead the copy. This didn't result
in visible failures because the loop range was incorrect as well.

11 years agoMerge heads.
Meador Inge [Sun, 14 Apr 2013 01:59:03 +0000 (20:59 -0500)]
Merge heads.

11 years agoIssue #16804: Fix 'python -S -m site' failure.
Meador Inge [Sun, 14 Apr 2013 01:51:04 +0000 (20:51 -0500)]
Issue #16804: Fix 'python -S -m site' failure.

This commit fixes a bug in the 'site' module that was causing an exception
to incorrectly be thrown when running 'python -S -m site'.  The problem was
that 'USER_BASE' and 'USER_SITE' were being accessed before they were properly
initialized.  The code has been changed to use 'getuserbase' and
'getusersitepackages' instead so that the initialization always happens.

11 years agoIssue #16804: Fix 'python -S -m site' failure.
Meador Inge [Sun, 14 Apr 2013 01:29:49 +0000 (20:29 -0500)]
Issue #16804: Fix 'python -S -m site' failure.

This commit fixes a bug in the 'site' module that was causing an exception
to incorrectly be thrown when running 'python -S -m site'.  The problem was
that 'USER_BASE' and 'USER_SITE' were being accessed before they were properly
initialized.  The code has been changed to use 'getuserbase' and
'getusersitepackages' instead so that the initialization always happens.

11 years agoAdd _PyUnicodeWriter_WriteCharInline()
Victor Stinner [Sun, 14 Apr 2013 00:35:33 +0000 (02:35 +0200)]
Add _PyUnicodeWriter_WriteCharInline()