Commit Graph

38774 Commits

Author SHA1 Message Date
Martin v. Löwis cdbc977c03 Install 2to3 script. 2008-03-24 12:57:53 +00:00
Georg Brandl 9bdead0aed #1700821: add a note to audioop docs about signedness of sample formats. 2008-03-24 09:34:34 +00:00
Raymond Hettinger b72233ce63 Issue 2460: Make Ellipsis objects copyable. 2008-03-24 08:17:39 +00:00
Raymond Hettinger d145240f9a Tighten documentation for Random.triangular. 2008-03-24 06:07:49 +00:00
Martin v. Löwis 966d0e0930 Merged revisions 61724-61824 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r61730 | martin.v.loewis | 2008-03-22 02:20:58 +0100 (Sa, 22 Mär 2008) | 2 lines

  More explicit relative imports.
........
  r61755 | david.wolever | 2008-03-22 21:33:52 +0100 (Sa, 22 Mär 2008) | 1 line

  Fixing #2446 -- 2to3 now translates 'import foo' to 'from . import foo'
........
  r61824 | david.wolever | 2008-03-24 01:30:24 +0100 (Mo, 24 Mär 2008) | 3 lines

  Fixed a bug where 'from itertools import izip' would return 'from itertools import'
........
2008-03-24 00:46:53 +00:00
Gregory P. Smith 440ca772f3 Have the binascii module use zlib's optimized crc32() function when available
to reduce our code size (1k data table and tiny bit of code).  It falls back
to its own without zlib.
2008-03-24 00:08:01 +00:00
Gregory P. Smith dd10284516 prevent a warning from the struct module when data size >= 2**32. 2008-03-23 23:45:12 +00:00
Gregory P. Smith ac830e932d A bugfix for r61813, it would fail if the data size was >=2**32. 2008-03-23 23:43:02 +00:00
Gregory P. Smith be446b4ab7 replace calls to get the initial values with the raw constants. 2008-03-23 22:14:38 +00:00
Gregory P. Smith 79b4ba8fd7 Fix gzip to deal with CRC's being signed values in Python 2.x properly and to
read 32bit values as unsigned to start with rather than applying signedness
fixups allover the place afterwards.

This hopefully fixes the test_tarfile failure on the alpha/tru64 buildbot.
2008-03-23 21:04:43 +00:00
Gregory P. Smith 73f57b0c05 Revert r61779 - It undid correct code and caused test_zlib to fail on all
platforms with a 64-bit long.

The Alpha/Tru64 test problem is a problem in either tarfile or test_tarfile,
not zlib.

crc32 and adler32 return 32-bit values.  by using a long thats larger than
32-bits in these functions they were prevented from wrapping around to their
signed 32-bit value that we want them to return in python 2.x.
2008-03-23 20:31:23 +00:00
Raymond Hettinger c4f7bab0a0 Adopt Nick's suggestion for useful default arguments.
Clean-up floating point issues by adding true division and float constants.
2008-03-23 19:37:53 +00:00
Raymond Hettinger bbc50eafe5 Issue 1681432: Add triangular distribution the random module. 2008-03-23 13:32:32 +00:00
Amaury Forgeot d'Arc 9a0d3462fc #1477: ur'\U0010FFFF' raised in narrow unicode builds.
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in
this case, just like the unicode-escape codec.
2008-03-23 09:55:29 +00:00
Georg Brandl 61854332b9 Make the doctests presentation-friendlier. 2008-03-23 08:05:30 +00:00
Neal Norwitz ade57d0485 Remove compiler warnings (on Alpha at least) about using chars as
array subscripts.  Using chars are dangerous b/c they are signed
on some platforms and unsigned on others.
2008-03-23 06:19:57 +00:00
Neal Norwitz acdb6fb2a5 Try to prevent the alarm going off early in tearDown 2008-03-23 06:16:04 +00:00
Neal Norwitz 0d2192be8b Move itertools before future_builtins since the latter depends on the former.
From a clean build importing future_builtins would fail since itertools
wasn't built yet.
2008-03-23 06:13:25 +00:00
Neal Norwitz 41d649116c Suppress failure (to avoid a flaky test) if we cannot connect to svn.python.org 2008-03-23 05:47:20 +00:00
Neal Norwitz acbd6420e3 Fix test_tarfile failures on Alpha (Tru64). The problem was caused in r61449
which made the return value signed.  On the Alpha that also lost data
since sizeof(int) != sizeof(long) and apparently adler32/crc32 return
64 bits of data.  This change keeps the signedness and continues to store the
data in a long rather than an int as was the case before r61449.
2008-03-23 05:08:37 +00:00
Neal Norwitz 3bda069c5a Skip the epoll test if epoll() does not work 2008-03-23 04:43:09 +00:00
Neal Norwitz 162d719113 Speed up the test by avoiding socket timeouts. 2008-03-23 04:08:30 +00:00
Neal Norwitz 1f2995b014 Try to make this test a little more robust and not fail with:
timeout (10.0025) is more than 2 seconds more than expected (0.001)

