Commit Graph

38538 Commits

Author SHA1 Message Date
Antoine Pitrou b556452055 Publicize 3.1-specific performance enhancements 2009-03-28 19:45:26 +00:00
Guilherme Polo 36f2647857 Blocked revisions 70651 via svnmerge
........
  r70651 | guilherme.polo | 2009-03-28 16:17:16 -0300 (Sat, 28 Mar 2009) | 1 line

  Typo fix
........
2009-03-28 19:23:16 +00:00
Antoine Pitrou 9d81def047 Merged revisions 70647,70652 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70647 | antoine.pitrou | 2009-03-28 20:10:13 +0100 (sam., 28 mars 2009) | 3 lines

  Publicize the GC untracking optimization
........
  r70652 | antoine.pitrou | 2009-03-28 20:17:54 +0100 (sam., 28 mars 2009) | 3 lines

  Fix a typo and be more specific
........
2009-03-28 19:20:09 +00:00
Georg Brandl 7a51e589a4 Merged revisions 70648 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70648 | georg.brandl | 2009-03-28 14:10:37 -0500 (Sa, 28 Mär 2009) | 1 line

  #5324: document __subclasses__().
........
2009-03-28 19:13:21 +00:00
Jeremy Hylton 636950f925 Remove special logic that closes HTTPConnection socket on EPIPE.
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.
2009-03-28 04:34:21 +00:00
Jeremy Hylton 7c1692d587 Replace references to httplib with http.client. 2009-03-27 21:31:03 +00:00
Jeremy Hylton fdd6dee684 Update the tests skipped with quicktest target.
Some tests that used to be slow are now fast, and there are brand new
slow tests.
2009-03-27 21:24:45 +00:00
Jeremy Hylton 236654b82d Fix some string encoding issues with entity bodies in HTTP requests.
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.
2009-03-27 20:24:34 +00:00
Jeremy Hylton 98eb6c2838 Fix compatibility issue with HTTPMessage class.
The server needs to use MessageClass to parse.
2009-03-27 18:31:36 +00:00
Jeremy Hylton 914ab45d0a Sort import list. 2009-03-27 17:16:06 +00:00
Jeremy Hylton e6fdd04b37 Replace duplicate code in http.server with call to http.client.parse_headers(). 2009-03-27 17:14:18 +00:00
Jeremy Hylton ef9f48e578 Simplify complex expression. 2009-03-26 22:04:05 +00:00
Benjamin Peterson 5f28b7b797 Merged revisions 70518,70521,70590,70594-70595 via svnmerge from
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).
........
2009-03-26 21:49:58 +00:00
Jeremy Hylton b476d59792 Add __enter__ and __exit__ methods to addbase() so that it supports with.
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
2009-03-26 21:34:20 +00:00
Benjamin Peterson 81fac43918 Blocked revisions 70531,70533,70538,70544,70552-70553,70564,70601 via svnmerge
........
  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.
........
2009-03-26 21:29:57 +00:00
Benjamin Peterson 09832740d1 fix isprintable() on space characters #5126 2009-03-26 17:15:46 +00:00
Benjamin Peterson 59406a9d85 officially deprecated max_buffer_size 2009-03-26 17:10:29 +00:00
Jeremy Hylton 1ef7c6bc85 Add a few more tests for urllib.parse.urlencode.
Fix some long lines.
2009-03-26 16:57:30 +00:00
Jeremy Hylton 230feba5fd urlencode:
Remove dead code branch created by automated conversion from 2.x.
Clean up a few comments.
2009-03-26 16:56:59 +00:00
Jeremy Hylton f819886a72 Simplify a few complicated expressions. 2009-03-26 16:55:08 +00:00
Jeremy Hylton a4de60a1de Whitespace normalization. 2009-03-26 14:49:26 +00:00
Brett Cannon 663fffa4e2 Fix a circular import dependency. 2009-03-25 23:31:22 +00:00
Raymond Hettinger 52dc06b23c Separate initialization from clearing. 2009-03-25 22:45:22 +00:00
Benjamin Peterson 9611b5ef75 wild card import is only allowed at the module level 2009-03-25 21:50:43 +00:00
Skip Montanaro 0468df3d33 clarify the type of data returned 2009-03-25 00:52:18 +00:00
Benjamin Peterson 9b8d24b17d reuse tokenize.detect_encoding in linecache instead of a custom solution
patch by Victor Stinner #4016
2009-03-24 22:30:15 +00:00
Kristján Valur Jónsson a8abe86331 http://bugs.python.org/issue5544
Guard _fileio.c against other malicious os.close(f.fileno()) attempts.
Add tests to test_fileio.py to verify behaviour.
2009-03-24 15:27:42 +00:00
Kristján Valur Jónsson 649170bd66 http://bugs.python.org/issue5552
Return None rather than raise an exception if os.device_error is given an invalid file descriptor.
2009-03-24 14:15:49 +00:00
Kristján Valur Jónsson 8915e0e43a http://bugs.python.org/issue5544
Fix to the last checkin, correctly raise an exception on failure.
2009-03-24 13:51:36 +00:00
Kristján Valur Jónsson dc7c128d74 http://bugs.python.org/issue5544
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.
2009-03-24 13:21:53 +00:00
Benjamin Peterson 7c43524d3c fix function name 2009-03-24 01:40:39 +00:00
Benjamin Peterson 4c93dcbbef Merged revisions 70574 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70574 | benjamin.peterson | 2009-03-23 20:11:37 -0500 (Mon, 23 Mar 2009) | 1 line

  fix typo
