Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
# Copyright (c) 2001-2006 Twisted Matrix Laboratories.
|
|
|
|
#
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining
|
|
|
|
# a copy of this software and associated documentation files (the
|
|
|
|
# "Software"), to deal in the Software without restriction, including
|
|
|
|
# without limitation the rights to use, copy, modify, merge, publish,
|
|
|
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
|
|
|
# permit persons to whom the Software is furnished to do so, subject to
|
|
|
|
# the following conditions:
|
|
|
|
#
|
|
|
|
# The above copyright notice and this permission notice shall be
|
|
|
|
# included in all copies or substantial portions of the Software.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
|
|
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
|
|
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
"""
|
|
|
|
Tests for epoll wrapper.
|
|
|
|
"""
|
|
|
|
import os
|
|
|
|
import socket
|
|
|
|
import errno
|
|
|
|
import time
|
|
|
|
import select
|
|
|
|
import tempfile
|
|
|
|
import unittest
|
|
|
|
|
2008-05-20 18:35:26 -03:00
|
|
|
from test import support
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
if not hasattr(select, "epoll"):
|
Merged revisions 70554,70588-70589,70598,70605,70611-70621,70623-70624,70626-70627 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70554 | benjamin.peterson | 2009-03-23 16:25:15 -0500 (Mon, 23 Mar 2009) | 1 line
complain when there's no last exception
........
r70588 | benjamin.peterson | 2009-03-24 17:56:32 -0500 (Tue, 24 Mar 2009) | 1 line
fix newline issue in test summary
........
r70589 | benjamin.peterson | 2009-03-24 18:07:07 -0500 (Tue, 24 Mar 2009) | 1 line
another style nit
........
r70598 | benjamin.peterson | 2009-03-25 16:24:04 -0500 (Wed, 25 Mar 2009) | 1 line
add shorthands for expected failures and unexpected success
........
r70605 | benjamin.peterson | 2009-03-26 11:32:23 -0500 (Thu, 26 Mar 2009) | 1 line
remove uneeded function
........
r70611 | benjamin.peterson | 2009-03-26 13:35:37 -0500 (Thu, 26 Mar 2009) | 1 line
add much better tests for python version information parsing
........
r70612 | benjamin.peterson | 2009-03-26 13:55:48 -0500 (Thu, 26 Mar 2009) | 1 line
more and more implementations now support sys.subversion
........
r70613 | benjamin.peterson | 2009-03-26 13:58:30 -0500 (Thu, 26 Mar 2009) | 1 line
roll old test in with new one
........
r70614 | benjamin.peterson | 2009-03-26 14:09:21 -0500 (Thu, 26 Mar 2009) | 1 line
add support for PyPy
........
r70615 | benjamin.peterson | 2009-03-26 14:58:18 -0500 (Thu, 26 Mar 2009) | 5 lines
add some useful utilities for skipping tests with unittest's new skipping ability
most significantly apply a modified portion of the patch from #4242 with
patches for skipping implementation details
........
r70616 | benjamin.peterson | 2009-03-26 15:05:50 -0500 (Thu, 26 Mar 2009) | 1 line
rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
........
r70617 | benjamin.peterson | 2009-03-26 15:17:27 -0500 (Thu, 26 Mar 2009) | 1 line
apply the second part of #4242's patch; classify all the implementation details in test_descr
........
r70618 | benjamin.peterson | 2009-03-26 15:48:25 -0500 (Thu, 26 Mar 2009) | 1 line
remove test_support.TestSkipped and just use unittest.SkipTest
........
r70619 | benjamin.peterson | 2009-03-26 15:49:40 -0500 (Thu, 26 Mar 2009) | 1 line
fix naming
........
r70620 | benjamin.peterson | 2009-03-26 16:10:30 -0500 (Thu, 26 Mar 2009) | 1 line
fix incorrect auto-translation of TestSkipped -> unittest.SkipTest
........
r70621 | benjamin.peterson | 2009-03-26 16:11:16 -0500 (Thu, 26 Mar 2009) | 1 line
must pass argument to get expected behavior ;)
........
r70623 | benjamin.peterson | 2009-03-26 16:30:10 -0500 (Thu, 26 Mar 2009) | 1 line
add missing import
........
r70624 | benjamin.peterson | 2009-03-26 16:30:54 -0500 (Thu, 26 Mar 2009) | 1 line
** is required here
........
r70626 | benjamin.peterson | 2009-03-26 16:40:29 -0500 (Thu, 26 Mar 2009) | 1 line
update email tests to use SkipTest
........
r70627 | benjamin.peterson | 2009-03-26 16:44:43 -0500 (Thu, 26 Mar 2009) | 1 line
fix another name
........
2009-03-28 18:42:05 -03:00
|
|
|
raise unittest.SkipTest("test works only on Linux 2.6")
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
Merged revisions 61724-61725,61731-61735,61737,61739,61741,61743-61744,61753,61761,61765-61767,61769,61773,61776-61778,61780-61783,61788,61793,61796,61807,61813 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r61724 | martin.v.loewis | 2008-03-22 01:01:12 +0100 (Sat, 22 Mar 2008) | 49 lines
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?\195?\164r 2008) | 1 line
Added fixer for implicit local imports. See #2414.
........
r61628 | david.wolever | 2008-03-19 17:57:43 +0100 (Mi, 19 M?\195?\164r 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?\195?\164r 2008) | 1 line
Two more relative import fixes in pgen2.
........
r61635 | david.wolever | 2008-03-19 20:16:03 +0100 (Mi, 19 M?\195?\164r 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?\195?\164r 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?\195?\164r 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?\195?\164r 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?\195?\164r 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?\195?\164r 2008) | 1 line
Added 2to3 node pretty-printer
........
r61679 | david.wolever | 2008-03-20 20:50:42 +0100 (Do, 20 M?\195?\164r 2008) | 1 line
Made node printing a little bit prettier
........
r61723 | martin.v.loewis | 2008-03-22 00:59:27 +0100 (Sa, 22 M?\195?\164r 2008) | 2 lines
Fix whitespace.
........
................
r61725 | martin.v.loewis | 2008-03-22 01:02:41 +0100 (Sat, 22 Mar 2008) | 2 lines
Install lib2to3.
................
r61731 | facundo.batista | 2008-03-22 03:45:37 +0100 (Sat, 22 Mar 2008) | 4 lines
Small fix that complicated the test actually when that
test failed.
................
r61732 | alexandre.vassalotti | 2008-03-22 05:08:44 +0100 (Sat, 22 Mar 2008) | 2 lines
Added warning for the removal of 'hotshot' in Py3k.
................
r61733 | georg.brandl | 2008-03-22 11:07:29 +0100 (Sat, 22 Mar 2008) | 4 lines
#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.
................
r61734 | georg.brandl | 2008-03-22 11:56:23 +0100 (Sat, 22 Mar 2008) | 2 lines
Activate the Sphinx doctest extension and convert howto/functional to use it.
................
r61735 | georg.brandl | 2008-03-22 11:58:38 +0100 (Sat, 22 Mar 2008) | 2 lines
Allow giving source names on the cmdline.
................
r61737 | georg.brandl | 2008-03-22 12:00:48 +0100 (Sat, 22 Mar 2008) | 2 lines
Fixup this HOWTO's doctest blocks so that they can be run with sphinx' doctest builder.
................
r61739 | georg.brandl | 2008-03-22 12:47:10 +0100 (Sat, 22 Mar 2008) | 2 lines
Test decimal.rst doctests as far as possible with sphinx doctest.
................
r61741 | georg.brandl | 2008-03-22 13:04:26 +0100 (Sat, 22 Mar 2008) | 2 lines
Make doctests in re docs usable with sphinx' doctest.
................
r61743 | georg.brandl | 2008-03-22 13:59:37 +0100 (Sat, 22 Mar 2008) | 2 lines
Make more doctests in pprint docs testable.
................
r61744 | georg.brandl | 2008-03-22 14:07:06 +0100 (Sat, 22 Mar 2008) | 2 lines
No need to specify explicit "doctest_block" anymore.
................
r61753 | georg.brandl | 2008-03-22 21:08:43 +0100 (Sat, 22 Mar 2008) | 2 lines
Fix-up syntax problems.
................
r61761 | georg.brandl | 2008-03-22 22:06:20 +0100 (Sat, 22 Mar 2008) | 4 lines
Make collections' doctests executable.
(The <BLANKLINE>s will be stripped from presentation output.)
................
r61765 | georg.brandl | 2008-03-22 22:21:57 +0100 (Sat, 22 Mar 2008) | 2 lines
Test doctests in datetime docs.
................
r61766 | georg.brandl | 2008-03-22 22:26:44 +0100 (Sat, 22 Mar 2008) | 2 lines
Test doctests in operator docs.
................
r61767 | georg.brandl | 2008-03-22 22:38:33 +0100 (Sat, 22 Mar 2008) | 2 lines
Enable doctests in functions.rst. Already found two errors :)
................
r61769 | georg.brandl | 2008-03-22 23:04:10 +0100 (Sat, 22 Mar 2008) | 3 lines
Enable doctest running for several other documents.
We have now over 640 doctests that are run with "make doctest".
................
r61773 | raymond.hettinger | 2008-03-23 01:55:46 +0100 (Sun, 23 Mar 2008) | 1 line
Simplify demo code.
................
r61776 | neal.norwitz | 2008-03-23 04:43:33 +0100 (Sun, 23 Mar 2008) | 7 lines
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.
................
r61777 | neal.norwitz | 2008-03-23 05:08:30 +0100 (Sun, 23 Mar 2008) | 1 line
Speed up the test by avoiding socket timeouts.
................
r61778 | neal.norwitz | 2008-03-23 05:43:09 +0100 (Sun, 23 Mar 2008) | 1 line
Skip the epoll test if epoll() does not work
................
r61780 | neal.norwitz | 2008-03-23 06:47:20 +0100 (Sun, 23 Mar 2008) | 1 line
Suppress failure (to avoid a flaky test) if we cannot connect to svn.python.org
................
r61781 | neal.norwitz | 2008-03-23 07:13:25 +0100 (Sun, 23 Mar 2008) | 4 lines
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.
................
r61782 | neal.norwitz | 2008-03-23 07:16:04 +0100 (Sun, 23 Mar 2008) | 1 line
Try to prevent the alarm going off early in tearDown
................
r61783 | neal.norwitz | 2008-03-23 07:19:57 +0100 (Sun, 23 Mar 2008) | 4 lines
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.
................
r61788 | georg.brandl | 2008-03-23 09:05:30 +0100 (Sun, 23 Mar 2008) | 2 lines
Make the doctests presentation-friendlier.
................
r61793 | amaury.forgeotdarc | 2008-03-23 10:55:29 +0100 (Sun, 23 Mar 2008) | 4 lines
#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.
................
r61796 | raymond.hettinger | 2008-03-23 14:32:32 +0100 (Sun, 23 Mar 2008) | 1 line
Issue 1681432: Add triangular distribution the random module.
................
r61807 | raymond.hettinger | 2008-03-23 20:37:53 +0100 (Sun, 23 Mar 2008) | 4 lines
Adopt Nick's suggestion for useful default arguments.
Clean-up floating point issues by adding true division and float constants.
................
r61813 | gregory.p.smith | 2008-03-23 22:04:43 +0100 (Sun, 23 Mar 2008) | 6 lines
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 18:54:12 -03:00
|
|
|
try:
|
|
|
|
select.epoll()
|
|
|
|
except IOError as e:
|
|
|
|
if e.errno == errno.ENOSYS:
|
Merged revisions 70554,70588-70589,70598,70605,70611-70621,70623-70624,70626-70627 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70554 | benjamin.peterson | 2009-03-23 16:25:15 -0500 (Mon, 23 Mar 2009) | 1 line
complain when there's no last exception
........
r70588 | benjamin.peterson | 2009-03-24 17:56:32 -0500 (Tue, 24 Mar 2009) | 1 line
fix newline issue in test summary
........
r70589 | benjamin.peterson | 2009-03-24 18:07:07 -0500 (Tue, 24 Mar 2009) | 1 line
another style nit
........
r70598 | benjamin.peterson | 2009-03-25 16:24:04 -0500 (Wed, 25 Mar 2009) | 1 line
add shorthands for expected failures and unexpected success
........
r70605 | benjamin.peterson | 2009-03-26 11:32:23 -0500 (Thu, 26 Mar 2009) | 1 line
remove uneeded function
........
r70611 | benjamin.peterson | 2009-03-26 13:35:37 -0500 (Thu, 26 Mar 2009) | 1 line
add much better tests for python version information parsing
........
r70612 | benjamin.peterson | 2009-03-26 13:55:48 -0500 (Thu, 26 Mar 2009) | 1 line
more and more implementations now support sys.subversion
........
r70613 | benjamin.peterson | 2009-03-26 13:58:30 -0500 (Thu, 26 Mar 2009) | 1 line
roll old test in with new one
........
r70614 | benjamin.peterson | 2009-03-26 14:09:21 -0500 (Thu, 26 Mar 2009) | 1 line
add support for PyPy
........
r70615 | benjamin.peterson | 2009-03-26 14:58:18 -0500 (Thu, 26 Mar 2009) | 5 lines
add some useful utilities for skipping tests with unittest's new skipping ability
most significantly apply a modified portion of the patch from #4242 with
patches for skipping implementation details
........
r70616 | benjamin.peterson | 2009-03-26 15:05:50 -0500 (Thu, 26 Mar 2009) | 1 line
rename TestCase.skip() to skipTest() because it causes annoying problems with trial #5571
........
r70617 | benjamin.peterson | 2009-03-26 15:17:27 -0500 (Thu, 26 Mar 2009) | 1 line
apply the second part of #4242's patch; classify all the implementation details in test_descr
........
r70618 | benjamin.peterson | 2009-03-26 15:48:25 -0500 (Thu, 26 Mar 2009) | 1 line
remove test_support.TestSkipped and just use unittest.SkipTest
........
r70619 | benjamin.peterson | 2009-03-26 15:49:40 -0500 (Thu, 26 Mar 2009) | 1 line
fix naming
........
r70620 | benjamin.peterson | 2009-03-26 16:10:30 -0500 (Thu, 26 Mar 2009) | 1 line
fix incorrect auto-translation of TestSkipped -> unittest.SkipTest
........
r70621 | benjamin.peterson | 2009-03-26 16:11:16 -0500 (Thu, 26 Mar 2009) | 1 line
must pass argument to get expected behavior ;)
........
r70623 | benjamin.peterson | 2009-03-26 16:30:10 -0500 (Thu, 26 Mar 2009) | 1 line
add missing import
........
r70624 | benjamin.peterson | 2009-03-26 16:30:54 -0500 (Thu, 26 Mar 2009) | 1 line
** is required here
........
r70626 | benjamin.peterson | 2009-03-26 16:40:29 -0500 (Thu, 26 Mar 2009) | 1 line
update email tests to use SkipTest
........
r70627 | benjamin.peterson | 2009-03-26 16:44:43 -0500 (Thu, 26 Mar 2009) | 1 line
fix another name
........
2009-03-28 18:42:05 -03:00
|
|
|
raise unittest.SkipTest("kernel doesn't support epoll()")
|
Merged revisions 61724-61725,61731-61735,61737,61739,61741,61743-61744,61753,61761,61765-61767,61769,61773,61776-61778,61780-61783,61788,61793,61796,61807,61813 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
................
r61724 | martin.v.loewis | 2008-03-22 01:01:12 +0100 (Sat, 22 Mar 2008) | 49 lines
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?\195?\164r 2008) | 1 line
Added fixer for implicit local imports. See #2414.
........
r61628 | david.wolever | 2008-03-19 17:57:43 +0100 (Mi, 19 M?\195?\164r 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?\195?\164r 2008) | 1 line
Two more relative import fixes in pgen2.
........
r61635 | david.wolever | 2008-03-19 20:16:03 +0100 (Mi, 19 M?\195?\164r 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?\195?\164r 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?\195?\164r 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?\195?\164r 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?\195?\164r 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?\195?\164r 2008) | 1 line
Added 2to3 node pretty-printer
........
r61679 | david.wolever | 2008-03-20 20:50:42 +0100 (Do, 20 M?\195?\164r 2008) | 1 line
Made node printing a little bit prettier
........
r61723 | martin.v.loewis | 2008-03-22 00:59:27 +0100 (Sa, 22 M?\195?\164r 2008) | 2 lines
Fix whitespace.
........
................
r61725 | martin.v.loewis | 2008-03-22 01:02:41 +0100 (Sat, 22 Mar 2008) | 2 lines
Install lib2to3.
................
r61731 | facundo.batista | 2008-03-22 03:45:37 +0100 (Sat, 22 Mar 2008) | 4 lines
Small fix that complicated the test actually when that
test failed.
................
r61732 | alexandre.vassalotti | 2008-03-22 05:08:44 +0100 (Sat, 22 Mar 2008) | 2 lines
Added warning for the removal of 'hotshot' in Py3k.
................
r61733 | georg.brandl | 2008-03-22 11:07:29 +0100 (Sat, 22 Mar 2008) | 4 lines
#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.
................
r61734 | georg.brandl | 2008-03-22 11:56:23 +0100 (Sat, 22 Mar 2008) | 2 lines
Activate the Sphinx doctest extension and convert howto/functional to use it.
................
r61735 | georg.brandl | 2008-03-22 11:58:38 +0100 (Sat, 22 Mar 2008) | 2 lines
Allow giving source names on the cmdline.
................
r61737 | georg.brandl | 2008-03-22 12:00:48 +0100 (Sat, 22 Mar 2008) | 2 lines
Fixup this HOWTO's doctest blocks so that they can be run with sphinx' doctest builder.
................
r61739 | georg.brandl | 2008-03-22 12:47:10 +0100 (Sat, 22 Mar 2008) | 2 lines
Test decimal.rst doctests as far as possible with sphinx doctest.
................
r61741 | georg.brandl | 2008-03-22 13:04:26 +0100 (Sat, 22 Mar 2008) | 2 lines
Make doctests in re docs usable with sphinx' doctest.
................
r61743 | georg.brandl | 2008-03-22 13:59:37 +0100 (Sat, 22 Mar 2008) | 2 lines
Make more doctests in pprint docs testable.
................
r61744 | georg.brandl | 2008-03-22 14:07:06 +0100 (Sat, 22 Mar 2008) | 2 lines
No need to specify explicit "doctest_block" anymore.
................
r61753 | georg.brandl | 2008-03-22 21:08:43 +0100 (Sat, 22 Mar 2008) | 2 lines
Fix-up syntax problems.
................
r61761 | georg.brandl | 2008-03-22 22:06:20 +0100 (Sat, 22 Mar 2008) | 4 lines
Make collections' doctests executable.
(The <BLANKLINE>s will be stripped from presentation output.)
................
r61765 | georg.brandl | 2008-03-22 22:21:57 +0100 (Sat, 22 Mar 2008) | 2 lines
Test doctests in datetime docs.
................
r61766 | georg.brandl | 2008-03-22 22:26:44 +0100 (Sat, 22 Mar 2008) | 2 lines
Test doctests in operator docs.
................
r61767 | georg.brandl | 2008-03-22 22:38:33 +0100 (Sat, 22 Mar 2008) | 2 lines
Enable doctests in functions.rst. Already found two errors :)
................
r61769 | georg.brandl | 2008-03-22 23:04:10 +0100 (Sat, 22 Mar 2008) | 3 lines
Enable doctest running for several other documents.
We have now over 640 doctests that are run with "make doctest".
................
r61773 | raymond.hettinger | 2008-03-23 01:55:46 +0100 (Sun, 23 Mar 2008) | 1 line
Simplify demo code.
................
r61776 | neal.norwitz | 2008-03-23 04:43:33 +0100 (Sun, 23 Mar 2008) | 7 lines
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.
................
r61777 | neal.norwitz | 2008-03-23 05:08:30 +0100 (Sun, 23 Mar 2008) | 1 line
Speed up the test by avoiding socket timeouts.
................
r61778 | neal.norwitz | 2008-03-23 05:43:09 +0100 (Sun, 23 Mar 2008) | 1 line
Skip the epoll test if epoll() does not work
................
r61780 | neal.norwitz | 2008-03-23 06:47:20 +0100 (Sun, 23 Mar 2008) | 1 line
Suppress failure (to avoid a flaky test) if we cannot connect to svn.python.org
................
r61781 | neal.norwitz | 2008-03-23 07:13:25 +0100 (Sun, 23 Mar 2008) | 4 lines
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.
................
r61782 | neal.norwitz | 2008-03-23 07:16:04 +0100 (Sun, 23 Mar 2008) | 1 line
Try to prevent the alarm going off early in tearDown
................
r61783 | neal.norwitz | 2008-03-23 07:19:57 +0100 (Sun, 23 Mar 2008) | 4 lines
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.
................
r61788 | georg.brandl | 2008-03-23 09:05:30 +0100 (Sun, 23 Mar 2008) | 2 lines
Make the doctests presentation-friendlier.
................
r61793 | amaury.forgeotdarc | 2008-03-23 10:55:29 +0100 (Sun, 23 Mar 2008) | 4 lines
#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.
................
r61796 | raymond.hettinger | 2008-03-23 14:32:32 +0100 (Sun, 23 Mar 2008) | 1 line
Issue 1681432: Add triangular distribution the random module.
................
r61807 | raymond.hettinger | 2008-03-23 20:37:53 +0100 (Sun, 23 Mar 2008) | 4 lines
Adopt Nick's suggestion for useful default arguments.
Clean-up floating point issues by adding true division and float constants.
................
r61813 | gregory.p.smith | 2008-03-23 22:04:43 +0100 (Sun, 23 Mar 2008) | 6 lines
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 18:54:12 -03:00
|
|
|
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
class TestEPoll(unittest.TestCase):
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
self.serverSocket = socket.socket()
|
|
|
|
self.serverSocket.bind(('127.0.0.1', 0))
|
|
|
|
self.serverSocket.listen(1)
|
|
|
|
self.connections = [self.serverSocket]
|
|
|
|
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
for skt in self.connections:
|
|
|
|
skt.close()
|
|
|
|
|
|
|
|
def _connected_pair(self):
|
|
|
|
client = socket.socket()
|
|
|
|
client.setblocking(False)
|
|
|
|
try:
|
|
|
|
client.connect(('127.0.0.1', self.serverSocket.getsockname()[1]))
|
|
|
|
except socket.error as e:
|
|
|
|
self.assertEquals(e.args[0], errno.EINPROGRESS)
|
|
|
|
else:
|
|
|
|
raise AssertionError("Connect should have raised EINPROGRESS")
|
|
|
|
server, addr = self.serverSocket.accept()
|
|
|
|
|
|
|
|
self.connections.extend((client, server))
|
|
|
|
return client, server
|
|
|
|
|
|
|
|
def test_create(self):
|
|
|
|
try:
|
|
|
|
ep = select.epoll(16)
|
|
|
|
except OSError as e:
|
|
|
|
raise AssertionError(str(e))
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertTrue(ep.fileno() > 0, ep.fileno())
|
|
|
|
self.assertTrue(not ep.closed)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
ep.close()
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertTrue(ep.closed)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
self.assertRaises(ValueError, ep.fileno)
|
|
|
|
|
|
|
|
def test_badcreate(self):
|
|
|
|
self.assertRaises(TypeError, select.epoll, 1, 2, 3)
|
|
|
|
self.assertRaises(TypeError, select.epoll, 'foo')
|
|
|
|
self.assertRaises(TypeError, select.epoll, None)
|
|
|
|
self.assertRaises(TypeError, select.epoll, ())
|
|
|
|
self.assertRaises(TypeError, select.epoll, ['foo'])
|
|
|
|
self.assertRaises(TypeError, select.epoll, {})
|
|
|
|
|
|
|
|
def test_add(self):
|
|
|
|
server, client = self._connected_pair()
|
|
|
|
|
|
|
|
ep = select.epoll(2)
|
|
|
|
try:
|
|
|
|
ep.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
ep.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
finally:
|
|
|
|
ep.close()
|
|
|
|
|
2009-05-31 16:44:27 -03:00
|
|
|
# adding by object w/ fileno works, too.
|
|
|
|
ep = select.epoll(2)
|
|
|
|
try:
|
|
|
|
ep.register(server, select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
ep.register(client, select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
finally:
|
|
|
|
ep.close()
|
|
|
|
|
|
|
|
ep = select.epoll(2)
|
|
|
|
try:
|
|
|
|
# TypeError: argument must be an int, or have a fileno() method.
|
|
|
|
self.assertRaises(TypeError, ep.register, object(),
|
|
|
|
select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
self.assertRaises(TypeError, ep.register, None,
|
|
|
|
select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
# ValueError: file descriptor cannot be a negative integer (-1)
|
|
|
|
self.assertRaises(ValueError, ep.register, -1,
|
|
|
|
select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
# IOError: [Errno 9] Bad file descriptor
|
|
|
|
self.assertRaises(IOError, ep.register, 10000,
|
|
|
|
select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
# registering twice also raises an exception
|
|
|
|
ep.register(server, select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
self.assertRaises(IOError, ep.register, server,
|
|
|
|
select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
finally:
|
|
|
|
ep.close()
|
|
|
|
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
def test_fromfd(self):
|
|
|
|
server, client = self._connected_pair()
|
|
|
|
|
|
|
|
ep = select.epoll(2)
|
|
|
|
ep2 = select.epoll.fromfd(ep.fileno())
|
|
|
|
|
|
|
|
ep2.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
ep2.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
|
|
|
|
|
|
|
|
events = ep.poll(1, 4)
|
|
|
|
events2 = ep2.poll(0.9, 4)
|
|
|
|
self.assertEqual(len(events), 2)
|
|
|
|
self.assertEqual(len(events2), 2)
|
|
|
|
|
|
|
|
ep.close()
|
|
|
|
try:
|
|
|
|
ep2.poll(1, 4)
|
|
|
|
except IOError as e:
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertEqual(e.args[0], errno.EBADF, e)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
else:
|
|
|
|
self.fail("epoll on closed fd didn't raise EBADF")
|
|
|
|
|
|
|
|
def test_control_and_wait(self):
|
|
|
|
client, server = self._connected_pair()
|
|
|
|
|
|
|
|
ep = select.epoll(16)
|
|
|
|
ep.register(server.fileno(),
|
|
|
|
select.EPOLLIN | select.EPOLLOUT | select.EPOLLET)
|
|
|
|
ep.register(client.fileno(),
|
|
|
|
select.EPOLLIN | select.EPOLLOUT | select.EPOLLET)
|
|
|
|
|
|
|
|
now = time.time()
|
|
|
|
events = ep.poll(1, 4)
|
|
|
|
then = time.time()
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertFalse(then - now > 0.1, then - now)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
|
|
|
events.sort()
|
|
|
|
expected = [(client.fileno(), select.EPOLLOUT),
|
|
|
|
(server.fileno(), select.EPOLLOUT)]
|
|
|
|
expected.sort()
|
|
|
|
|
|
|
|
self.assertEquals(events, expected)
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertFalse(then - now > 0.01, then - now)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
|
|
|
now = time.time()
|
|
|
|
events = ep.poll(timeout=2.1, maxevents=4)
|
|
|
|
then = time.time()
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertFalse(events)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
|
|
|
client.send(b"Hello!")
|
|
|
|
server.send(b"world!!!")
|
|
|
|
|
|
|
|
now = time.time()
|
|
|
|
events = ep.poll(1, 4)
|
|
|
|
then = time.time()
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertFalse(then - now > 0.01)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
|
|
|
events.sort()
|
|
|
|
expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT),
|
|
|
|
(server.fileno(), select.EPOLLIN | select.EPOLLOUT)]
|
|
|
|
expected.sort()
|
|
|
|
|
|
|
|
self.assertEquals(events, expected)
|
|
|
|
|
|
|
|
ep.unregister(client.fileno())
|
|
|
|
ep.modify(server.fileno(), select.EPOLLOUT)
|
|
|
|
now = time.time()
|
|
|
|
events = ep.poll(1, 4)
|
|
|
|
then = time.time()
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertFalse(then - now > 0.01)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
|
|
|
expected = [(server.fileno(), select.EPOLLOUT)]
|
|
|
|
self.assertEquals(events, expected)
|
|
|
|
|
|
|
|
def test_errors(self):
|
|
|
|
self.assertRaises(ValueError, select.epoll, -2)
|
|
|
|
self.assertRaises(ValueError, select.epoll().register, -1,
|
|
|
|
select.EPOLLIN)
|
|
|
|
|
|
|
|
def test_unregister_closed(self):
|
|
|
|
server, client = self._connected_pair()
|
|
|
|
fd = server.fileno()
|
|
|
|
ep = select.epoll(16)
|
|
|
|
ep.register(server)
|
|
|
|
|
|
|
|
now = time.time()
|
|
|
|
events = ep.poll(1, 4)
|
|
|
|
then = time.time()
|
2009-08-13 05:51:18 -03:00
|
|
|
self.assertFalse(then - now > 0.01)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
|
|
|
server.close()
|
|
|
|
ep.unregister(fd)
|
|
|
|
|
|
|
|
def test_main():
|
2008-05-20 18:35:26 -03:00
|
|
|
support.run_unittest(TestEPoll)
|
Merged revisions 61687-61688,61696,61700,61704-61705,61707-61709,61711-61712,61714-61716,61718-61722 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r61687 | jeffrey.yasskin | 2008-03-21 06:02:44 +0100 (Fri, 21 Mar 2008) | 2 lines
Speed up test_signal from ~24s to 4s by avoiding nearly all of the sleep calls.
........
r61688 | jeffrey.yasskin | 2008-03-21 06:51:37 +0100 (Fri, 21 Mar 2008) | 5 lines
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.
........
r61696 | georg.brandl | 2008-03-21 15:32:33 +0100 (Fri, 21 Mar 2008) | 2 lines
Mark the descitems in the tutorial as "noindex" so that :meth: cross-refs don't link to them.
........
r61700 | georg.brandl | 2008-03-21 18:19:29 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix markup.
........
r61704 | jeffrey.yasskin | 2008-03-21 19:25:06 +0100 (Fri, 21 Mar 2008) | 3 lines
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.
........
r61705 | jeffrey.yasskin | 2008-03-21 19:48:04 +0100 (Fri, 21 Mar 2008) | 7 lines
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.
........
r61707 | georg.brandl | 2008-03-21 20:14:38 +0100 (Fri, 21 Mar 2008) | 2 lines
Fix a code block in __future__ docs.
........
r61708 | georg.brandl | 2008-03-21 20:20:21 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for __func__ and __self__ on methods.
........
r61709 | georg.brandl | 2008-03-21 20:37:57 +0100 (Fri, 21 Mar 2008) | 2 lines
Add docs for print_function and future_builtins. Fixes #2442.
........
r61711 | georg.brandl | 2008-03-21 20:54:00 +0100 (Fri, 21 Mar 2008) | 2 lines
#2136: allow single quotes in realm spec.
........
r61712 | georg.brandl | 2008-03-21 21:01:51 +0100 (Fri, 21 Mar 2008) | 3 lines
Issue #2432: give DictReader the dialect and line_num attributes
advertised in the docs.
........
r61714 | georg.brandl | 2008-03-21 21:11:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2358: add py3k warning to sys.exc_clear().
........
r61715 | georg.brandl | 2008-03-21 21:21:46 +0100 (Fri, 21 Mar 2008) | 2 lines
#2346/#2347: add py3k warning for __methods__ and __members__. Patch by Jack Diederich.
........
r61716 | georg.brandl | 2008-03-21 21:38:24 +0100 (Fri, 21 Mar 2008) | 2 lines
#2348: add py3k warning for file.softspace.
........
r61718 | georg.brandl | 2008-03-21 21:55:20 +0100 (Fri, 21 Mar 2008) | 2 lines
#2160: document PyImport_GetImporter.
........
r61719 | georg.brandl | 2008-03-21 21:55:51 +0100 (Fri, 21 Mar 2008) | 2 lines
Update doc ACKS.
........
r61720 | steven.bethard | 2008-03-21 22:01:18 +0100 (Fri, 21 Mar 2008) | 1 line
Replace hack in regrtest.py with use of sys.py3kwarning.
........
r61721 | georg.brandl | 2008-03-21 22:05:03 +0100 (Fri, 21 Mar 2008) | 2 lines
Add missing versionadded tag.
........
r61722 | christian.heimes | 2008-03-22 00:49:44 +0100 (Sat, 22 Mar 2008) | 3 lines
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 21:47:35 -03:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
test_main()
|