Commit Graph

3717 Commits

Author SHA1 Message Date
Victor Stinner 1dfd380306 Issue #11377: Deprecate platform.popen() and reimplement it with os.popen(). 2011-03-03 12:54:07 +00:00
Victor Stinner 7b3b20ad29 Issue #8513: On UNIX, subprocess supports bytes command string. 2011-03-03 12:54:05 +00:00
Daniel Stutzbach 8eda5f7cd9 #11335: Fix memory leak when a sort key function throws an exception 2011-03-02 23:37:50 +00:00
Victor Stinner a5c68c3cb7 Issue #8923: cache str.encode() result
When a string is encoded to UTF-8 in strict mode, the result is cached into the
object. Examples: str.encode(), str.encode('utf-8'), PyUnicode_AsUTF8String()
and PyUnicode_AsEncodedString(unicode, "utf-8", NULL).
2011-03-02 01:03:14 +00:00
Victor Stinner 6d970f4713 Issue #10831: PyUnicode_FromFormat() supports %li, %lli and %zi formats 2011-03-02 00:04:25 +00:00
Victor Stinner 968654515f Issue #10829: Refactor PyUnicode_FromFormat()
* Use the same function to parse the format string in the 3 steps
 * Fix crashs on invalid format strings
2011-03-01 23:44:09 +00:00
Victor Stinner 096f1a85f0 Issue #10911: Add tests on CGI with non-ASCII characters
Patch written by Pierre Quentel
2011-03-01 23:08:36 +00:00
Antoine Pitrou 819c40ff35 Followup to issue #11140 and r88682: also patch _dummy_thread.
Patch by Aymeric Augustin.
2011-03-01 23:05:42 +00:00
Victor Stinner 2512a8b62e Issue #11246: Fix PyUnicode_FromFormat("%V")
Decode the byte string from UTF-8 (with replace error handler) instead of
ISO-8859-1 (in strict mode). Patch written by Ray Allen.
2011-03-01 22:46:52 +00:00
Antoine Pitrou 061cfb5258 Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall. 2011-02-28 22:25:22 +00:00
Antoine Pitrou 8d0f257211 Add credit for r88682. 2011-02-28 22:06:48 +00:00
Antoine Pitrou fcf81fd031 Issue #11140: Lock.release() now raises a RuntimeError when attempting
to release an unacquired lock, as claimed in the threading documentation.
The _thread.error exception is now an alias of RuntimeError.
2011-02-28 22:03:34 +00:00
Giampaolo Rodolà 396ff06051 Fix issue 8594: adds a source_address parameter to ftplib module. 2011-02-28 19:19:51 +00:00
Antoine Pitrou e93bf7aed2 Issue #11326: Add the missing connect_ex() implementation for SSL sockets,
and make it work for non-blocking connects.
2011-02-26 23:24:06 +00:00
Antoine Pitrou d20a5f6161 Issue #9931: Fix hangs in GUI tests under Windows in certain conditions.
Patch by Hirokazu Yamamoto.
2011-02-26 15:58:05 +00:00
Antoine Pitrou 09c530dfc8 Revert r88639 (the optimization changes behaviour and breaks buildbots) 2011-02-26 09:37:45 +00:00
Antoine Pitrou ffa1a77c67 Issue #11258: Speed up ctypes.util.find_library() under Linux a lot. Patch
by Jonas H.
2011-02-26 08:45:20 +00:00
Raymond Hettinger 9fe1ccfb5a Issue #11297: Add collections.ChainMap() 2011-02-26 01:02:51 +00:00
Antoine Pitrou 8250e23abd Issue #10755: Add the posix.fdlistdir() function. Patch by Ross Lagerwall. 2011-02-25 23:41:16 +00:00
Antoine Pitrou f65132de3d Issue #4761: Add the *at() family of functions (openat(), etc.) to the posix
module.  Patch by Ross Lagerwall.
2011-02-25 23:25:17 +00:00
Antoine Pitrou 68e5c044e8 Issue #7322: Trying to read from a socket's file-like object after a timeout
occurred now raises an error instead of silently losing data.
Patch by Ross Lagerwall.
2011-02-25 23:07:44 +00:00
Giampaolo Rodolà 95bcb93041 Issue 11291: poplib suppresses errors on QUIT. 2011-02-25 22:28:24 +00:00
Giampaolo Rodolà 103a6d6cd6 Issue 11177: asyncore's create_socket() arguments can now be omitted. 2011-02-25 22:21:22 +00:00
Antoine Pitrou 0bd4deba38 Issue #6064: Add a `daemon` keyword argument to the threading.Thread
and multiprocessing.Process constructors in order to override the
default behaviour of inheriting the daemonic property from the current
thread/process.
2011-02-25 22:07:43 +00:00
Antoine Pitrou 707ce82cab Issue #10956: Buffered I/O classes retry reading or writing after a signal
has arrived and the handler returned successfully.
2011-02-25 21:24:11 +00:00
Giampaolo Rodolà 7e1b9af044 Update Misc/NEWS to include os.getpriority() and os.setpriority() addition. 2011-02-25 21:00:10 +00:00
Antoine Pitrou 211b81dd09 Issue #11114: Fix catastrophic performance of tell() on text files (up
to 1000x faster in some cases).  It is still one to two order of magnitudes
slower than binary tell().
2011-02-25 20:27:33 +00:00
Giampaolo Rodolà c9c2c8b034 Issue 10882: add os.sendfile(). (patch provided by Ross Lagerwall) 2011-02-25 14:39:16 +00:00
Eli Bendersky cbbaa96036 Issue #10516: adding list.clear() and list.copy() methods 2011-02-25 05:47:53 +00:00
Antoine Pitrou 5bffa79c22 Issue #11286: Raise a ValueError from calling PyMemoryView_FromBuffer with
a buffer struct having a NULL data pointer.
2011-02-24 20:50:49 +00:00
Éric Araujo 6c3787cb70 Allow usage of SomeABC.register as a class decorator. Patch by Edoardo Spadolini (#10868). 2011-02-24 18:03:10 +00:00
Victor Stinner c0f1a1afae Issue #11272: Fix input() and sys.stdin for Windows newline
On Windows, input() strips '\r' (and not only '\n'), and sys.stdin uses
universal newline (replace '\r\n' by '\n').
2011-02-23 12:07:37 +00:00
Lars Gustäbel dd071045e7 Issue #11224: Improved sparse file read support (r85916) introduced a
regression in _FileInFile which is used in file-like objects returned
by TarFile.extractfile(). The inefficient design of the
_FileInFile.read() method causes various dramatic side-effects and
errors:

  - The data segment of a file member is read completely into memory
    every(!) time a small block is accessed. This is not only slow
    but may cause unexpected MemoryErrors with very large files.
  - Reading members from compressed tar archives is even slower
    because of the excessive backwards seeking which is done when the
    same data segment is read over and over again.
  - As a backwards seek on a TarFile opened in stream mode is not
    possible, using extractfile() fails with a StreamError.
2011-02-23 11:42:22 +00:00
Sean Reifscheider e2dfefbe85 Issue #10924: Adding salt and Modular Crypt Format to crypt library. 2011-02-22 10:55:44 +00:00
Brett Cannon f3042782af Issue #11074: Make 'tokenize' so it can be reloaded.
The module stored away the 'open' object as found in the global namespace
(which fell through to the built-in namespace) since it defined its own 'open'.
Problem is that if you reloaded the module it then grabbed the 'open' defined
in the previous load, leading to code that infinite recursed. Switched to
simply call builtins.open directly.
2011-02-22 03:25:12 +00:00
Brett Cannon eeb114b028 Issue #10512: close the log file in cgi when running tests.
Thanks to Nadeem Vawda for the find and an initial fix.
2011-02-22 03:14:12 +00:00
Brett Cannon 7a54073a56 Issue #10992: make tests pass when run under coverage.
Various tests fail when run under coverage. A primary culprit is refcount tests
which fail as the counts are thrown off by the coverage code. A new decorator
-- test.support.refcount_test -- is used to decorate tests which test refcounts
and to skip them when running under coverage. Other tests simply fail because
of changes in the system (e.g., __local__ suddenly appearing).

Thanks to Kristian Vlaardingerbroek for helping to diagnose the test failures.
2011-02-22 03:04:06 +00:00
Raymond Hettinger 158c9c26fc Issue #11085: Moved collections abstract base classes into a separate module
called collections.abc, following the pattern used by importlib.abc.  For
backwards compatibility, the names continue to also be imported into the
collections module.
2011-02-22 00:41:50 +00:00
Antoine Pitrou ecc26923cd Issue #4681: Allow mmap() to work on file sizes and offsets larger than
4GB, even on 32-bit builds.  Initial patch by Ross Lagerwall, adapted for
32-bit Windows.
2011-02-21 23:41:12 +00:00
Antoine Pitrou ce58dc7b16 Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due
to open door files.
2011-02-21 21:55:48 +00:00
Victor Stinner 5ed8b2c737 Fix PyUnicode_FromFormatV("%c") for non-BMP char
Issue #10830: Fix PyUnicode_FromFormatV("%c") for non-BMP characters on
narrow build.
2011-02-21 21:13:44 +00:00
Victor Stinner ed4c71112a Remove filename variable from ceval.c
Issue #11168: Remove filename debug variable from PyEval_EvalFrameEx().
It encoded the Unicode filename to UTF-8, but the encoding fails on
undecodable filename (on surrogate characters) which raises an unexpected
UnicodeEncodeError on recursion limit.
2011-02-21 21:05:50 +00:00
Victor Stinner 441cc01e0f compileall uses repr() to format filenames/paths
Issue #11169: compileall module uses repr() to format filenames and paths to
escape surrogate characters and show spaces.
2011-02-21 20:58:02 +00:00
Victor Stinner fd34b3788f Remove bootstrap code of PyUnicode_AsEncodedString()
Issue #11187: Remove bootstrap code (use ASCII) of
PyUnicode_AsEncodedString(), it was replaced by a better fallback (use
the locale encoding) in PyUnicode_EncodeFSDefault().

Prepare also empty sections in NEWS.
2011-02-21 20:51:28 +00:00
Ned Deily 5eaee2e23b Issue #11268: Prevent Mac OS X Installer failure if Documentation
package had previously been installed.
2011-02-21 20:44:27 +00:00
Raymond Hettinger ddb52404ee Issue #11089: Fix performance issue limiting the use of ConfigParser()
with large config files.
2011-02-21 19:42:11 +00:00
Brett Cannon 31f5929c1e Issue #10990: Prevent tests from clobbering a set trace function.
Many tests simply didn't care if they unset a pre-existing trace function. This
made test coverage impossible. This patch fixes various tests to put back any
pre-existing trace function. It also introduces test.support.no_tracing as a
decorator which will temporarily unset the trace function for tests which
simply fail otherwise.

Thanks to Kristian Vlaardingerbroek for helping to find the cause of various
trace function unsets.
2011-02-21 19:29:56 +00:00
Antoine Pitrou 54f0f84e9f Issue #10276: Fix the results of zlib.crc32() and zlib.adler32() on buffers
larger than 4GB.  Patch by Nadeem Vawda.
2011-02-21 18:03:13 +00:00
Martin v. Löwis 5e06a5d4cd - Check for NULL result in PyType_FromSpec. 2011-02-21 16:24:00 +00:00
Georg Brandl 3ebb6b3615 Bump trunk to 3.3 alpha 0. 2011-02-20 10:37:07 +00:00