Commit Graph

38760 Commits

Author SHA1 Message Date
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
Georg Brandl 77354cf5ef Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
2008-03-21 20:01:51 +00:00
Georg Brandl 331243270d #2136: allow single quotes in realm spec. 2008-03-21 19:54:00 +00:00
Georg Brandl d346475a0c Add docs for print_function and future_builtins. Fixes #2442. 2008-03-21 19:37:57 +00:00
Georg Brandl 3fbe20c01e Add docs for __func__ and __self__ on methods. 2008-03-21 19:20:21 +00:00
Georg Brandl 06291185e1 Fix a code block in __future__ docs. 2008-03-21 19:14:38 +00:00
Jeffrey Yasskin 510eab5965 Speed test_threading up from 14s to .5s, and avoid a deadlock on certain
failures. The test for enumerate-after-join is now a little less rigorous, but
the bug it references says the error happened in the first couple iterations,
so 100 iterations should still be enough.

cProfile was useful for identifying the slow tests here.
2008-03-21 18:48:04 +00:00
Jeffrey Yasskin 413f588a36 Try to fix test_signal on FreeBSD. I'm assuming that os.kill is failing to
raise a signal, but switching to subprocess makes the code cleaner anyway.
2008-03-21 18:25:06 +00:00
Georg Brandl 859043c053 Fix markup. 2008-03-21 17:19:29 +00:00
Georg Brandl 9c6c47bf4b Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them. 2008-03-21 14:32:33 +00:00
Jeffrey Yasskin 6cda88ea11 Try to fix test_signal breakages on Linux due to r61687. It appears that at
least two of the linux build bots aren't leaving zombie processes around for
os.waitpid to wait for, causing ECHILD errors. This would be a symptom of a bug
somewhere, but probably not in signal itself.
2008-03-21 05:51:37 +00:00
Jeffrey Yasskin cf26f5419e Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls. 2008-03-21 05:02:44 +00:00
Eric Smith 816a168053 Comment how 'from __future__ import print_function' operates in 3.0. 2008-03-20 23:56:08 +00:00
Eric Smith 33dd094fd0 Fixed PEP name. 2008-03-20 23:04:04 +00:00
Andrew M. Kuchling 9cf2f5de68 Add lots of items 2008-03-20 22:49:26 +00:00