Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
toxenv: py
tox_extra_args: "-n 4"
test_mypyc: true
- name: Test suite with py314t-ubuntu, mypyc-compiled
python: '3.14t'
os: ubuntu-24.04-arm
toxenv: py
tox_extra_args: "-n 4"
test_mypyc: true
- name: Test suite with py314-windows-64
python: '3.14'
os: windows-latest
Expand Down
9 changes: 7 additions & 2 deletions mypy/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
import shutil
import sys
import sysconfig
import time
import tokenize
from abc import ABCMeta, abstractmethod
Expand All @@ -25,9 +26,13 @@
from mypy.version import __version__

try:
from lxml import etree # type: ignore[import-untyped]
if sys.version_info >= (3, 14) and bool(sysconfig.get_config_var("Py_GIL_DISABLED")):
# lxml doesn't support free-threading yet
LXML_INSTALLED = False
else:
from lxml import etree # type: ignore[import-untyped]

LXML_INSTALLED = True
LXML_INSTALLED = True
except ImportError:
LXML_INSTALLED = False

Expand Down
7 changes: 6 additions & 1 deletion mypy/test/testcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import re
import sys
import sysconfig
import tempfile
from pathlib import Path

Expand All @@ -27,7 +28,11 @@
from mypy.test.update_data import update_testcase_output

try:
import lxml # type: ignore[import-untyped]
if sys.version_info >= (3, 14) and bool(sysconfig.get_config_var("Py_GIL_DISABLED")):
# lxml doesn't support free-threading yet
lxml = None
else:
import lxml # type: ignore[import-untyped]
except ImportError:
lxml = None

Expand Down
7 changes: 6 additions & 1 deletion mypy/test/testcmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import re
import subprocess
import sys
import sysconfig

from mypy.test.config import PREFIX, test_temp_dir
from mypy.test.data import DataDrivenTestCase, DataSuite
Expand All @@ -20,7 +21,11 @@
)

try:
import lxml # type: ignore[import-untyped]
if sys.version_info >= (3, 14) and bool(sysconfig.get_config_var("Py_GIL_DISABLED")):
# lxml doesn't support free-threading yet
lxml = None
else:
import lxml # type: ignore[import-untyped]
except ImportError:
lxml = None

Expand Down
8 changes: 7 additions & 1 deletion mypy/test/testreports.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

from __future__ import annotations

import sys
import sysconfig
import textwrap

from mypy.report import CoberturaPackage, get_line_rate
from mypy.test.helpers import Suite, assert_equal

try:
import lxml # type: ignore[import-untyped]
if sys.version_info >= (3, 14) and bool(sysconfig.get_config_var("Py_GIL_DISABLED")):
# lxml doesn't support free-threading yet
lxml = None
else:
import lxml # type: ignore[import-untyped]
except ImportError:
lxml = None

Expand Down