Skip to content

Commit c4010fc

Browse files
committed
Merge branch 'main' of github.com:python-trio/trio into dont-use-f_locals-for-agen-finalization
2 parents fc1f5bb + 21ea257 commit c4010fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+303
-258
lines changed

.github/workflows/autodeps.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
- name: Setup python
2525
uses: actions/setup-python@v5
2626
with:
27-
python-version: "3.8"
27+
python-version: "3.9"
2828

2929
- name: Bump dependencies
3030
run: |
3131
python -m pip install -U pip pre-commit
3232
python -m pip install -r test-requirements.txt
33-
uv pip compile --universal --python-version=3.8 --upgrade test-requirements.in -o test-requirements.txt
33+
uv pip compile --universal --python-version=3.9 --upgrade test-requirements.in -o test-requirements.txt
3434
uv pip compile --universal --python-version=3.11 --upgrade docs-requirements.in -o docs-requirements.txt
3535
pre-commit autoupdate --jobs 0
3636
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: uv
4545
run: |
46-
uv pip compile --universal --python-version=3.8 test-requirements.in -o test-requirements.txt
46+
uv pip compile --universal --python-version=3.9 test-requirements.in -o test-requirements.txt
4747
uv pip compile --universal --python-version=3.11 docs-requirements.in -o docs-requirements.txt
4848
4949
- name: Commit changes and create automerge PR

