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: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
python: ['3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', '3.15-dev']
arch: ['x86', 'x64']
lsp: ['']
lsp_extract_file: ['']
Expand Down Expand Up @@ -242,7 +242,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['pypy-3.11', '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
python: ['pypy-3.11', '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', '3.15-dev']
check_formatting: ['0']
no_test_requirements: ['0']
extra_name: ['']
Expand Down Expand Up @@ -320,7 +320,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python: ['pypy-3.11', '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t']
python: ['pypy-3.11', '3.10', '3.11', '3.12', '3.13', '3.14', '3.14t', '3.15-dev']
continue-on-error: >-
${{
(
Expand Down
2 changes: 2 additions & 0 deletions newsfragments/3456.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Support Python 3.15, as of beta 3. Things may still change and so this
support may break in the future.
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ filterwarnings = [
'ignore:You are using cryptography on a 32-bit Python on a 64-bit Windows Operating System. Cryptography will be significantly faster if you switch to using a 64-bit Python.:UserWarning',
# https://github.com/berkerpeksag/astor/issues/217
'ignore:ast.Num is deprecated:DeprecationWarning:astor',
# https://github.com/coveragepy/coveragepy/issues/2208
'ignore:Module globals; __loader__ != __spec__.loader:DeprecationWarning',
]
junit_family = "xunit2"
markers = ["redistributors_should_skip: tests that should be skipped by downstream redistributors"]
Expand Down
14 changes: 13 additions & 1 deletion src/trio/_core/_tests/test_thread_cache.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from __future__ import annotations

import os
import sys
import threading
import time
import warnings
from contextlib import contextmanager
from queue import Queue
from typing import TYPE_CHECKING, NoReturn
Expand Down Expand Up @@ -210,7 +212,17 @@ def foo() -> None:
start_thread_soon(foo, lambda _: done.set())
done.wait()

child_pid = os.fork()
with warnings.catch_warnings(record=True) as emitted:
# TODO: remove this extra filter once we drop 3.14. See
# https://github.com/python-trio/trio/issues/3355.
warnings.simplefilter("default")
child_pid = os.fork()

if child_pid != 0 and sys.version_info >= (3, 12):
# the warning is only emitted in the parent
assert len(emitted) == 1
assert isinstance(emitted[0].message, DeprecationWarning)
assert "fork() may lead to" in str(emitted[0].message)

# try using it
done = threading.Event()
Expand Down
4 changes: 4 additions & 0 deletions src/trio/_tests/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,10 @@ def lookup_symbol(symbol: str) -> dict[str, Any]: # type: ignore[misc, explicit
extra = {e for e in extra if not e.endswith("AttrsAttributes__")}
assert len(extra) == before - 1

if issubclass(class_, trio.Path) and sys.version_info >= (3, 15):
# needs a typeshed update for https://github.com/python/typeshed/pull/15737
extra.remove("is_reserved")

if attrs.has(class_):
# dynamically created attribute by attrs?
missing.remove("__attrs_props__")
Expand Down
29 changes: 29 additions & 0 deletions src/trio/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,33 @@
CAN_ERR_FLAG as CAN_ERR_FLAG,
CAN_ERR_MASK as CAN_ERR_MASK,
CAN_ISOTP as CAN_ISOTP,
CAN_ISOTP_CHK_PAD_DATA as CAN_ISOTP_CHK_PAD_DATA,
CAN_ISOTP_CHK_PAD_LEN as CAN_ISOTP_CHK_PAD_LEN,
CAN_ISOTP_DEFAULT_EXT_ADDRESS as CAN_ISOTP_DEFAULT_EXT_ADDRESS,
CAN_ISOTP_DEFAULT_FLAGS as CAN_ISOTP_DEFAULT_FLAGS,
CAN_ISOTP_DEFAULT_FRAME_TXTIME as CAN_ISOTP_DEFAULT_FRAME_TXTIME,
CAN_ISOTP_DEFAULT_LL_MTU as CAN_ISOTP_DEFAULT_LL_MTU,
CAN_ISOTP_DEFAULT_LL_TX_DL as CAN_ISOTP_DEFAULT_LL_TX_DL,
CAN_ISOTP_DEFAULT_LL_TX_FLAGS as CAN_ISOTP_DEFAULT_LL_TX_FLAGS,
CAN_ISOTP_DEFAULT_PAD_CONTENT as CAN_ISOTP_DEFAULT_PAD_CONTENT,
CAN_ISOTP_DEFAULT_RECV_BS as CAN_ISOTP_DEFAULT_RECV_BS,
CAN_ISOTP_DEFAULT_RECV_STMIN as CAN_ISOTP_DEFAULT_RECV_STMIN,
CAN_ISOTP_DEFAULT_RECV_WFTMAX as CAN_ISOTP_DEFAULT_RECV_WFTMAX,
CAN_ISOTP_EXTEND_ADDR as CAN_ISOTP_EXTEND_ADDR,
CAN_ISOTP_FORCE_RXSTMIN as CAN_ISOTP_FORCE_RXSTMIN,
CAN_ISOTP_FORCE_TXSTMIN as CAN_ISOTP_FORCE_TXSTMIN,
CAN_ISOTP_HALF_DUPLEX as CAN_ISOTP_HALF_DUPLEX,
CAN_ISOTP_LISTEN_MODE as CAN_ISOTP_LISTEN_MODE,
CAN_ISOTP_LL_OPTS as CAN_ISOTP_LL_OPTS,
CAN_ISOTP_OPTS as CAN_ISOTP_OPTS,
CAN_ISOTP_RECV_FC as CAN_ISOTP_RECV_FC,
CAN_ISOTP_RX_EXT_ADDR as CAN_ISOTP_RX_EXT_ADDR,
CAN_ISOTP_RX_PADDING as CAN_ISOTP_RX_PADDING,
CAN_ISOTP_RX_STMIN as CAN_ISOTP_RX_STMIN,
CAN_ISOTP_SF_BROADCAST as CAN_ISOTP_SF_BROADCAST,
CAN_ISOTP_TX_PADDING as CAN_ISOTP_TX_PADDING,
CAN_ISOTP_TX_STMIN as CAN_ISOTP_TX_STMIN,
CAN_ISOTP_WAIT_TX_DONE as CAN_ISOTP_WAIT_TX_DONE,
CAN_J1939 as CAN_J1939,
CAN_RAW as CAN_RAW,
CAN_RAW_ERR_FILTER as CAN_RAW_ERR_FILTER,
Expand Down Expand Up @@ -400,6 +427,7 @@
IPV6_CHECKSUM as IPV6_CHECKSUM,
IPV6_DONTFRAG as IPV6_DONTFRAG,
IPV6_DSTOPTS as IPV6_DSTOPTS,
IPV6_HDRINCL as IPV6_HDRINCL,
IPV6_HOPLIMIT as IPV6_HOPLIMIT,
IPV6_HOPOPTS as IPV6_HOPOPTS,
IPV6_JOIN_GROUP as IPV6_JOIN_GROUP,
Expand Down Expand Up @@ -575,6 +603,7 @@
SOL_ALG as SOL_ALG,
SOL_BLUETOOTH as SOL_BLUETOOTH,
SOL_CAN_BASE as SOL_CAN_BASE,
SOL_CAN_ISOTP as SOL_CAN_ISOTP,
SOL_CAN_RAW as SOL_CAN_RAW,
SOL_HCI as SOL_HCI,
SOL_IP as SOL_IP,
Expand Down
Loading