Skip to content
Merged
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
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,14 @@ jobs:
# lsp: 'http://download.pctools.com/mirror/updates/9.0.0.2308-SDavfree-lite_en.exe'
# lsp_extract_file: ''
# extra_name: ', with non-IFS LSP'

# ***REMEMBER*** to remove the 3.14 line once windows+cffi works again
continue-on-error: >-
${{
(
endsWith(matrix.python, '-dev')
|| endsWith(matrix.python, '-nightly')
|| matrix.python == '3.14'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it's cleaner to use 3.14-dev because it's implied that we should change it back once 3.14 stable is released.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still fails but then it's allowed to. (I think that run failed because the Ubuntu and MacOS failures, not the Windows one)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still fails but then it's allowed to. (I think that run failed because the Ubuntu and MacOS failures, not the Windows one)

uh, this is the error:

Version 3.14-dev.0-alpha - 3.14-dev.X was not found in the local cache
Error: The version '3.14-dev.0-alpha - 3.14-dev.X' with architecture 'x86' was not found for Windows 2022.

Copy link
Contributor

@A5rocks A5rocks May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I wasn't able to see the logs. We should probably remove that logic near setup-python(I think it's only there because legacy) but for now this new thing is fine too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're very right, I confused myself from some git blameing.

But regardless, let's just merge this as is to unblock other PRs and we can possibly clean this up later?

Copy link
Member

@webknjaz webknjaz May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't like that allow-prereleases input of actions/setup-python and use 3.14-dev or more often ~3.14.0-0 to have it represent that it's not yet stable explicitly.

One day, I'll show you my reusable-tox.yml thing which will simplify this by a lot...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think allow-prereleases is fine, since basically it saves some unnecessary churn (we should be pretty sure Trio will not need changes before switching 3.14-dev to 3.14) and allows marking some versions as allowed to fail just based on the version scheme.

Is there a trap to be aware of?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's just that you're forced to keep updating the conditional on this line which is disconnected from the version string, even though they are tightly coupled through the concept of pre-releases. That's two places to keep in sync already with a visually unobvious link. This is what I consider mental overhead. The same churn just worse.

Having "allow-failures" in the same identifier allows being intentional about expecting a version to fail or not.

Copy link
Contributor

@A5rocks A5rocks May 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be clear the only reason we had to update the conditional on this line is because some other legacy logic -- we don't actually have allow-prereleases but instead some text interpolation to emulate the effects. The downside of the text interpolation is that we can't support 3.14-dev, so we if switched to allow-prereleases we would have the same behavior as currently except that 3.14-dev would work.

And then since we have a continue-on-error we can use the version identifier to signal whether failure is allowed (3.14-dev will allow failure, 3.14 won't). This way we can actually make use of the fact that Python tries not to break anything after they start releasing betas (by switching to 3.14) while not having to switch the identifier whenever a stable version comes out.

)
&& true
|| false
Expand Down Expand Up @@ -387,11 +390,13 @@ jobs:
- python: '3.9' # We support running on cython 2 and 3 for 3.9
cython: '<3' # cython 2
- python: '3.9'
cython: '>=3' # cython 3 (or greater)
# cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865
cython: '>=3,<3.1' # cython 3 (or greater)
- python: '3.11' # 3.11 is the last version Cy2 supports
cython: '<3' # cython 2
- python: '3.13' # We support running cython3 on 3.13
cython: '>=3' # cython 3 (or greater)
# cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865
cython: '>=3,<3.1' # cython 3 (or greater)
steps:
- name: Retrieve the project source from an sdist inside the GHA artifact
uses: re-actors/checkout-python-sdist@release/v2
Expand Down
6 changes: 6 additions & 0 deletions src/trio/_core/_tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,13 @@ async def main() -> None:
gc_collect_harder()


# This segfaults, so we need to skipif. Remember to remove the skipif once
# the upstream issue is resolved.
@restore_unraisablehook()
@pytest.mark.skipif(
sys.version_info[:3] == (3, 14, 0),
reason="https://github.com/python/cpython/issues/133932",
)
def test_error_in_run_loop() -> None:
# Blow stuff up real good to check we at least get a TrioInternalError
async def main() -> None:
Expand Down
10 changes: 10 additions & 0 deletions src/trio/_tests/test_exports.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,11 @@ def iter_modules(
# won't be reflected in trio.socket, and this shouldn't cause downstream test
# runs to start failing.
@pytest.mark.redistributors_should_skip
@pytest.mark.skipif(
sys.version_info[:4] == (3, 14, 0, "beta"),
# 12 pass, 16 fail
reason="several tools don't support 3.14",
)
# Static analysis tools often have trouble with alpha releases, where Python's
# internals are in flux, grammar may not have settled down, etc.
@pytest.mark.skipif(
Expand Down Expand Up @@ -243,6 +248,11 @@ def no_underscores(symbols: Iterable[str]) -> set[str]:
@slow
# see comment on test_static_tool_sees_all_symbols
@pytest.mark.redistributors_should_skip
@pytest.mark.skipif(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here

sys.version_info[:4] == (3, 14, 0, "beta"),
# 2 passes, 12 fails
reason="several tools don't support 3.14.0",
)
# Static analysis tools often have trouble with alpha releases, where Python's
# internals are in flux, grammar may not have settled down, etc.
@pytest.mark.skipif(
Expand Down
3 changes: 2 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ commands =
[testenv:py39-cython2,py39-cython,py311-cython2,py313-cython]
description = "Run cython tests."
deps =
cython
# cython 3.1.0 broke stuff https://github.com/cython/cython/issues/6865
cython: cython<3.1.0
cython2: cython<3
setuptools ; python_version >= '3.12'
commands_pre =
Expand Down
Loading