Skip to content

Commit bcc9f37

Browse files
committed
Default free threaded off
Signed-off-by: Bernát Gábor <[email protected]>
1 parent 5a4298b commit bcc9f37

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

src/tox/tox_env/python/api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import sys
88
import sysconfig
99
from abc import ABC, abstractmethod
10+
from dataclasses import dataclass
1011
from pathlib import Path
1112
from typing import TYPE_CHECKING, Any, List, NamedTuple, cast
1213

@@ -27,14 +28,15 @@ class VersionInfo(NamedTuple):
2728
serial: int
2829

2930

30-
class PythonInfo(NamedTuple):
31+
@dataclass(frozen=True)
32+
class PythonInfo:
3133
implementation: str
3234
version_info: VersionInfo
3335
version: str
34-
free_threaded: bool
3536
is_64: bool
3637
platform: str
3738
extra: dict[str, Any]
39+
free_threaded: bool = False
3840

3941
@property
4042
def version_no_dot(self) -> str:

src/tox/tox_env/python/virtual_env/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,10 @@ def _get_python(self, base_python: list[str]) -> PythonInfo | None: # noqa: ARG
143143
implementation=interpreter.implementation,
144144
version_info=interpreter.version_info,
145145
version=interpreter.version,
146-
free_threaded=interpreter.free_threaded,
147146
is_64=(interpreter.architecture == 64), # noqa: PLR2004
148147
platform=interpreter.platform,
149148
extra={"executable": Path(interpreter.system_executable).resolve()},
149+
free_threaded=interpreter.free_threaded,
150150
)
151151

152152
def prepend_env_var_path(self) -> list[Path]:

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def get_python(self: VirtualEnv, base_python: list[str]) -> PythonInfo | None:
9797
implementation=impl,
9898
version_info=ver_info,
9999
version="",
100-
free_threaded=False,
101100
is_64=True,
102101
platform=sys.platform,
103102
extra={"executable": Path(sys.executable)},
103+
free_threaded=False,
104104
)
105105

106106
mocker.patch.object(VirtualEnv, "_get_python", get_python)

0 commit comments

Comments
 (0)