Skip to content

Commit d281879

Browse files
committed
Drop python 3.8. Add python 3.13
1 parent 31eabe8 commit d281879

File tree

7 files changed

+8
-32
lines changed

7 files changed

+8
-32
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ runs:
3939
run: |
4040
make ci-install-wheel
4141
42-
- name: Install backports.tarfile
43-
if: ${{ startsWith(inputs.python-version, '3.8') }}
44-
shell: bash
45-
run: |
46-
uv pip install backports.tarfile
47-
4842
- name: Pip list
4943
shell: bash
5044
run: |

.github/workflows/pytest.yaml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
# "3.10" must be a string; otherwise it is interpreted as 3.1.
20-
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
20+
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
2121
os: [ubuntu-latest, windows-latest, macOS-latest]
2222
exclude:
2323
- python-version: ${{ github.event.pull_request.draft && '3.11' }}
@@ -108,7 +108,7 @@ jobs:
108108
runs-on: ubuntu-latest
109109
strategy:
110110
matrix:
111-
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
111+
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
112112
browser: ["chromium", "firefox", "webkit"]
113113
exclude:
114114
- python-version: ${{ github.event.pull_request.draft && '3.11' }}
@@ -118,8 +118,6 @@ jobs:
118118
- browser: ${{ github.event.pull_request.draft && 'webkit' }}
119119
# There are many unexplained tests that fail on webkit w/ python 3.8, 3.9
120120
# Given the more recent versions of python work, we will exclude this combination
121-
- browser: "webkit"
122-
python-version: "3.8"
123121
- browser: "webkit"
124122
python-version: "3.9"
125123
fail-fast: false
@@ -158,7 +156,7 @@ jobs:
158156
runs-on: ubuntu-20.04
159157
strategy:
160158
matrix:
161-
python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"]
159+
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"]
162160
browser: ["chromium", "firefox", "webkit"]
163161
exclude:
164162
- python-version: ${{ github.event.pull_request.draft && '3.11' }}

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.8"
18+
requires-python = ">=3.9"
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.8",
2625
"Programming Language :: Python :: 3.9",
2726
"Programming Language :: Python :: 3.10",
2827
"Programming Language :: Python :: 3.11",
2928
"Programming Language :: Python :: 3.12",
29+
"Programming Language :: Python :: 3.13",
3030
]
3131
dependencies = [
3232
"typing-extensions>=4.10.0",

shiny/_datastructures.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ class PriorityQueueFIFO(Generic[T]):
1515
"""
1616

1717
def __init__(self) -> None:
18-
# Using Tuple instead of tuple because in Python 3.8 and earlier, tuple isn't
19-
# generic
2018
self._pq: PriorityQueue[tuple[int, int, T]] = PriorityQueue()
2119
self._counter: int = 0
2220

shiny/_utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,14 @@ def sort_keys_length(x: dict[str, T], descending: bool = False) -> dict[str, T]:
7272

7373

7474
def guess_mime_type(
75-
url: "str | os.PathLike[str]",
75+
url: str | os.PathLike[str],
7676
default: str = "application/octet-stream",
7777
strict: bool = True,
7878
) -> str:
7979
"""
8080
Guess the MIME type of a file. This is a wrapper for mimetypes.guess_type, but it
8181
only returns the type (and not encoding), and it allows a default value.
8282
"""
83-
# Note that in the parameters above, "os.PathLike[str]" is in quotes to avoid
84-
# "TypeError: 'ABCMeta' object is not subscriptable", in Python<=3.8.
8583
if url:
8684
# Work around issue #1601, some installations of Windows 10 return text/plain
8785
# as the mime type for .js files

shiny/render/_render.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
import os
55
import sys
66
import typing
7-
8-
# `typing.Dict` sed for python 3.8 compatibility
9-
# Can use `dict` in python >= 3.9
107
from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, Union, cast
118

129
from htmltools import Tag, TagAttrValue, TagChild

tests/pytest/test_chat.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from __future__ import annotations
22

3-
import sys
43
from datetime import datetime
54
from typing import Union, cast, get_args, get_origin
65

@@ -202,10 +201,6 @@ def test_langchain_normalization():
202201

203202

204203
def test_google_normalization():
205-
# Not available for Python 3.8
206-
if sys.version_info < (3, 9):
207-
return
208-
209204
from google.generativeai import ( # pyright: ignore[reportMissingTypeStubs]
210205
GenerativeModel,
211206
)
@@ -362,16 +357,12 @@ def test_as_anthropic_message():
362357

363358

364359
def test_as_google_message():
365-
from shiny.ui._chat_provider_types import as_google_message
366-
367-
# Not available for Python 3.8
368-
if sys.version_info < (3, 9):
369-
return
370-
371360
from google.generativeai import ( # pyright: ignore[reportMissingTypeStubs]
372361
GenerativeModel,
373362
)
374363

364+
from shiny.ui._chat_provider_types import as_google_message
365+
375366
generate_content = GenerativeModel.generate_content # type: ignore
376367

377368
assert generate_content.__annotations__["contents"] == "content_types.ContentsType"

0 commit comments

Comments
 (0)