http://bugs.python.org/issue5542
If the socket is closed, the client has no chance to read the response
from the server. EPIPE means that it isn't possible to write more
data from the socket, but not that it is impossible to read.
Also, various formatting changes.
RFC 2616 says that iso-8859-1 is the default charset for HTTP entity
bodies, but we encoded strings using ascii. See
http://bugs.python.org/issue5314. Changed docs and code to use
iso-8859-1.
Also fix some brokenness with passing a file as the body instead of a
string.
Add tests to show that some of this behavior actually works.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70518 | matthias.klose | 2009-03-22 08:08:22 -0500 (Sun, 22 Mar 2009) | 2 lines
- Fix comment macro in python.man
........
r70521 | benjamin.peterson | 2009-03-22 12:45:11 -0500 (Sun, 22 Mar 2009) | 1 line
close the file even if an exception occurs #5536
........
r70590 | skip.montanaro | 2009-03-24 19:52:11 -0500 (Tue, 24 Mar 2009) | 1 line
clarify the type of data returned
........
r70594 | marc-andre.lemburg | 2009-03-25 14:44:58 -0500 (Wed, 25 Mar 2009) | 9 lines
Remove the sys.version_info shortcut, since they cause the APIs
to return different information than the _sys_version() output
used in previous Python versions.
This also fixes issue5561: platform.python_version_tuple returns tuple of ints, should be strings
Added more tests for the various platform functions.
........
r70595 | marc-andre.lemburg | 2009-03-25 14:45:33 -0500 (Wed, 25 Mar 2009) | 3 lines
News item for the platform.py fix (r70594).
........
This change also adds a minimal unittest of urllib.response.addbase.
More are needed, but not to cover the small change being made here.
Addresses http://bugs.python.org/issue5418
........
r70531 | benjamin.peterson | 2009-03-22 17:24:58 -0500 (Sun, 22 Mar 2009) | 1 line
AttributeError can be thrown during recursion errors
........
r70533 | raymond.hettinger | 2009-03-22 19:08:09 -0500 (Sun, 22 Mar 2009) | 6 lines
Add more comments. Improve variable names.
Make links clearer by using a Link object
instead of a list. Use proxy links to avoid
circular references.
........
r70538 | raymond.hettinger | 2009-03-22 23:42:18 -0500 (Sun, 22 Mar 2009) | 1 line
Move initialization of root link to __init__.
........
r70544 | raymond.hettinger | 2009-03-23 13:26:59 -0500 (Mon, 23 Mar 2009) | 1 line
Make imported name private and wrap long-line.
........
r70552 | benjamin.peterson | 2009-03-23 15:47:59 -0500 (Mon, 23 Mar 2009) | 1 line
fix very old names for exception terms #5543
........
r70553 | benjamin.peterson | 2009-03-23 16:23:30 -0500 (Mon, 23 Mar 2009) | 1 line
revert r70552; wrong fix
........
r70564 | raymond.hettinger | 2009-03-23 19:17:11 -0500 (Mon, 23 Mar 2009) | 1 line
Add links to related resources.
........
r70601 | raymond.hettinger | 2009-03-25 17:41:32 -0500 (Wed, 25 Mar 2009) | 1 line
Separate initialization from clearing.
........
Someone may have closed the file descriptor, with something like
f = open('test.test', 'w')
os.close(f.fileno())
f.close()
Protect against this by checking fd on windows before closing.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70558 | benjamin.peterson | 2009-03-23 17:29:45 -0500 (Mon, 23 Mar 2009) | 4 lines
comply with the evilJavaNamingScheme for attribute names
It seems my love of PEP 8 overrode the need for consistentcy
........
r70561 | benjamin.peterson | 2009-03-23 18:10:14 -0500 (Mon, 23 Mar 2009) | 1 line
refactor unittest docs
........
r70562 | benjamin.peterson | 2009-03-23 18:13:36 -0500 (Mon, 23 Mar 2009) | 1 line
forgot to document that setUp can be skipped (silly me...)
........
r70563 | benjamin.peterson | 2009-03-23 18:19:03 -0500 (Mon, 23 Mar 2009) | 1 line
update from CVS
........
r70568 | benjamin.peterson | 2009-03-23 19:35:20 -0500 (Mon, 23 Mar 2009) | 1 line
some cleanup and modernization
........
r70569 | benjamin.peterson | 2009-03-23 19:36:16 -0500 (Mon, 23 Mar 2009) | 1 line
remove special metadata
........
r70570 | benjamin.peterson | 2009-03-23 19:37:12 -0500 (Mon, 23 Mar 2009) | 1 line
update docstring
........
r70571 | benjamin.peterson | 2009-03-23 19:39:24 -0500 (Mon, 23 Mar 2009) | 1 line
add new skipping things to __all__
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70546 | antoine.pitrou | 2009-03-23 19:41:45 +0100 (lun., 23 mars 2009) | 9 lines
Issue #4688: Add a heuristic so that tuples and dicts containing only
untrackable objects are not tracked by the garbage collector. This can
reduce the size of collections and therefore the garbage collection overhead
on long-running programs, depending on their particular use of datatypes.
(trivia: this makes the "binary_trees" benchmark from the Computer Language
Shootout 40% faster)
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70542 | mark.dickinson | 2009-03-23 18:25:13 +0000 (Mon, 23 Mar 2009) | 14 lines
Issue #5512: speed up the long division algorithm for Python longs.
The basic algorithm remains the same; the most significant speedups
come from the following three changes:
(1) normalize by shifting instead of multiplying and dividing
(2) the old algorithm usually did an unnecessary extra iteration of
the outer loop; remove this. As a special case, this means that
long divisions with a single-digit result run twice as fast as
before.
(3) make inner loop much tighter.
Various benchmarks show speedups of between 50% and 150% for long
integer divisions and modulo operations.
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70523 | lars.gustaebel | 2009-03-22 21:09:33 +0100 (Sun, 22 Mar 2009) | 5 lines
Issue #5068: Fixed the tarfile._BZ2Proxy.read() method that would loop
forever on incomplete input. That caused tarfile.open() to hang when used
with mode 'r' or 'r:bz2' and a fileobj argument that contained no data or
partial bzip2 compressed data.
........