PCQA-929 Start running debugger backend tests on Python 3.14

GitOrigin-RevId: 0b5326a05afbc4b26d88dba3cbce7f3fa938d48c
This commit is contained in:
Denis Mashutin
2025-02-13 13:56:03 +00:00
committed by intellij-monorepo-bot
parent f5f887c3f1
commit 7faf775c39
8 changed files with 91 additions and 10 deletions
@@ -134,6 +134,9 @@ IS_PY311_OR_GREATER = False
IS_PY312_OR_GREATER = False
IS_PY312_OR_LESSER = False
IS_PY313 = False
IS_PY313_OR_GREATER = False
IS_PY313_OR_LESSER = False
IS_PY314 = False
IS_PY2 = True
IS_PY27 = False
IS_PY24 = False
@@ -156,6 +159,9 @@ try:
IS_PY312_OR_GREATER = sys.version_info >= (3, 12)
IS_PY312_OR_LESSER = sys.version_info[:2] <= (3, 12)
IS_PY313 = sys.version_info[0] == 3 and sys.version_info[1] == 13
IS_PY313_OR_GREATER = sys.version_info >= (3, 13)
IS_PY313_OR_LESSER = sys.version_info[:2] <= (3, 13)
IS_PY314 = sys.version_info[0] == 3 and sys.version_info[1] == 14
elif sys.version_info[0] == 2 and sys.version_info[1] == 7:
IS_PY27 = True
elif sys.version_info[0] == 2 and sys.version_info[1] == 4:
@@ -0,0 +1,13 @@
pip==25.0
tox==4.24.1
cachetools==5.5.1
chardet==5.2.0
colorama==0.4.6
distlib==0.3.9
filelock==3.17.0
packaging==24.2
platformdirs==4.3.6
pluggy==1.5.0
pyproject-api==1.9.0
virtualenv==20.29.1
@@ -3,7 +3,7 @@
'''
from _pydev_bundle import _pydev_imports_tipper
from _pydevd_bundle.pydevd_constants import IS_PY38_OR_GREATER
from _pydevd_bundle.pydevd_constants import IS_PY313
from _pydevd_bundle.pydevd_constants import IS_PY313_OR_GREATER
import inspect
import pytest
import sys
@@ -84,7 +84,7 @@ class TestCPython(unittest.TestCase):
t = self.assert_in('readlines' , tips)
self.assertTrue('->' in t[1] or 'sizehint' in t[1])
@pytest.mark.xfail(IS_PY313, reason='PCQA-886')
@pytest.mark.xfail(IS_PY313_OR_GREATER, reason='PCQA-886')
def test_imports(self):
'''
You can print_ the results to check...
@@ -7,9 +7,11 @@ from types import CodeType
import pytest
from _pydevd_frame_eval.pydevd_modify_bytecode import insert_code, \
add_jump_instruction, IS_PY310_OR_GREATER
add_jump_instruction
from _pydevd_bundle.pydevd_constants import IS_PY39
from _pydevd_bundle.pydevd_constants import IS_PY310_OR_GREATER
from _pydevd_bundle.pydevd_constants import IS_PY311_OR_GREATER
from _pydevd_bundle.pydevd_constants import IS_PY313_OR_LESSER
from opcode import EXTENDED_ARG
TRACE_MESSAGE = "Trace called"
@@ -32,7 +34,7 @@ IS_PY37_OR_GREATER = sys.version_info > (3, 7)
LOAD_OPCODES = [dis.opmap[x] for x in ('LOAD_ATTR', 'LOAD_CONST', 'LOAD_FAST', 'LOAD_GLOBAL', 'LOAD_NAME')]
if IS_PY37_OR_GREATER:
if IS_PY37_OR_GREATER and IS_PY313_OR_LESSER:
LOAD_OPCODES.append(dis.opmap['LOAD_METHOD'])
@@ -24,6 +24,8 @@ from _pydevd_bundle.pydevd_constants import IS_PY39_OR_GREATER
from _pydevd_bundle.pydevd_constants import IS_PY310_OR_GREATER
from _pydevd_bundle.pydevd_constants import IS_PY312_OR_GREATER
from _pydevd_bundle.pydevd_constants import IS_PY313
from _pydevd_bundle.pydevd_constants import IS_PY313_OR_GREATER
from _pydevd_bundle.pydevd_constants import IS_PY314
try:
@@ -284,7 +286,7 @@ def test_case_suspend_thread(case_setup):
# we're inside the tracing other threads don't run (so, we can have only one
# thread paused in the debugger).
@pytest.mark.skipif(IS_JYTHON, reason='Jython can only have one thread stopped at each time.')
@pytest.mark.xfail(IS_PY313, reason='PCQA-888')
@pytest.mark.xfail(IS_PY313_OR_GREATER, reason='PCQA-888')
def test_case_suspend_all_thread(case_setup):
with case_setup.test_file('_debugger_case_suspend_all.py') as writer:
writer.write_make_initial_run()
@@ -1064,7 +1066,7 @@ def test_case_qthread4(case_setup):
writer.log.append('Marking finished ok.')
writer.finished_ok = True
@pytest.mark.xfail(IS_PY314, reason='PCQA-941')
def test_m_switch(case_setup_m_switch):
with case_setup_m_switch.test_file() as writer:
writer.log.append('writing add breakpoint')
@@ -1091,7 +1093,7 @@ def test_m_switch(case_setup_m_switch):
writer.finished_ok = True
@pytest.mark.xfail(IS_PY314, reason='PCQA-942')
def test_module_entry_point(case_setup_m_switch_entry_point):
with case_setup_m_switch_entry_point.test_file() as writer:
writer.log.append('writing add breakpoint')
@@ -2455,8 +2457,8 @@ def test_return_value(case_setup):
@pytest.mark.parametrize(
'check_single_notification',
(
pytest.param(True, marks=pytest.mark.xfail(IS_PY313, reason='PCQA-889')),
pytest.param(False, marks=pytest.mark.xfail(IS_PY313, reason='PCQA-890')),
pytest.param(True, marks=pytest.mark.xfail(IS_PY313_OR_GREATER, reason='PCQA-889')),
pytest.param(False, marks=pytest.mark.xfail(IS_PY313_OR_GREATER, reason='PCQA-890')),
),
)
def test_run_pause_all_threads_single_notification(case_setup, check_single_notification):
@@ -6,6 +6,7 @@ from _pydevd_bundle.smart_step_into import get_stepping_variants
from _pydevd_bundle.pydevd_constants import IS_PY38
from _pydevd_bundle.pydevd_constants import IS_PY39
from _pydevd_bundle.pydevd_constants import IS_PY310
from _pydevd_bundle.pydevd_constants import IS_PY314
@pytest.fixture
@@ -82,6 +83,7 @@ def test_candidates_for_inner_decorator_py2(inner_decorator_code):
@pytest.mark.python3(reason="Python 3 is required to step into binary operators")
@pytest.mark.xfail(IS_PY314, reason='PCQA-943')
def test_candidates_for_inner_decorator_py3(inner_decorator_code):
variants = list(get_stepping_variants(inner_decorator_code))
assert len(variants) == 2
@@ -0,0 +1,52 @@
pytest==8.3.4
teamcity-messages==1.33
ipython==8.32.0
Django==5.1.5
behave==1.2.7.dev6
Jinja2==3.1.5
nose==1.3.7
django-nose==1.4.7
behave-django==1.5.0
pytest-xdist==3.6.1
untangle==1.2.1
pandas==2.2.3
py==1.11.0
asgiref==3.8.1
asttokens==3.0.0
beautifulsoup4==4.12.3
colorama==0.4.6
cucumber-expressions==18.0.1
cucumber-tag-expressions==6.1.2
decorator==5.1.1
defusedxml==0.7.1
exceptiongroup==1.2.2
execnet==2.1.1
executing==2.2.0
iniconfig==2.0.0
jedi==0.19.2
MarkupSafe==3.0.2
matplotlib-inline==0.1.7
numpy==2.2.2
packaging==24.2
parse==1.20.2
parse_type==0.6.4
parso==0.8.4
pexpect==4.9.0
pluggy==1.5.0
prompt_toolkit==3.0.50
ptyprocess==0.7.0
pure_eval==0.2.3
Pygments==2.19.1
python-dateutil==2.9.0.post0
pytz==2025.1
six==1.17.0
soupsieve==2.6
sqlparse==0.5.3
stack-data==0.6.3
tomli==2.2.1
traitlets==5.14.3
typing_extensions==4.12.2
tzdata==2025.1
wcwidth==0.2.13
+5 -1
View File
@@ -7,6 +7,7 @@ envlist =
py311
py312
py313
py314
skipsdist=True
[testenv]
@@ -33,4 +34,7 @@ deps = -rtest-requirements/test-requirements-311.txt
deps = -rtest-requirements/test-requirements-312.txt
[testenv:py313]
deps = -rtest-requirements/test-requirements-313.txt
deps = -rtest-requirements/test-requirements-313.txt
[testenv:py314]
deps = -rtest-requirements/test-requirements-314.txt