Commit graph

21852 commits

Author SHA1 Message Date
Victor Stinner
15a1136547 Issue #16147: PyUnicode_FromFormatV() doesn't need anymore to allocate a buffer
on the heap to format numbers.
2012-10-06 23:48:20 +02:00
Victor Stinner
e215d960be Issue #16147: Rewrite PyUnicode_FromFormatV() to use _PyUnicodeWriter API
* Simplify the code: replace 4 steps with one unique step using the
   _PyUnicodeWriter API. PyUnicode_Format() has the same design. It avoids to
   store intermediate results which require to allocate an array of pointers on
   the heap.
 * Use the _PyUnicodeWriter API for speed (and its convinient API):
   overallocate the buffer to reduce the number of "realloc()"
 * Implement "width" and "precision" in Python, don't rely on sprintf(). It
   avoids to need of a temporary buffer allocated on the heap: only use a small
   buffer allocated in the stack.
 * Add _PyUnicodeWriter_WriteCstr() function
 * Split PyUnicode_FromFormatV() into two functions: add
   unicode_fromformat_arg().
 * Inline parse_format_flags(): the format of an argument is now only parsed
   once, it's no more needed to have a subfunction.
 * Optimize PyUnicode_FromFormatV() for characters between two "%" arguments:
   search the next "%" and copy the substring in one chunk, instead of copying
   character per character.