.github/workflows/ci.yml

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
python: ['pypy-3.10', '3.8', '3.9', '3.10', '3.11', '3.12']
21+
python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13']
2222
arch: ['x86', 'x64']
2323
lsp: ['']
2424
lsp_extract_file: ['']
2525
extra_name: ['']
2626
include:
27-
- python: '3.8'
27+
- python: '3.9'
2828
arch: 'x64'
2929
lsp: 'https://raw.githubusercontent.com/python-trio/trio-ci-assets/master/komodia-based-vpn-setup.zip'
3030
lsp_extract_file: 'komodia-based-vpn-setup.exe'
3131
extra_name: ', with Komodia LSP'
32-
- python: '3.8'
32+
- python: '3.9'
3333
arch: 'x64'
3434
lsp: 'https://www.proxifier.com/download/legacy/ProxifierSetup342.exe'
3535
lsp_extract_file: ''
3636
extra_name: ', with IFS LSP'
37-
#- python: '3.8'
37+
#- python: '3.9'
3838
# arch: 'x64'
3939
# lsp: 'http://download.pctools.com/mirror/updates/9.0.0.2308-SDavfree-lite_en.exe'
4040
# lsp_extract_file: ''
@@ -87,16 +87,16 @@ jobs:
8787
strategy:
8888
fail-fast: false
8989
matrix:
90-
python: ['pypy-3.10', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
90+
python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13']
9191
check_formatting: ['0']
9292
no_test_requirements: ['0']
9393
extra_name: ['']
9494
include:
95-
- python: '3.12'
95+
- python: '3.13'
9696
check_formatting: '1'
9797
extra_name: ', check formatting'
9898
# separate test run that doesn't install test-requirements.txt
99-
- python: '3.8'
99+
- python: '3.9'
100100
no_test_requirements: '1'
101101
extra_name: ', no test-requirements'
102102
continue-on-error: >-
@@ -143,7 +143,7 @@ jobs:
143143
strategy:
144144
fail-fast: false
145145
matrix:
146-
python: ['pypy-3.10', '3.8', '3.9', '3.10', '3.11', '3.12']
146+
python: ['pypy-3.10', '3.9', '3.10', '3.11', '3.12', '3.13']
147147
continue-on-error: >-
148148
${{
149149
(
@@ -203,7 +203,15 @@ jobs:
203203
strategy:
204204
fail-fast: false
205205
matrix:
206-
python: ['3.8', '3.12']
206+
include:
207+
- python: '3.9' # We support running on cython 2 and 3 for 3.9
208+
cython: '<3' # cython 2
209+
- python: '3.9'
210+
cython: '>=3' # cython 3 (or greater)
211+
- python: '3.11' # 3.11 is the last version Cy2 supports
212+
cython: '<3' # cython 2
213+
- python: '3.13' # We support running cython3 on 3.13
214+
cython: '>=3' # cython 3 (or greater)
207215
steps:
208216
- name: Checkout
209217
uses: actions/checkout@v4
@@ -216,18 +224,11 @@ jobs:
216224
- name: install trio and setuptools
217225
run: python -m pip install --upgrade pip . setuptools
218226

219-
- name: install cython<3
220-
run: python -m pip install "cython<3"
221-
- name: compile pyx file
222-
run: cythonize -i tests/cython/test_cython.pyx
223-
- name: import & run module
224-
run: python -c 'import tests.cython.test_cython'
227+
- name: install cython & compile pyx file
228+
run: |
229+
python -m pip install "cython${{ matrix.cython }}"
230+
cythonize --inplace tests/cython/test_cython.pyx
225231
226-
- name: install cython>=3
227-
run: python -m pip install "cython>=3"
228-
- name: compile pyx file
229-
# different cython version should trigger a re-compile, but --force just in case
230-
run: cythonize --inplace --force tests/cython/test_cython.pyx
231232
- name: import & run module
232233
run: python -c 'import tests.cython.test_cython'
233234

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v4
1313
- uses: actions/setup-python@v5
1414
with:
15-
python-version: "3.8"
15+
python-version: "3.9"
1616
- run: python -m pip install build
1717
- run: python -m build
1818

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ demonstration of implementing the "Happy Eyeballs" algorithm in an
9292
older library versus Trio.
9393

9494
**Cool, but will it work on my system?** Probably! As long as you have
95-
some kind of Python 3.8-or-better (CPython or `currently maintained versions of
95+
some kind of Python 3.9-or-better (CPython or `currently maintained versions of
9696
PyPy3 <https://doc.pypy.org/en/latest/faq.html#which-python-versions-does-pypy-implement>`__
9797
are both fine), and are using Linux, macOS, Windows, or FreeBSD, then Trio
9898
will work. Other environments might work too, but those

check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ fi
7878

7979
# Check pip compile is consistent
8080
echo "::group::Pip Compile - Tests"
81-
uv pip compile --universal --python-version=3.8 test-requirements.in -o test-requirements.txt
81+
uv pip compile --universal --python-version=3.9 test-requirements.in -o test-requirements.txt
8282
echo "::endgroup::"
8383
echo "::group::Pip Compile - Docs"
8484
uv pip compile --universal --python-version=3.11 docs-requirements.in -o docs-requirements.txt

docs-requirements.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
sphinx >= 6.0
44
jinja2
55
# >= is necessary to prevent `uv` from selecting a `Sphinx` version this does not support
6-
sphinx_rtd_theme >= 2
6+
sphinx_rtd_theme >= 3
77
sphinxcontrib-jquery
88
sphinxcontrib-trio
99
towncrier

docs-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ sphinx-codeautolink==0.15.2
7979
# via -r docs-requirements.in
8080
sphinx-hoverxref==1.4.1
8181
# via -r docs-requirements.in
82-
sphinx-rtd-theme==2.0.0
82+
sphinx-rtd-theme==3.0.0
8383
# via -r docs-requirements.in
8484
sphinxcontrib-applehelp==2.0.0
8585
# via sphinx

docs/source/conf.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,13 @@ def setup(app: Sphinx) -> None:
201201
app.connect("source-read", on_read_source)
202202

203203

204+
# Our docs use the READTHEDOCS variable, so copied from:
205+
# https://about.readthedocs.com/blog/2024/07/addons-by-default/
206+
if os.environ.get("READTHEDOCS", "") == "True":
207+
if "html_context" not in globals():
208+
html_context = {}
209+
html_context["READTHEDOCS"] = True
210+
204211
# -- General configuration ------------------------------------------------
205212

206213
# If your documentation needs a minimal Sphinx version, state it here.
@@ -374,10 +381,7 @@ def add_mapping(
374381
# We have to set this ourselves, not only because it's useful for local
375382
# testing, but also because if we don't then RTD will throw away our
376383
# html_theme_options.
377-
import sphinx_rtd_theme
378-
379384
html_theme = "sphinx_rtd_theme"
380-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
381385

382386
# Theme options are theme-specific and customize the look and feel of a theme
383387
# further. For a list of options available for each theme, see the

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Vital statistics:
4545

4646
* Supported environments: We test on
4747

48-
- Python: 3.8+ (CPython and PyPy)
48+
- Python: 3.9+ (CPython and PyPy)
4949
- Windows, macOS, Linux (glibc and musl), FreeBSD
5050

5151
Other environments might also work; give it a try and see.

docs/source/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Okay, ready? Let's get started.
8888
Before you begin
8989
----------------
9090

91-
1. Make sure you're using Python 3.8 or newer.
91+
1. Make sure you're using Python 3.9 or newer.
9292

9393
2. ``python3 -m pip install --upgrade trio`` (or on Windows, maybe
9494
``py -3 -m pip install --upgrade trio`` – `details

0 commit comments

Comments
 (0)