I'm assuming this problem is caused by DNS lookup.  This change
does a DNS lookup of the hostname before trying to connect, so the time
is not included.
2008-03-23 03:43:33 +00:00
Raymond Hettinger e70bb8d6f2 Simplify demo code. 2008-03-23 00:55:46 +00:00
Georg Brandl e8f1b00372 Enable doctest running for several other documents.
We have now over 640 doctests that are run with "make doctest".
2008-03-22 22:04:10 +00:00
Georg Brandl 7a45ab826e Enable doctests in functions.rst. Already found two errors :) 2008-03-22 21:38:33 +00:00
Georg Brandl 4f0f34f131 Test doctests in operator docs. 2008-03-22 21:26:44 +00:00
Georg Brandl 3f04303ba4 Test doctests in datetime docs. 2008-03-22 21:21:57 +00:00
Georg Brandl 4c8bbe69e5 Make collections' doctests executable.
(The <BLANKLINE>s will be stripped from presentation output.)
2008-03-22 21:06:20 +00:00
Georg Brandl 3dd57815b2 Fix-up syntax problems. 2008-03-22 20:08:43 +00:00
Georg Brandl 838b4b0145 No need to specify explicit "doctest_block" anymore. 2008-03-22 13:07:06 +00:00
Georg Brandl 473f1642a4 Make more doctests in pprint docs testable. 2008-03-22 12:59:37 +00:00
Georg Brandl 6199e32a74 Make doctests in re docs usable with sphinx' doctest. 2008-03-22 12:04:26 +00:00
Georg Brandl 9f6623255b Test decimal.rst doctests as far as possible with sphinx doctest. 2008-03-22 11:47:10 +00:00
Georg Brandl 09a7fe6933 Fixup this HOWTO's doctest blocks so that they can be run with sphinx' doctest builder. 2008-03-22 11:00:48 +00:00
Georg Brandl b98fe5a87f Allow giving source names on the cmdline. 2008-03-22 10:58:38 +00:00
Georg Brandl 17baef0b7c Activate the Sphinx doctest extension and convert howto/functional to use it. 2008-03-22 10:56:23 +00:00
Georg Brandl 86f38c81ae #1918: document that weak references *to* an object are
cleared before the object's __del__ is called, to ensure that the weak
reference callback (if any) finds the object healthy.
2008-03-22 10:07:29 +00:00
Alexandre Vassalotti ab68a3dc6f Added warning for the removal of 'hotshot' in Py3k. 2008-03-22 04:08:44 +00:00
Facundo Batista 6415667fe2 Small fix that complicated the test actually when that
test failed.
2008-03-22 02:45:37 +00:00
Martin v. Löwis 3e838dd88d Install lib2to3. 2008-03-22 00:02:41 +00:00
Martin v. Löwis baf267ceae Merged revisions 61602-61723 via svnmerge from
svn+ssh://pythondev@svn.python.org/sandbox/trunk/2to3/lib2to3

........
  r61626 | david.wolever | 2008-03-19 17:19:16 +0100 (Mi, 19 Mär 2008) | 1 line

  Added fixer for implicit local imports.  See #2414.
........
  r61628 | david.wolever | 2008-03-19 17:57:43 +0100 (Mi, 19 Mär 2008) | 1 line

  Added a class for tests which should not run if a particular import is found.
........
  r61629 | collin.winter | 2008-03-19 17:58:19 +0100 (Mi, 19 Mär 2008) | 1 line

  Two more relative import fixes in pgen2.
........
  r61635 | david.wolever | 2008-03-19 20:16:03 +0100 (Mi, 19 Mär 2008) | 1 line

  Fixed print fixer so it will do the Right Thing when it encounters __future__.print_function.  2to3 gets upset, though, so the tests have been commented out.
........
  r61637 | david.wolever | 2008-03-19 21:37:17 +0100 (Mi, 19 Mär 2008) | 3 lines

  Added a fixer for itertools imports (from itertools import imap, ifilterfalse --> from itertools import filterfalse)
........
  r61645 | david.wolever | 2008-03-19 23:22:35 +0100 (Mi, 19 Mär 2008) | 1 line

  SVN is happier when you add the files you create... -_-'
........
  r61654 | david.wolever | 2008-03-20 01:09:56 +0100 (Do, 20 Mär 2008) | 1 line

  Added an explicit sort order to fixers -- fixes problems like #2427
........
  r61664 | david.wolever | 2008-03-20 04:32:40 +0100 (Do, 20 Mär 2008) | 3 lines

  Fixes #2428 -- comments are no longer eatten by __future__ fixer.
........
  r61673 | david.wolever | 2008-03-20 17:22:40 +0100 (Do, 20 Mär 2008) | 1 line

  Added 2to3 node pretty-printer
........
  r61679 | david.wolever | 2008-03-20 20:50:42 +0100 (Do, 20 Mär 2008) | 1 line

  Made node printing a little bit prettier
........
  r61723 | martin.v.loewis | 2008-03-22 00:59:27 +0100 (Sa, 22 Mär 2008) | 2 lines

  Fix whitespace.
........
2008-03-22 00:01:12 +00:00
Christian Heimes 0e9ab5f2f0 Applied patch #1657 epoll and kqueue wrappers for the select module
The patch adds wrappers for the Linux epoll syscalls and the BSD kqueue syscalls. Thanks to Thomas Herve and the Twisted people for their support and help.
TODO: Finish documentation documentation
2008-03-21 23:49:44 +00:00
Georg Brandl 5f79446af0 Add missing versionadded tag. 2008-03-21 21:05:03 +00:00
Steven Bethard d290b04ee3 Replace hack in regrtest.py with use of sys.py3kwarning. 2008-03-21 21:01:18 +00:00
Georg Brandl c326801ffc Update doc ACKS. 2008-03-21 20:55:51 +00:00
Georg Brandl 4ab9febdde #2160: document PyImport_GetImporter. 2008-03-21 20:55:20 +00:00
Georg Brandl 65bb42dc1b #2348: add py3k warning for file.softspace. 2008-03-21 20:38:24 +00:00
Georg Brandl 07e5681fd3 #2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich. 2008-03-21 20:21:46 +00:00
Georg Brandl 5a44424c5e #2358: add py3k warning to sys.exc_clear(). 2008-03-21 20:11:46 +00:00