2012-10-06 23:03:36 +02:00
Andrew Svetlov
7e3cde5901 revert accidental inclusion of subprocess tests 2012-10-06 18:46:09 +03:00
Andrew Svetlov
a2028733ef revert accidental inclusion of subprocess tests 2012-10-06 18:45:47 +03:00
Andrew Svetlov
b2209ccfa0 revert accidental inclusion of subprocess tests 2012-10-06 18:45:24 +03:00
Andrew Svetlov
ac0f965fd0 Add spaces to follow PEP8. 2012-10-06 18:38:30 +03:00
Andrew Svetlov
1d0d541259 Issue #16025: Minor corrections to the zipfile documentation.
Patch by Serhiy Storchaka.
2012-10-06 18:10:52 +03:00
Andrew Svetlov
5061a34283 Issue #16025: Minor corrections to the zipfile documentation.
Patch by Serhiy Storchaka.
2012-10-06 18:10:01 +03:00
Andrew Svetlov
afbf90c993 Issue #16025: Minor corrections to the zipfile documentation.
Patch by Serhiy Storchaka.
2012-10-06 18:02:05 +03:00
Andrew Svetlov
7d14015e62 Issue #16120: Use |yield from| in stdlib.
Patch by Berker Peksag.
2012-10-06 17:11:45 +03:00
Armin Ronacher
aa9a79d279 Issue #16148: implemented PEP 424 2012-10-06 14:03:24 +02:00
Andrew Svetlov
ef08fb1f04 Issue #13896: Make shelf instances work with 'with' as context managers.
Original patch by Filip Gruszczyński.
2012-10-06 13:52:19 +03:00
Christian Heimes
4a0270d82b Issue #16113: integrade SHA-3 (Keccak) patch from http://hg.python.org/sandbox/cheimes 2012-10-06 02:23:36 +02:00
Andrew Svetlov
220e869a51 Merge issue #16115: Add test for check that executable arg to Popen() takes precedence over args[0] arg\n \n Patch by Kushal Das 2012-10-05 22:53:12 +03:00
Andrew Svetlov
1a53c0cbf5 Issue #16115: Add test for check that executable arg to Popen() takes precedence over args[0] arg\n \n Patch by Kushal Das 2012-10-05 22:52:15 +03:00
Andrew Svetlov
64478ac219 normalize whitespaces 2012-10-05 22:16:55 +03:00
Andrew Svetlov
9b1e59a2b3 Issue #16123: IDLE - deprecate running without a subprocess.
Patch by Roger Serwy
2012-10-05 22:12:44 +03:00
Jesus Cea
b451fd65de MERGE: #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch 2012-10-05 05:32:10 +02:00
Jesus Cea
cb95996fdc MERGE: #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch 2012-10-05 05:31:31 +02:00
Jesus Cea
685fffa8f4 #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Fix original patch 2012-10-05 05:21:42 +02:00
Jesus Cea
adc8211e00 #16112: platform.architecture does not correctly escape argument to /usr/bin/file. Use 'communicate()' and decode the bytes 2012-10-05 04:58:38 +02:00
Jesus Cea
f01d695ccd Closes #16135: Removal of OS/2 support 2012-10-05 03:36:11 +02:00
Jesus Cea
fa7d5392d4 Test should be skipped in 'riscos', as intented 2012-10-05 03:28:20 +02:00
Jesus Cea
4791a24268 #16135: Removal of OS/2 support (Python code partial cleanup) 2012-10-05 03:15:39 +02:00
Jesus Cea
f1af705720 #16135: Removal of OS/2 support (Remove OS2 and OS/2 references) 2012-10-05 02:48:46 +02:00
Andrew Svetlov
6964f4b790 Merge: Issue #14997: disable <F5> in idle shell window.
Thanks to Roger Serwy for patch.
2012-10-04 22:50:58 +03:00
Andrew Svetlov
eb0314f5a8 Merge: Issue #14997: disable <F5> in idle shell window.
Thanks to Roger Serwy for patch.
2012-10-04 22:50:13 +03:00
Andrew Svetlov
4ca222d4d5 Issue #14997: disable <F5> in idle shell window.
Thanks to Roger Serwy for patch.
2012-10-04 22:48:34 +03:00
Andrew Svetlov
456b2b8777 Issue #14446: Remove deprecated tkinter functions
Thanks to  Michael Driscoll
2012-10-04 22:10:09 +03:00
Andrew Svetlov
65e9c57369 Issue #15417: Add support for csh and fish in venv activation scripts. 2012-10-04 21:48:58 +03:00
Antoine Pitrou
997adb5819 Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL). 2012-10-04 19:54:53 +02:00
Antoine Pitrou
ee329318db Issue #16089: Allow ElementTree.TreeBuilder to work again with a non-Element element_factory (fixes a regression in SimpleTAL). 2012-10-04 19:53:29 +02:00
Jesus Cea
d96c1fb6ed MERGE: Closes #16126: PyErr_Format format mismatch in _testcapimodule.c 2012-10-04 16:07:03 +02:00
Jesus Cea
6e1d2b6e78 Closes #16126: PyErr_Format format mismatch in _testcapimodule.c 2012-10-04 16:06:30 +02:00
Jesus Cea
677ffd16bf MERGE: Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file 2012-10-04 13:58:22 +02:00
Jesus Cea
e8801e2e44 MERGE: Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file 2012-10-04 13:56:23 +02:00
Jesus Cea
fc990e942f Closes #16112: platform.architecture does not correctly escape argument to /usr/bin/file 2012-10-04 13:51:43 +02:00
Jesus Cea
dc469454ec Closes #15488: Closed files keep their buffer alive 2012-10-04 12:37:56 +02:00
Ezio Melotti
3ffd29b615 Remove unnecessary []. 2012-10-02 19:45:00 +03:00
Vinay Sajip
3e763dadde Updated docstring for logging.config.listen(). 2012-10-02 16:15:33 +01:00
Vinay Sajip
4ded5512d7 Issue #15452: Added verify option for logging configuration socket listener. 2012-10-02 15:56:16 +01:00
R David Murray
6e7bd65453 Merge #11109: clean up docs, add whatsnew entry, and fix Justin's last name. 2012-10-01 21:47:57 -04:00
R David Murray
258fabefde #11109: clean up docs, add whatsnew entry, and fix Justin's last name. 2012-10-01 21:43:46 -04:00
Victor Stinner
621ef3d84f Issue #15609: Optimize str%args for integer argument
- Use _PyLong_FormatWriter() instead of formatlong() when possible, to avoid
   a temporary buffer
 - Enable the fast path when width is smaller or equals to the length,
   and when the precision is bigger or equals to the length
 - Add unit tests!
 - formatlong() uses PyUnicode_Resize() instead of _PyUnicode_FromASCII()
   to resize the output string
2012-10-02 00:33:47 +02:00
Philip Jenvey
fd0d3e5d25 more yield from
patch by Serhiy Storchaka
2012-10-01 15:34:31 -07:00
Stefan Krah
ca1232f7db Merge 3.3. 2012-10-01 23:30:32 +02:00
Stefan Krah
219c7b90d0 Issue #15599: Increase the switch interval. Several systems cannot handle
gil_interval == 1 in extreme situations.
2012-10-01 23:21:45 +02:00
Nadeem Vawda
40ee157458 Merge: #16304: Optimizations for BZ2File, and minor bugfix. 2012-10-01 23:11:35 +02:00
Nadeem Vawda
eb70be2b46 Issue #16304: Further optimize BZ2File.readlines?(). 2012-10-01 23:05:32 +02:00
Nadeem Vawda
138ad5066d Fix error handling in new fast path of BZ2File.readline(). 2012-10-01 23:04:11 +02:00