Skip to content

Commit 75678cf

Browse files
committed
Drop Python 3.9 support and add Python 3.14 support
Update minimum required Python version to 3.10 in pyproject.toml and scripts. Add Python 3.14 to supported/tested versions in CI workflows and remove Python 3.9 from all relevant matrices and classifiers. Remove test skip logic for Python 3.9 where no longer needed.
1 parent 631be6f commit 75678cf

File tree

5 files changed

+17
-24
lines changed

5 files changed

+17
-24
lines changed

.github/py-shiny/setup/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
python-version:
55
description: 'Python version to use'
66
required: false
7-
default: "3.13"
7+
default: "3.14"
88
runs:
99
using: "composite"
1010
steps:

.github/workflows/pytest.yaml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ jobs:
1717
strategy:
1818
matrix:
1919
# "3.10" must be a string; otherwise it is interpreted as 3.1.
20-
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
20+
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]
2121
os: [ubuntu-latest, windows-latest, macOS-latest]
2222
exclude:
23+
- python-version: ${{ github.event.pull_request.draft && '3.14' }}
24+
- python-version: ${{ github.event.pull_request.draft && '3.13' }}
2325
- python-version: ${{ github.event.pull_request.draft && '3.12' }}
2426
- python-version: ${{ github.event.pull_request.draft && '3.11' }}
2527
- python-version: ${{ github.event.pull_request.draft && '3.10' }}
26-
- python-version: ${{ github.event.pull_request.draft && '3.9' }}
2728
- os: ${{ github.event.pull_request.draft && 'windows-latest' }}
2829
- os: ${{ github.event.pull_request.draft && 'macOS-latest' }}
2930

@@ -108,19 +109,16 @@ jobs:
108109
runs-on: ubuntu-latest
109110
strategy:
110111
matrix:
111-
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
112+
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]
112113
browser: ["chromium", "firefox", "webkit"]
113114
exclude:
115+
- python-version: ${{ github.event.pull_request.draft && '3.14' }}
116+
- python-version: ${{ github.event.pull_request.draft && '3.13' }}
114117
- python-version: ${{ github.event.pull_request.draft && '3.12' }}
115118
- python-version: ${{ github.event.pull_request.draft && '3.11' }}
116119
- python-version: ${{ github.event.pull_request.draft && '3.10' }}
117-
- python-version: ${{ github.event.pull_request.draft && '3.9' }}
118120
- browser: ${{ github.event.pull_request.draft && 'firefox' }}
119121
- browser: ${{ github.event.pull_request.draft && 'webkit' }}
120-
# There are many unexplained tests that fail on webkit w/ python 3.8, 3.9
121-
# Given the more recent versions of python work, we will exclude this combination
122-
- browser: "webkit"
123-
python-version: "3.9"
124122
fail-fast: false
125123

126124
steps:
@@ -157,13 +155,14 @@ jobs:
157155
runs-on: ubuntu-latest
158156
strategy:
159157
matrix:
160-
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
158+
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]
161159
browser: ["chromium", "firefox", "webkit"]
162160
exclude:
161+
- python-version: ${{ github.event.pull_request.draft && '3.14' }}
162+
- python-version: ${{ github.event.pull_request.draft && '3.13' }}
163163
- python-version: ${{ github.event.pull_request.draft && '3.12' }}
164164
- python-version: ${{ github.event.pull_request.draft && '3.11' }}
165165
- python-version: ${{ github.event.pull_request.draft && '3.10' }}
166-
- python-version: ${{ github.event.pull_request.draft && '3.9' }}
167166
- browser: ${{ github.event.pull_request.draft && 'firefox' }}
168167
- browser: ${{ github.event.pull_request.draft && 'webkit' }}
169168
fail-fast: false
@@ -201,8 +200,6 @@ jobs:
201200
path: py-shiny-templates
202201

203202
- name: Install py-shiny-templates dependencies
204-
if: matrix.python-version != '3.9'
205-
# Scikit-learn 1.7.0+ requires Python 3.10+
206203
run: |
207204
make ci-install-py-shiny-templates-deps
208205
@@ -222,13 +219,14 @@ jobs:
222219
runs-on: ubuntu-latest
223220
strategy:
224221
matrix:
225-
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
222+
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10"]
226223
browser: ["chromium", "firefox", "webkit"]
227224
exclude:
225+
- python-version: ${{ github.event.pull_request.draft && '3.14' }}
226+
- python-version: ${{ github.event.pull_request.draft && '3.13' }}
228227
- python-version: ${{ github.event.pull_request.draft && '3.12' }}
229228
- python-version: ${{ github.event.pull_request.draft && '3.11' }}
230229
- python-version: ${{ github.event.pull_request.draft && '3.10' }}
231-
- python-version: ${{ github.event.pull_request.draft && '3.9' }}
232230
- browser: ${{ github.event.pull_request.draft && 'firefox' }}
233231
- browser: ${{ github.event.pull_request.draft && 'webkit' }}
234232
fail-fast: false

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ dynamic = ["version"]
1515
authors = [{ name = "Winston Chang", email = "[email protected]" }]
1616
description = "A web development framework for Python."
1717
readme = "README.md"
18-
requires-python = ">=3.9"
18+
requires-python = ">=3.10"
1919
license = { text = "MIT" }
2020
classifiers = [
2121
"Development Status :: 5 - Production/Stable",
2222
"Intended Audience :: Developers",
2323
"License :: OSI Approved :: MIT License",
2424
"Natural Language :: English",
25-
"Programming Language :: Python :: 3.9",
2625
"Programming Language :: Python :: 3.10",
2726
"Programming Language :: Python :: 3.11",
2827
"Programming Language :: Python :: 3.12",
2928
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
3030
]
3131
dependencies = [
3232
"typing-extensions>=4.10.0",

scripts/generate-imports.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
from types import ModuleType
66
from typing import Union, cast
77

8-
if sys.version_info < (3, 9):
9-
raise RuntimeError("This script requires Python 3.9 or later")
8+
if sys.version_info < (3, 10):
9+
raise RuntimeError("This script requires Python 3.10 or later")
1010

1111

1212
def gen_init_py(package_name: str) -> None:

tests/playwright/shiny/components/data_frame/pandas_compatible/test_df_pandas_compatible.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import re
22

33
from playwright.sync_api import Page
4-
from utils.deploy_utils import skip_on_python_version
54

65
from shiny.playwright import controller
76
from shiny.run import ShinyAppProc
87

98

10-
@skip_on_python_version(
11-
"3.9",
12-
reason="Astropy (and numpy) hav difficulty loading on python 3.9. posit-dev/py-shiny#1678",
13-
)
149
def test_data_frame_pandas_compatible(
1510
page: Page,
1611
local_app: ShinyAppProc,

0 commit comments

Comments
 (0)