|
1 |
| -from __future__ import absolute_import |
2 |
| -from __future__ import division |
3 |
| -from __future__ import print_function |
4 |
| - |
5 | 1 | import gc
|
6 | 2 | import sys
|
7 | 3 | import time
|
8 | 4 | import threading
|
| 5 | +import unittest |
9 | 6 |
|
10 |
| -from abc import ABCMeta, abstractmethod |
| 7 | +from abc import ABCMeta |
| 8 | +from abc import abstractmethod |
11 | 9 |
|
12 | 10 | import greenlet
|
13 | 11 | from greenlet import greenlet as RawGreenlet
|
14 | 12 | from . import TestCase
|
| 13 | +from . import RUNNING_ON_MANYLINUX |
| 14 | +from . import PY313 |
15 | 15 | from .leakcheck import fails_leakcheck
|
16 | 16 |
|
17 | 17 |
|
@@ -207,10 +207,7 @@ def run():
|
207 | 207 | # we don't get the exception, it just gets printed.
|
208 | 208 | # When we run on 3.8 only, we can use sys.unraisablehook
|
209 | 209 | oldstderr = sys.stderr
|
210 |
| - try: |
211 |
| - from cStringIO import StringIO |
212 |
| - except ImportError: |
213 |
| - from io import StringIO |
| 210 | + from io import StringIO |
214 | 211 | stderr = sys.stderr = StringIO()
|
215 | 212 | try:
|
216 | 213 | del g
|
@@ -716,6 +713,13 @@ def greenlet_main():
|
716 | 713 | del self.glets
|
717 | 714 | self.assertEqual(sys.getrefcount(Greenlet), initial_refs)
|
718 | 715 |
|
| 716 | + @unittest.skipIf( |
| 717 | + PY313 and RUNNING_ON_MANYLINUX, |
| 718 | + "The manylinux images appear to hang on this test on 3.13rc2" |
| 719 | + # Or perhaps I just got tired of waiting for the 450s timeout. |
| 720 | + # Still, it shouldn't take anywhere near that long. Does not reproduce in |
| 721 | + # Ubuntu images, on macOS or Windows. |
| 722 | + ) |
719 | 723 | def test_issue_245_reference_counting_subclass_threads(self):
|
720 | 724 | # https://github.com/python-greenlet/greenlet/issues/245
|
721 | 725 | from threading import Thread
|
@@ -1309,5 +1313,4 @@ def test_reentrant_switch_run_callable_has_del(self):
|
1309 | 1313 | )
|
1310 | 1314 |
|
1311 | 1315 | if __name__ == '__main__':
|
1312 |
| - import unittest |
1313 | 1316 | unittest.main()
|
0 commit comments