Jerry Seutter
fc7b3e3aa2
Changed test so it no longer runs as a side effect of importing.
2008-03-26 05:58:14 +00:00
Jerry Seutter
9f7af8d4da
Changed test so it no longer runs as a side effect of importing.
2008-03-26 05:32:51 +00:00
Neal Norwitz
22b3e3aff8
Ensure that the mailbox is closed to prevent problems on Windows with removing
...
an open file. This doesn't seem to be a problem in 2.6, but that appears
to be somewhat accidental (specific to reference counting). When this
gets merged to 3.0, it will make the 3.0 code simpler.
2008-03-26 05:19:41 +00:00
Jerry Seutter
14f0bc7900
Changed test so it no longer runs as a side effect of importing.
2008-03-26 05:03:03 +00:00
Neal Norwitz
85fc3c1f1c
Try to get this test to be less flaky. It was failing sometimes because
...
the connect would succeed before the timeout occurred. Try using an
address and port that hopefully doesn't exist to ensure we get no response.
If this doesn't work, we can use a public address close to python.org
and hopefully that address never gets taken.
2008-03-26 04:55:51 +00:00
Mark Dickinson
8e85ffa4b2
Issue #2482 : Make sure that the coefficient of a Decimal
...
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.
2008-03-25 18:47:59 +00:00
Mark Dickinson
3b24ccbe7e
Issue #2478 : Decimal(sqrt(0)) failed when the decimal context
...
was not explicitly supplied.
2008-03-25 14:33:23 +00:00
Georg Brandl
d5b635f196
Make Py3k warnings consistent w.r.t. punctuation; also respect the
...
EOL 80 limit and supply more alternatives in warning messages.
2008-03-25 08:29:14 +00:00
Georg Brandl
80055f6295
#2355 : py3k warning for buffer().
2008-03-25 07:56:27 +00:00
Neal Norwitz
bb89e686e3
Try to get this test to be more stable:
...
* disable gc during the test run because we are spawning objects and there
was an exception when calling Popen.__del__
* Always set an alarm handler so the process doesn't exit if the test fails
(should probably add assertions on the value of hndl_called in more places)
* Using a negative time causes Linux to treat it as zero, so disable that test.
2008-03-25 07:00:39 +00:00
Neal Norwitz
be9160b035
Don't try to close a non-open file.
...
Don't let file removal cause the test to fail.
2008-03-25 06:35:10 +00:00
Gregory P. Smith
88440960f9
A stab in the dark attempt to fix the alpha/tru64 buildbot problem and add more
...
test coverage of valid inputs to zlib.crc32.
2008-03-25 06:12:45 +00:00
Neal Norwitz
40f5e4c5a2
Fix a bunch of UnboundLocalErrors when the tests fail.
2008-03-25 04:17:38 +00:00
Martin v. Löwis
aef18b1c67
Patch #2240 : Implement signal.setitimer and signal.getitimer.
2008-03-24 13:31:16 +00:00
Raymond Hettinger
b72233ce63
Issue 2460: Make Ellipsis objects copyable.
2008-03-24 08:17:39 +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
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
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
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
Neal Norwitz
acdb6fb2a5
Try to prevent the alarm going off early in tearDown
2008-03-23 06:16:04 +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
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
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
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
Steven Bethard
d290b04ee3
Replace hack in regrtest.py with use of sys.py3kwarning.
2008-03-21 21:01:18 +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
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
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
Marc-André Lemburg
dbd61a2bff
If Mark Hammonds win32 tools are not available, try to use the _winreg module
...
and sys.getwindowsversion() to get at the Windows version info.
For the machine and processor uname() values, use the environment variables
for these on Windows XP and later.
2008-03-20 17:31:36 +00:00
Georg Brandl
402b270799
#2383 : remove obsolete XXX comment in stat.py.
2008-03-20 07:25:55 +00:00
Gregory P. Smith
6af3db8632
Attempt to fix the Solaris Sparc 10 buildbot. It was failing with an invalid
...
argument error on ioctl. This was caused by the added test_fcntl ioctl test
that hard coded 0 as the fd to use. Without a terminal, this fails on solaris.
(it passed from the command line on sol 10, both 32 and 64 bit)
Also, test_ioctl exists so I moved the test into there where it belongs.
2008-03-20 05:41:53 +00:00
Trent Nelson
00b53ea1b8
Revert r61650; the intent of this commit was to try and address alarm failures on some of the build slaves. As Neal points out, it's called after test_main(), so it's not going to factor into the test when run via regrtest.py (and removes the original functionality that Jeffrey wanted that would kill the test if it took longer than 3 seconds to run when executing it directly during development).
2008-03-20 00:58:44 +00:00
Sean Reifscheider
ac2ed1e0ac
Issue #2143 : Fix embedded readline() hang on SSL socket EOF.
2008-03-20 00:46:50 +00:00
Gregory P. Smith
a5cfcad0e3
Prevent ioctl op codes from being sign extended from int to unsigned long
...
when used on platforms that actually define ioctl as taking an unsigned long.
(the BSDs and OS X / Darwin)
Adds a unittest for fcntl.ioctl that tests what happens with both positive and
negative numbers.
This was done because of issue1471 but I'm not able to reproduce -that- problem
in the first place on Linux 32bit or 64bit or OS X 10.4 & 10.5 32bit or 64 bit.
2008-03-19 23:03:25 +00:00
Brett Cannon
48581c5f08
Make sure that the warnings filter is not reset or changed beyond the current
...
running test file.
Closes issue2407. Thanks Jerry Seutter.
2008-03-19 23:01:17 +00:00