Commit graph

79595 commits

Author SHA1 Message Date
Barry Warsaw
99c56e8f58 Remove unused import 2013-04-16 11:19:11 -04:00
Barry Warsaw
20c08c8041 Remove unused import. 2013-04-16 11:18:53 -04:00
Barry Warsaw
ecaefcf44e - Issue #17012: shutil.which() no longer fallbacks to the PATH environment
variable if empty path argument is specified.  Patch by Serhiy Storchaka.
2013-04-16 11:18:18 -04:00
Barry Warsaw
618738b921 - Issue #17012: shutil.which() no longer fallbacks to the PATH environment
variable if empty path argument is specified.  Patch by Serhiy Storchaka.
2013-04-16 11:05:03 -04:00
Alexandre Vassalotti
7c5e094cbf 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.
2013-04-15 23:14:55 -07:00
Benjamin Peterson
48a2e7c357 merge 3.3 2013-04-15 21:38:33 -04:00
Benjamin Peterson
51ce29c530 remove pointless code (closes #17738) 2013-04-15 21:38:25 -04:00
Antoine Pitrou
af94051a93 Issue #17710: Fix pickle raising a SystemError on bogus input. 2013-04-15 21:55:14 +02:00
Antoine Pitrou
3034efdd29 Issue #17710: Fix pickle raising a SystemError on bogus input. 2013-04-15 21:51:09 +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
Nick Coghlan
d25e7de4a1 Merge fix for #17731 from 3.3 2013-04-15 22:57:57 +10:00
Nick Coghlan
f1465f0535 Close #17731: Clean up properly in test_import 2013-04-15 22:56:51 +10:00
Vinay Sajip
66940a11f8 Issue #17713: Added failure diagnostics to test. 2013-04-15 11:59:35 +01:00
Victor Stinner
77282cb4f8 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)
2013-04-14 19:22:47 +02:00
Victor Stinner
d92e078c8d Minor change: fix character in do_strip() for the ASCII case 2013-04-14 19:17:42 +02:00
Victor Stinner
f033510fee 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())
2013-04-14 19:13:03 +02:00
R David Murray
26dfaac9ac #17341: Include name in re error message about invalid group name.
Patch by Jason Michalski.
2013-04-14 13:00:54 -04:00
Victor Stinner
4560f9c63f PyUnicode_Join(): move use_memcpy test out of the loop to cleanup and optimize the code 2013-04-14 18:56:46 +02:00
Victor Stinner
55c08781e8 Optimize repr(str): use _PyUnicode_FastCopyCharacters() when no character is escaped 2013-04-14 18:45:39 +02:00
Victor Stinner
af03757d20 Optimize ascii(str): don't encode/decode repr if repr is already ASCII 2013-04-14 18:44:10 +02:00
Victor Stinner
322cc7438c Issue #17693: Fix memory/reference leaks 2013-04-14 18:11:41 +02:00
R David Murray
bf71f7d654 Merge #17341: Include name in re error message about invalid group name.
Patch by Jason Michalski.
2013-04-14 13:03:14 -04:00
Brett Cannon
255fb3e9f3 add a newline 2013-04-14 12:51:36 -04:00
Brett Cannon
9c367c2afe merge 2013-04-14 12:50:51 -04:00
Brett Cannon
edfd6ae79c 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.
2013-04-14 12:48:15 -04:00
Serhiy Storchaka
4e762ee802 Issue #17221: Resort Misc/NEWS. 2013-04-14 18:57:24 +03:00
Serhiy Storchaka
f2fa5fc794 Issue #17221: Resort Misc/NEWS. 2013-04-14 18:53:39 +03:00
Victor Stinner
672559fc4f (Merge 3.3) Issue #17702: use assertRaises() for the unit test 2013-04-14 16:43:38 +02:00
Victor Stinner
839e5eafcb Issue #17702: use assertRaises() for the unit test 2013-04-14 16:43:03 +02:00
Victor Stinner
43aa0d07e2 (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).
2013-04-14 16:38:35 +02:00
Victor Stinner
6d10139d70 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).
2013-04-14 16:35:04 +02:00
Victor Stinner
76b3b2726c stringlib: remove unused STRINGLIB_RESIZE macro 2013-04-14 16:29:09 +02:00
Nick Coghlan
685bd4a37a Merge fix for #16163 from 3.3 2013-04-14 23:01:11 +10:00
Nick Coghlan
c4e0d982f3 Close issue #16163: handle submodules in pkgutil.iter_importers 2013-04-14 22:30:42 +10:00
Vinay Sajip
8b4c7198db Issue #17713: additional tweak to test. 2013-04-14 12:25:25 +01:00
Vinay Sajip
d86ac96fcf Closes #17713: Fixed bug in test_compute_rollover_weekly_attime. 2013-04-14 12:20:46 +01:00
R David Murray
8a34596bbe #2118: IOError is deprecated, use OSError. 2013-04-14 06:46:35 -04:00
Alexandre Vassalotti
96d6a78ce0 Merge 3.3 2013-04-14 03:44:47 -07:00
Serhiy Storchaka
a3e32c92cf Closes #16551. Cleanup pickle.py. 2013-04-14 13:37:02 +03:00
Alexandre Vassalotti
8157459d6b Merge heads. 2013-04-14 03:31:40 -07:00
Alexandre Vassalotti
8db89ca56c Issue #16550: Update the opcode descriptions of pickletools to use unsigned
integers where appropriate.  Initial patch by Serhiy Storchaka.
2013-04-14 03:30:35 -07: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