Skip to content

Commit 287d0f9

Browse files
committed
test: don't check for code object leaks on 3.13t
1 parent 523059b commit 287d0f9

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.github/workflows/python-nightly.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,4 @@ jobs:
128128
129129
- name: "Run tox"
130130
run: |
131-
python -m tox -- -rfsEX
131+
python -m tox -v -- -rfsEX

coverage/env.py

+3
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
else:
4141
PYPYVERSION = (0,)
4242

43+
# Do we have a GIL?
44+
GIL = getattr(sys, '_is_gil_enabled', lambda: True)()
45+
4346
# Python behavior.
4447
class PYBEHAVIOR:
4548
"""Flags indicating this Python's behavior."""

tests/test_oddball.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,16 @@ def once(x): # line 301
210210
if fails > 8:
211211
pytest.fail("RAM grew by %d" % (ram_growth)) # pragma: only failure
212212

213-
@pytest.mark.skipif(not testenv.C_TRACER, reason="Only the C tracer has refcounting issues")
214-
# In fact, sysmon explicitly holds onto all code objects,
215-
# so this will definitely fail with sysmon.
213+
@pytest.mark.skipif(
214+
not testenv.C_TRACER,
215+
reason="Only the C tracer has refcounting issues",
216+
# In fact, sysmon explicitly holds onto all code objects,
217+
# so this will definitely fail with sysmon.
218+
)
219+
@pytest.mark.skipif(
220+
env.PYVERSION[:2] == (3, 13) and not env.GIL,
221+
reason = "3.13t never frees code objects: https://github.com/python/cpython/pull/131989",
222+
)
216223
@pytest.mark.parametrize("branch", [False, True])
217224
def test_eval_codeobject_leak(self, branch: bool) -> None:
218225
# https://github.com/nedbat/coveragepy/issues/1924

0 commit comments

Comments
 (0)