Skip to content

Commit 00431e2

Browse files
committedSep 9, 2024··
Skip a test on 3.13+manylinux.
Appears to hang. It was a refcounting test so those can be flaky and version dependent anyway.
1 parent 3d2bf82 commit 00431e2

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed
 

‎make-manylinux

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ if [ -d /greenlet -a -d /opt/python ]; then
3333
mkdir -p /greenlet/wheelhouse
3434
OPATH="$PATH"
3535
which auditwheel
36+
echo "Installed Python versions"
37+
ls -l /opt/python
3638
for variant in `ls -d /opt/python/cp{313,37,38,39,310,311,312}*`; do
3739
export PATH="$variant/bin:$OPATH"
3840
echo "Building $variant $(python --version)"

‎src/greenlet/tests/__init__.py

+8-4
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
Tests for greenlet.
44
55
"""
6-
from __future__ import absolute_import
7-
from __future__ import division
8-
from __future__ import print_function
9-
6+
import os
107
import sys
118
import unittest
129

@@ -27,7 +24,14 @@
2724
from . import leakcheck
2825

2926
PY312 = sys.version_info[:2] >= (3, 12)
27+
PY313 = sys.version_info[:2] >= (3, 13)
28+
3029
WIN = sys.platform.startswith("win")
30+
RUNNING_ON_GITHUB_ACTIONS = os.environ.get('GITHUB_ACTIONS')
31+
RUNNING_ON_TRAVIS = os.environ.get('TRAVIS') or RUNNING_ON_GITHUB_ACTIONS
32+
RUNNING_ON_APPVEYOR = os.environ.get('APPVEYOR')
33+
RUNNING_ON_CI = RUNNING_ON_TRAVIS or RUNNING_ON_APPVEYOR
34+
RUNNING_ON_MANYLINUX = os.environ.get('GREENLET_MANYLINUX')
3135

3236
class TestCaseMetaClass(type):
3337
# wrap each test method with

‎src/greenlet/tests/test_greenlet.py

+13-10
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
from __future__ import absolute_import
2-
from __future__ import division
3-
from __future__ import print_function
4-
51
import gc
62
import sys
73
import time
84
import threading
5+
import unittest
96

10-
from abc import ABCMeta, abstractmethod
7+
from abc import ABCMeta
8+
from abc import abstractmethod
119

1210
import greenlet
1311
from greenlet import greenlet as RawGreenlet
1412
from . import TestCase
13+
from . import RUNNING_ON_MANYLINUX
14+
from . import PY313
1515
from .leakcheck import fails_leakcheck
1616

1717

@@ -207,10 +207,7 @@ def run():
207207
# we don't get the exception, it just gets printed.
208208
# When we run on 3.8 only, we can use sys.unraisablehook
209209
oldstderr = sys.stderr
210-
try:
211-
from cStringIO import StringIO
212-
except ImportError:
213-
from io import StringIO
210+
from io import StringIO
214211
stderr = sys.stderr = StringIO()
215212
try:
216213
del g
@@ -716,6 +713,13 @@ def greenlet_main():
716713
del self.glets
717714
self.assertEqual(sys.getrefcount(Greenlet), initial_refs)
718715

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+
)
719723
def test_issue_245_reference_counting_subclass_threads(self):
720724
# https://github.com/python-greenlet/greenlet/issues/245
721725
from threading import Thread
@@ -1309,5 +1313,4 @@ def test_reentrant_switch_run_callable_has_del(self):
13091313
)
13101314

13111315
if __name__ == '__main__':
1312-
import unittest
13131316
unittest.main()

0 commit comments

Comments
 (0)
Please sign in to comment.