PYTHON-5027 Test Windows with Python 3.14t (#2444)
This commit is contained in:
parent
06872f7f03
commit
ffb372aec7
@ -319,6 +319,15 @@ buildvariants:
|
||||
expansions:
|
||||
PYTHON_BINARY: /Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t
|
||||
tags: []
|
||||
- name: free-threaded-win64-python3.14t
|
||||
tasks:
|
||||
- name: .free-threading
|
||||
display_name: Free-threaded Win64 Python3.14t
|
||||
run_on:
|
||||
- windows-64-vsMulti-small
|
||||
expansions:
|
||||
PYTHON_BINARY: C:/python/Python314/python3.14t.exe
|
||||
tags: []
|
||||
|
||||
# Green framework tests
|
||||
- name: green-eventlet-rhel8
|
||||
|
||||
@ -108,14 +108,14 @@ def create_free_threaded_variants() -> list[BuildVariant]:
|
||||
variants = []
|
||||
for host_name in ("rhel8", "macos", "macos-arm64", "win64"):
|
||||
if host_name == "win64":
|
||||
# TODO: PYTHON-5027
|
||||
continue
|
||||
python = "3.14t"
|
||||
else:
|
||||
python = "3.13t"
|
||||
tasks = [".free-threading"]
|
||||
tags = []
|
||||
if host_name == "rhel8":
|
||||
tags.append("pr")
|
||||
host = HOSTS[host_name]
|
||||
python = "3.13t"
|
||||
display_name = get_variant_name("Free-threaded", host, python=python)
|
||||
variant = create_variant(tasks, display_name, tags=tags, python=python, host=host)
|
||||
variants.append(variant)
|
||||
|
||||
@ -153,18 +153,17 @@ def get_python_binary(python: str, host: Host) -> str:
|
||||
base = "C:/python/32"
|
||||
else:
|
||||
base = "C:/python"
|
||||
python = python.replace(".", "")
|
||||
if python == "313t":
|
||||
return f"{base}/Python313/python3.13t.exe"
|
||||
return f"{base}/Python{python}/python.exe"
|
||||
python_dir = python.replace(".", "").replace("t", "")
|
||||
return f"{base}/Python{python_dir}/python{python}.exe"
|
||||
|
||||
if name in ["rhel8", "ubuntu22", "ubuntu20", "rhel7"]:
|
||||
return f"/opt/python/{python}/bin/python3"
|
||||
|
||||
if name in ["macos", "macos-arm64"]:
|
||||
if python == "3.13t":
|
||||
return "/Library/Frameworks/PythonT.Framework/Versions/3.13/bin/python3t"
|
||||
return f"/Library/Frameworks/Python.Framework/Versions/{python}/bin/python3"
|
||||
bin_name = "python3t" if "t" in python else "python3"
|
||||
python_dir = python.replace("t", "")
|
||||
framework_dir = "PythonT" if "t" in python else "Python"
|
||||
return f"/Library/Frameworks/{framework_dir}.Framework/Versions/{python_dir}/bin/{bin_name}"
|
||||
|
||||
raise ValueError(f"no match found for python {python} on {name}")
|
||||
|
||||
|
||||
@ -111,6 +111,9 @@ filterwarnings = [
|
||||
"module:Wire protocol compression with:UserWarning",
|
||||
"module:GridIn property:DeprecationWarning",
|
||||
"module:GridOut property:DeprecationWarning",
|
||||
# pytest-asyncio known issue: https://github.com/pytest-dev/pytest-asyncio/issues/1032
|
||||
"module:.*WindowsSelectorEventLoopPolicy:DeprecationWarning",
|
||||
"module:.*et_event_loop_policy:DeprecationWarning",
|
||||
# TODO: Remove as part of PYTHON-3923.
|
||||
"module:unclosed <eventlet.green.ssl.GreenSSLSocket:ResourceWarning",
|
||||
"module:unclosed <socket.socket:ResourceWarning",
|
||||
|
||||
@ -30,7 +30,7 @@ import time
|
||||
import traceback
|
||||
import unittest
|
||||
import warnings
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
|
||||
from pymongo.errors import AutoReconnect
|
||||
from pymongo.synchronous.uri_parser import parse_uri
|
||||
|
||||
@ -30,7 +30,7 @@ import time
|
||||
import traceback
|
||||
import unittest
|
||||
import warnings
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
|
||||
from pymongo.asynchronous.uri_parser import parse_uri
|
||||
from pymongo.errors import AutoReconnect
|
||||
|
||||
@ -29,7 +29,7 @@ import time
|
||||
import traceback
|
||||
import unittest
|
||||
import warnings
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
|
||||
from pymongo._asyncio_task import create_task
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import inspect
|
||||
import sys
|
||||
|
||||
sys.path[0:0] = [""]
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
from test.asynchronous import AsyncIntegrationTest, async_client_context, unittest
|
||||
from test.utils_shared import OvertCommandListener
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ import asyncio
|
||||
import copy
|
||||
import sys
|
||||
import time
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
from io import BytesIO
|
||||
from test.asynchronous.helpers import ExceptionCatchingTask
|
||||
from typing import Any, Callable, List, Set, Tuple
|
||||
|
||||
@ -27,8 +27,8 @@ import re
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
from asyncio import iscoroutinefunction
|
||||
from collections import defaultdict
|
||||
from inspect import iscoroutinefunction
|
||||
from test.asynchronous import (
|
||||
AsyncIntegrationTest,
|
||||
async_client_context,
|
||||
|
||||
@ -23,8 +23,8 @@ import sys
|
||||
import threading # Used in the synchronized version of this file
|
||||
import time
|
||||
import traceback
|
||||
from asyncio import iscoroutinefunction
|
||||
from functools import wraps
|
||||
from inspect import iscoroutinefunction
|
||||
|
||||
from bson.son import SON
|
||||
from pymongo import AsyncMongoClient
|
||||
|
||||
@ -20,8 +20,8 @@ import functools
|
||||
import os
|
||||
import time
|
||||
import unittest
|
||||
from asyncio import iscoroutinefunction
|
||||
from collections import abc
|
||||
from inspect import iscoroutinefunction
|
||||
from test.asynchronous import AsyncIntegrationTest, async_client_context, client_knobs
|
||||
from test.asynchronous.helpers import ConcurrentRunner
|
||||
from test.utils_shared import (
|
||||
|
||||
@ -29,7 +29,7 @@ import time
|
||||
import traceback
|
||||
import unittest
|
||||
import warnings
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
|
||||
from pymongo._asyncio_task import create_task
|
||||
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import binascii
|
||||
import codecs
|
||||
import struct
|
||||
from pathlib import Path
|
||||
from test import unittest
|
||||
@ -111,7 +110,7 @@ def create_test(case_spec):
|
||||
|
||||
def create_tests():
|
||||
for filename in _TEST_PATH.glob("*.json"):
|
||||
with codecs.open(str(filename), encoding="utf-8") as test_file:
|
||||
with open(str(filename), encoding="utf-8") as test_file:
|
||||
test_method = create_test(json_util.loads(test_file.read()))
|
||||
setattr(TestBSONBinaryVector, "test_" + filename.stem, test_method)
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import binascii
|
||||
import codecs
|
||||
import functools
|
||||
import glob
|
||||
import json
|
||||
@ -227,7 +226,7 @@ def create_test(case_spec):
|
||||
def create_tests():
|
||||
for filename in glob.glob(os.path.join(_TEST_PATH, "*.json")):
|
||||
test_suffix, _ = os.path.splitext(os.path.basename(filename))
|
||||
with codecs.open(filename, encoding="utf-8") as bson_test_file:
|
||||
with open(filename, encoding="utf-8") as bson_test_file:
|
||||
test_method = create_test(json.load(bson_test_file))
|
||||
setattr(TestBSONCorpus, "test_" + test_suffix, test_method)
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ import inspect
|
||||
import sys
|
||||
|
||||
sys.path[0:0] = [""]
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
from test import IntegrationTest, client_context, unittest
|
||||
from test.utils_shared import OvertCommandListener
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ import asyncio
|
||||
import copy
|
||||
import sys
|
||||
import time
|
||||
from asyncio import iscoroutinefunction
|
||||
from inspect import iscoroutinefunction
|
||||
from io import BytesIO
|
||||
from test.helpers import ExceptionCatchingTask
|
||||
from typing import Any, Callable, List, Set, Tuple
|
||||
|
||||
@ -27,8 +27,8 @@ import re
|
||||
import sys
|
||||
import time
|
||||
import traceback
|
||||
from asyncio import iscoroutinefunction
|
||||
from collections import defaultdict
|
||||
from inspect import iscoroutinefunction
|
||||
from test import (
|
||||
IntegrationTest,
|
||||
client_context,
|
||||
|
||||
@ -23,8 +23,8 @@ import sys
|
||||
import threading # Used in the synchronized version of this file
|
||||
import time
|
||||
import traceback
|
||||
from asyncio import iscoroutinefunction
|
||||
from functools import wraps
|
||||
from inspect import iscoroutinefunction
|
||||
|
||||
from bson.son import SON
|
||||
from pymongo import MongoClient
|
||||
|
||||
@ -26,9 +26,9 @@ import sys
|
||||
import threading
|
||||
import unittest
|
||||
import warnings
|
||||
from asyncio import iscoroutinefunction
|
||||
from collections import abc, defaultdict
|
||||
from functools import partial
|
||||
from inspect import iscoroutinefunction
|
||||
from test import client_context
|
||||
from test.asynchronous.utils import async_wait_until
|
||||
from test.utils import wait_until
|
||||
|
||||
@ -20,8 +20,8 @@ import functools
|
||||
import os
|
||||
import time
|
||||
import unittest
|
||||
from asyncio import iscoroutinefunction
|
||||
from collections import abc
|
||||
from inspect import iscoroutinefunction
|
||||
from test import IntegrationTest, client_context, client_knobs
|
||||
from test.helpers import ConcurrentRunner
|
||||
from test.utils_shared import (
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import inspect
|
||||
import sys
|
||||
|
||||
from pymongo import AsyncMongoClient
|
||||
@ -83,7 +83,7 @@ def get_async_methods() -> set[str]:
|
||||
for k, v in vars(x).items()
|
||||
if callable(v)
|
||||
and not isinstance(v, classmethod)
|
||||
and asyncio.iscoroutinefunction(v)
|
||||
and inspect.iscoroutinefunction(v)
|
||||
and v.__name__[0] != "_"
|
||||
}
|
||||
result = result | methods
|
||||
|
||||
Loading…
Reference in New Issue
Block a user