Raymond Hettinger
e8b4b60555
Add recipe to docs.
2008-03-11 00:19:07 +00:00
Neal Norwitz
0098c9d609
Introduce a lock to fix a race condition which caused an exception in the test.
...
Some buildbots were consistently failing (e.g., amd64).
Also remove a couple of semi-colons.
2008-03-09 19:03:42 +00:00
Facundo Batista
c54aec1fda
Issue 1106316. post_mortem()'s parameter, traceback, is now
...
optional: it defaults to the traceback of the exception that is currently
being handled.
2008-03-08 16:50:27 +00:00
Marc-André Lemburg
50967bdec2
Add new name for Mandrake: Mandriva.
2008-03-08 10:01:43 +00:00
Nick Coghlan
7af53be66f
Speed up with statements by storing the __exit__ method on the stack instead of in a temp variable (bumps the magic number for pyc files)
2008-03-07 14:13:28 +00:00
Jeffrey Yasskin
e75f59a578
Progress on issue #1193577 by adding a polling .shutdown() method to
...
SocketServers. The core of the patch was written by Pedro Werneck, but any bugs
are mine. I've also rearranged the code for timeouts in order to avoid
interfering with the shutdown poll.
2008-03-07 06:22:15 +00:00
Raymond Hettinger
38fb9bee6c
Tweak recipes and tests
2008-03-07 01:33:20 +00:00
Raymond Hettinger
a1ca94a102
Issue 2246: itertools grouper object did not participate in GC (should be backported).
2008-03-06 22:51:36 +00:00
Raymond Hettinger
ad47fa141c
More tests.
2008-03-06 20:52:01 +00:00
Georg Brandl
4286138e7b
#2220 : handle matching failure more gracefully.
2008-03-06 07:43:02 +00:00
Georg Brandl
a7bd27f0a8
#2225 : return nonzero status code from py_compile if not all files could be compiled.
2008-03-06 07:41:16 +00:00
Martin v. Löwis
d2bbe526c3
Patch #2232 : os.tmpfile might fail on Windows if the user has no
...
permission to create files in the root directory.
Will backport to 2.5.
2008-03-06 06:55:22 +00:00
Georg Brandl
1df03405fc
#1725737 : ignore other VC directories other than CVS and SVN's too.
2008-03-06 06:47:18 +00:00
Raymond Hettinger
66f91ea966
C implementation of itertools.permutations().
2008-03-05 20:59:58 +00:00
Thomas Heller
f3c0559b5e
Issue 1872: Changed the struct module typecode from 't' to '?', for
...
compatibility with PEP3118.
2008-03-05 15:34:29 +00:00
Jeffrey Yasskin
f28896d0bb
Fix test_socketserver on Windows after r61099 added several signal.alarm()
...
calls (which don't exist on non-Unix platforms).
Thanks to Trent Nelson for the report and patch.
2008-03-05 06:19:56 +00:00
Neal Norwitz
48309d5a4b
Make the timeout longer to give slow machines a chance to pass the test
...
before timing out. This doesn't change the duration of the test under
normal circumstances. This is targetted at fixing the spurious failures
on the FreeBSD buildbot primarily.
2008-03-05 05:38:06 +00:00
Neal Norwitz
ce527883dc
Catch OSError when trying to remove a file in case removal fails. This
...
should prevent a failure in tearDown masking any real test failure.
2008-03-05 05:20:44 +00:00
Neal Norwitz
218072595e
Get this test to pass even when there is no sound card in the system.
...
Patch from Trent Nelson. (I can't test this.)
2008-03-05 05:14:18 +00:00
Neal Norwitz
31e88934ed
Remove the files/dirs after closing the DB so the tests work on Windows.
...
Patch from Trent Nelson. Also simplified removing a file by using test_support.
2008-03-05 05:10:48 +00:00
Amaury Forgeot d'Arc
d21fb4c2e0
Issue#2238: some syntax errors from *args or **kwargs expressions
...
would give bogus error messages, because of untested exceptions::
>>> f(**g(1=2))
XXX undetected error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object is not iterable
instead of the expected SyntaxError: keyword can't be an expression
Will backport.
2008-03-05 01:50:33 +00:00
Fred Drake
a28df13a9d
fix typo
2008-03-04 21:14:04 +00:00
Neal Norwitz
4a50d26ba2
Close the file before trying to remove the directory so it works on Windows.
...
As reported by Trent Nelson on python-dev.
2008-03-04 16:22:46 +00:00
Raymond Hettinger
d553d856e7
Beef-up docs and tests for itertools. Fix-up end-case for product().
2008-03-04 04:17:08 +00:00
Raymond Hettinger
10ac19bedc
Issue 2226: Callable checked for the wrong abstract method.
2008-03-03 22:19:58 +00:00
Raymond Hettinger
972fb077a0
Remove dependency on itertools -- a simple genexp suffices.
2008-03-03 22:04:55 +00:00
Georg Brandl
d2f7680b8f
Actually import itertools.
2008-03-03 21:22:47 +00:00
Georg Brandl
26bc177fe6
15 -> 16, the 2nd
2008-03-03 20:39:00 +00:00
Christian Heimes
728bee897f
15 -> 16
2008-03-03 20:30:29 +00:00
Christian Heimes
608c1d8e87
Since abc._Abstract was replaces by a new type flags the regression test suite fails. I've added a new function inspect.isabstract(). Is the mmethod fine or should I check if object is a instance of type or subclass of object, too?
2008-03-03 18:28:04 +00:00
Brett Cannon
7dbd91811d
Add test_main() functions to various tests where it was simple to do. Done so
...
that regrtest can execute the test_main() directly instead of relying on import
side-effects.
2008-03-03 04:19:29 +00:00
Brett Cannon
963c80fd45
Add a note in the main test class' docstring that the order of execution of the
...
tests is important.
2008-03-03 03:26:43 +00:00
Brett Cannon
bfbf5b3715
Add a note in the main test class' docstring that the order of execution of the
...
tests is important.
2008-03-03 03:24:48 +00:00
Brett Cannon
6382ffc892
Move test_largefile over to using 'with' statements for open files.
...
Also rename the driver function to test_main() instead of main_test().
2008-03-03 02:41:40 +00:00
Brett Cannon
56c4debe0d
Refactor test_logging to use unittest. This should finally solve the flakiness
...
issues.
Thanks to Antoine Pitrou for the patch.
2008-03-03 00:38:58 +00:00
Gregory P. Smith
492e2bfefa
Modify import of test_support so that the code can also be used with a
...
stand alone distribution of bsddb that includes its own small copy of
test_support for the needed functionality on older pythons.
2008-03-02 20:00:53 +00:00
Gerhard Häring
f40f6846e3
Made sqlite3 module's regression tests work with SQLite versions that don't
...
support "create table if not exists", yet.
2008-03-02 13:08:03 +00:00
Barry Warsaw
9d225e63be
Give IDLE a release date
2008-03-01 03:00:52 +00:00
Barry Warsaw
c853f5d4dc
bump idle version number
2008-03-01 02:26:42 +00:00
Gerhard Häring
1cc60ed214
Updated to pysqlite 2.4.1. Documentation additions will come later.
2008-02-29 22:08:41 +00:00
Mark Dickinson
f4da77765f
Fix docstring typo.
2008-02-29 03:29:17 +00:00
Raymond Hettinger
08ff6822cc
Handle the repeat keyword argument for itertools.product().
2008-02-29 02:21:48 +00:00
Mark Dickinson
1ddf1d8482
Add __format__ method to Decimal, to support PEP 3101
2008-02-29 02:16:37 +00:00
Raymond Hettinger
b4cbc98c39
Add alternate constructor for itertools.chain().
2008-02-28 22:46:41 +00:00
Raymond Hettinger
05bf6338b8
Have itertools.chain() consume its inputs lazily instead of building a tuple of iterators at the outset.
2008-02-28 22:30:42 +00:00
Christian Heimes
acfd8ed0cd
Windows fix for signal test - skip it earlier
2008-02-28 21:00:45 +00:00
Jeffrey Yasskin
392c159ad6
Prevent SocketServer.ForkingMixIn from waiting on child processes that it
...
didn't create, in most cases. When there are max_children handlers running, it
will still wait for any child process, not just handler processes.
2008-02-28 18:03:15 +00:00
Andrew M. Kuchling
a6298528e1
#2169 : make generated HTML more valid
2008-02-28 14:03:03 +00:00
Jeffrey Yasskin
69e1309fd4
Thread.start() used sleep(0.000001) to make sure it didn't return before the
...
new thread had started. At least on my MacBook Pro, that wound up sleeping for
a full 10ms (probably 1 jiffy). By using an Event instead, we can be absolutely
certain that the thread has started, and return more quickly (217us).
Before:
$ ./python.exe -m timeit -s 'from threading import Thread' 't = Thread(); t.start(); t.join()'
100 loops, best of 3: 10.3 msec per loop
$ ./python.exe -m timeit -s 'from threading import Thread; t = Thread()' 't.isAlive()'
1000000 loops, best of 3: 0.47 usec per loop
After:
$ ./python.exe -m timeit -s 'from threading import Thread' 't = Thread(); t.start(); t.join()'
1000 loops, best of 3: 217 usec per loop
$ ./python.exe -m timeit -s 'from threading import Thread; t = Thread()' 't.isAlive()'
1000000 loops, best of 3: 0.86 usec per loop
To be fair, the 10ms isn't CPU time, and other threads including the spawned
one get to run during it. There are also some slightly more complicated ways to
get back the .4us in isAlive() if we want.
2008-02-28 06:09:19 +00:00
Jeffrey Yasskin
180997b2bb
Speed test_socketserver up from 28.739s to 0.226s, simplify the logic, and make
...
sure all tests run even if some fail.
2008-02-28 05:53:18 +00:00