........
2009-03-24 01:33:55 +00:00
Benjamin Peterson 70e32c837f fix some versionchanged and versionadded directives 2009-03-24 01:00:11 +00:00
Benjamin Peterson 52baa29033 Merged revisions 70558,70561-70563,70568-70571 via svnmerge from
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__
........
2009-03-24 00:56:30 +00:00
Raymond Hettinger 6b232cdc7f Add links to related resources. 2009-03-24 00:22:53 +00:00
Raymond Hettinger fd88ea7db2 For some reason rst docs like an initial 3 space indent. 2009-03-23 22:42:28 +00:00
Benjamin Peterson 5254c04aeb Merged revisions 70555 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70555 | benjamin.peterson | 2009-03-23 16:50:21 -0500 (Mon, 23 Mar 2009) | 4 lines

  implement test skipping and expected failures

  patch by myself #1034053
........
2009-03-23 22:25:03 +00:00
Benjamin Peterson 87d98bcbad PyString_FromString -> PyUnicode_FromString 2009-03-23 21:52:09 +00:00
Antoine Pitrou acc5d6b195 Merged revisions 70550 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70550 | antoine.pitrou | 2009-03-23 20:17:00 +0100 (lun., 23 mars 2009) | 3 lines

  The tracking statistics were actually too pessimistic
........
2009-03-23 19:19:54 +00:00
Antoine Pitrou 3a652b1d0a Merged revisions 70546 via svnmerge from
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)
........
2009-03-23 18:52:06 +00:00
Mark Dickinson 17e4fddb57 Merged revisions 70542 via svnmerge from
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.
........
2009-03-23 18:44:57 +00:00
Raymond Hettinger 798ee1a4c6 Make imported name private and wrap long-line. 2009-03-23 18:29:11 +00:00
Raymond Hettinger f173654db8 Forward port r70533 and r70538. 2009-03-23 05:19:21 +00:00
Benjamin Peterson 30364204d3 more about the file type's death #5513 2009-03-23 02:49:51 +00:00
Benjamin Peterson 52c3bf1aa5 sync open() docs more 2009-03-23 02:44:58 +00:00
Benjamin Peterson 8cad9c777b fix docs about open's return value #5539
(how annoying to have the same docs in two places)

(three if you count the docstring...)
2009-03-23 02:38:01 +00:00
Matthias Klose 21e5fcd245 - Modules/Setup.dist: Readd the _functools extension, lost in the io-c merge. 2009-03-22 23:58:48 +00:00
Lars Gustäbel 42e0091208 Merged revisions 70523 via svnmerge from
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.
........
2009-03-22 20:34:29 +00:00
Benjamin Peterson db08306bc2 fix incorrect merge 2009-03-22 17:22:36 +00:00
Benjamin Peterson 9d57ccb6c6 Blocked revisions 70463 via svnmerge
........
  r70463 | benjamin.peterson | 2009-03-18 15:52:15 -0500 (Wed, 18 Mar 2009) | 1 line

  fix strange errors when setting attributes on tracebacks #4034
........
2009-03-21 17:49:59 +00:00