Skip to content

Commit 44846cf

Browse files
authored
Drop support for Python 3.9. (#707)
1 parent 8ba2a5b commit 44846cf

File tree

64 files changed

+148
-875
lines changed

Some content is hidden

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

64 files changed

+148
-875
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
fail-fast: false
4040
matrix:
4141
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
42-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
42+
python-version: ['3.10', '3.11', '3.12', '3.13']
4343

4444
steps:
4545
- uses: actions/checkout@v5
@@ -63,7 +63,7 @@ jobs:
6363
uses: codecov/codecov-action@v5
6464

6565
- name: Run tests with lowest resolution
66-
if: matrix.python-version == '3.9' && matrix.os == 'ubuntu-latest'
66+
if: matrix.python-version == '3.10' && matrix.os == 'ubuntu-latest'
6767
run: just test-lowest
6868

6969
- name: Run tests with highest resolution

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ releases are available on [PyPI](https://pypi.org/project/pytask) and
1010
- {pull}`703` fixes {issue}`701` by allowing `--capture tee-sys` again.
1111
- {pull}`704` adds the `--explain` flag to show why tasks would be executed. Closes {issue}`466`.
1212
- {pull}`706` disables syntax highlighting for platform version information in session header.
13+
- {pull}`707` drops support for Python 3.9 as it has reached end of life.
1314

1415
## 0.5.5 - 2025-07-25
1516

docs/source/_static/md/pdb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Platform: win32 -- Python 3.12.0, pytask 0.5.3, pluggy 1.3.0
88
Root: C:\Users\pytask-dev\git\my_project
99
Collected 1 task.
1010

11-
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
11+
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Traceback >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1212
<span style="color: #f14c4c">╭───────────────────</span><span style="color: #f14c4c; font-weight: bold;"> Traceback </span><span style="color: #6c1e1e; font-weight: bold">(most recent call last)</span><span style="color: #f14c4c"> ─────────────────╮</span>
1313
<span style="color: #f14c4c">│</span> <span style="color: #f14c4c">│</span>
1414
<span style="color: #f14c4c">│</span> <span style="color: #e5e510">.../task_data_preparation.py</span>:<span style="color: var(--termynal-blue)">23</span> in <span style="color: #23d18b">task_create_random_data</span> <span style="color: #f14c4c">│</span>
@@ -24,7 +24,7 @@ Collected 1 task.
2424
<span style="color: #f14c4c; font-weight: bold;">Exception</span>
2525

2626
>>>>>>>>>>>>>>>> PDB post_mortem (IO-capturing turned off) >>>>>>>>>>>>>>
27-
> ...\git\my_project\task_data_preparation.py(23)task_create_random_data()
27+
> ...\my_project\task_data_preparation.py(23)task_create_random_data()
2828
-> raise Exception
2929
<span data-ty="input" data-ty-prompt="(Pdb)" data-ty-cursor="▋"></span>
3030

docs/source/_static/md/show-locals.md

Lines changed: 34 additions & 34 deletions
Large diffs are not rendered by default.

docs/source/_static/md/trace.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
```console
44

55
$ pytask --trace
6-
──────────────────────────── Start pytask session ────────────────────────────
6+
────────────────────────── Start pytask session ─────────────────────────
77
Platform: win32 -- Python 3.12.0, pytask 0.5.3, pluggy 1.3.0
88
Root: C:\Users\pytask-dev\git\my_project
99
Collected 1 task.
1010

11-
>>>>>>>>>>>>>>>>>> PDB runcall (IO-capturing turned off) >>>>>>>>>>>>>>>>>>
11+
>>>>>>>>>>>>>>>>>> PDB runcall (IO-capturing turned off) >>>>>>>>>>>>>>>>
1212

13-
> ...\git\my_project\task_create_random_data.py(13)task_create_random_data()
13+
> ...\my_project\task_create_random_data.py(13)task_create_random_data()
1414
-> rng = np.random.default_rng(0)
1515
<span data-ty="input" data-ty-prompt="(Pdb)" data-ty-cursor="▋"></span>
1616

docs/source/how_to_guides/capture_warnings.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,5 @@ and then run `pytask`.
8787
Or, you use a temporary environment variable. Here is an example for bash.
8888

8989
```console
90-
PYTHONWARNINGS=error pytask --pdb
91-
```
92-
93-
and here for Powershell
94-
95-
```console
96-
$env:PYTHONWARNINGS = 'error'
97-
pytask
98-
Remove-Item env:\PYTHONWARNINGS
90+
$ PYTHONWARNINGS=error pytask --pdb
9991
```

docs/source/how_to_guides/hashing_inputs_of_tasks.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,19 @@ If an input is not parsed by any more specific node type, the general
1111
In the following example, the argument `text` will be parsed as a
1212
{class}`~pytask.PythonNode`.
1313

14-
`````{tab-set}
15-
16-
````{tab-item} Python 3.10+
17-
1814
```{literalinclude} ../../../docs_src/how_to_guides/hashing_inputs_of_tasks_example_1_py310.py
1915
```
2016

21-
````
22-
`````
23-
2417
By default, pytask does not detect changes in {class}`~pytask.PythonNode` and if the
2518
value would change (without changing the task module), pytask would not rerun the task.
2619

2720
We can also hash the value of {class}`~pytask.PythonNode` s so that pytask knows when
2821
the input changed. For that, we need to use the {class}`~pytask.PythonNode` explicitly
2922
and set `hash = True`.
3023

31-
`````{tab-set}
32-
33-
````{tab-item} Python 3.10+
34-
3524
```{literalinclude} ../../../docs_src/how_to_guides/hashing_inputs_of_tasks_example_2_py310.py
3625
```
3726

38-
````
39-
`````
40-
4127
When `hash=True`, pytask will call the builtin {func}`hash` on the input that will call
4228
the `__hash__()` method of the object.
4329

@@ -75,12 +61,5 @@ $ conda install deepdiff
7561
Then, create the hash function and pass it to the node. Make sure it returns either an
7662
integer or a string.
7763

78-
`````{tab-set}
79-
80-
````{tab-item} Python 3.10+
81-
8264
```{literalinclude} ../../../docs_src/how_to_guides/hashing_inputs_of_tasks_example_3_py310.py
8365
```
84-
85-
````
86-
`````

docs/source/how_to_guides/provisional_nodes_and_task_generators.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ as the task module because it is a relative path.
2525

2626
```{literalinclude} ../../../docs_src/how_to_guides/provisional_products.py
2727
---
28-
emphasize-lines: 4, 22
28+
emphasize-lines: 6, 23
2929
---
3030
```
3131

@@ -57,7 +57,7 @@ downloaded.
5757

5858
```{literalinclude} ../../../docs_src/how_to_guides/provisional_task.py
5959
---
60-
emphasize-lines: 9
60+
emphasize-lines: 4, 9
6161
---
6262
```
6363

@@ -86,6 +86,9 @@ The code snippet shows each task takes one of the downloaded files and copies it
8686
content to a `.txt` file.
8787

8888
```{literalinclude} ../../../docs_src/how_to_guides/provisional_task_generator.py
89+
---
90+
emphasize-lines: 4, 11
91+
---
8992
```
9093

9194
```{important}

docs/source/how_to_guides/using_task_returns.md

Lines changed: 6 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,14 @@ defines where the return of the function, a string, should be stored.
1818

1919
`````{tab-set}
2020
21-
````{tab-item} Python 3.10+
22-
:sync: python310plus
21+
````{tab-item} Annotated
22+
:sync: annotated
2323
2424
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_1_py310.py
2525
```
2626
2727
````
2828
29-
````{tab-item} Python 3.9
30-
:sync: python38plus
31-
32-
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_1_py38.py
33-
```
34-
35-
````
3629
`````
3730

3831
It works because internally the path is converted to a {class}`pytask.PathNode` that is
@@ -60,22 +53,14 @@ of the previous interfaces.
6053

6154
`````{tab-set}
6255
63-
````{tab-item} Python 3.10+
64-
:sync: python310plus
56+
````{tab-item} Annotated
57+
:sync: annotated
6558
6659
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_3_py310.py
6760
```
6861
6962
````
7063
71-
````{tab-item} Python 3.9
72-
:sync: python38plus
73-
74-
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_3_py38.py
75-
```
76-
77-
````
78-
7964
````{tab-item} @pytask.task
8065
8166
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_3_task.py
@@ -95,22 +80,14 @@ mapped to the defined nodes.
9580

9681
`````{tab-set}
9782
98-
````{tab-item} Python 3.10+
99-
:sync: python310plus
83+
````{tab-item} Annotated
84+
:sync: annotated
10085
10186
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_4_py310.py
10287
```
10388
10489
````
10590
106-
````{tab-item} Python 3.9
107-
:sync: python38plus
108-
109-
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_4_py38.py
110-
```
111-
112-
````
113-
11491
````{tab-item} @pytask.task
11592
11693
```{literalinclude} ../../../docs_src/how_to_guides/using_task_returns_example_4_task.py

docs/source/how_to_guides/writing_custom_nodes.md

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -26,37 +26,22 @@ The result will be the following task.
2626

2727
`````{tab-set}
2828
29-
````{tab-item} Python 3.10+
30-
:sync: python310plus
29+
````{tab-item} Annotated
30+
:sync: annotated
3131
3232
```{literalinclude} ../../../docs_src/how_to_guides/writing_custom_nodes_example_2_py310.py
3333
```
3434
3535
````
3636
37-
````{tab-item} Python 3.10+ & Return
38-
:sync: python310plus
37+
````{tab-item} Annotated & Return
38+
:sync: annotated
3939
4040
```{literalinclude} ../../../docs_src/how_to_guides/writing_custom_nodes_example_2_py310_return.py
4141
```
4242
4343
````
4444
45-
````{tab-item} Python 3.9
46-
:sync: python38plus
47-
48-
```{literalinclude} ../../../docs_src/how_to_guides/writing_custom_nodes_example_2_py38.py
49-
```
50-
51-
````
52-
53-
````{tab-item} Python 3.9 & Return
54-
:sync: python38plus
55-
56-
```{literalinclude} ../../../docs_src/how_to_guides/writing_custom_nodes_example_2_py38_return.py
57-
```
58-
59-
````
6045
`````
6146

6247
## Nodes
@@ -79,21 +64,14 @@ we arrive at the following class.
7964

8065
`````{tab-set}
8166
82-
````{tab-item} Python 3.10+
83-
:sync: python310plus
67+
````{tab-item} Annotated
68+
:sync: annotated
8469
8570
```{literalinclude} ../../../docs_src/how_to_guides/writing_custom_nodes_example_3_py310.py
8671
```
8772
8873
````
8974
90-
````{tab-item} Python 3.9
91-
:sync: python38plus
92-
93-
```{literalinclude} ../../../docs_src/how_to_guides/writing_custom_nodes_example_3_py38.py
94-
```
95-
96-
````
9775
`````
9876

9977
Here are some explanations.

0 commit comments

Comments
 (0)