From d2818795639c1a47d64053b58d94250766624f5c Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 1 Oct 2024 14:57:02 -0400 Subject: [PATCH 01/24] Drop python 3.8. Add python 3.13 --- .github/py-shiny/setup/action.yaml | 6 ------ .github/workflows/pytest.yaml | 8 +++----- pyproject.toml | 4 ++-- shiny/_datastructures.py | 2 -- shiny/_utils.py | 4 +--- shiny/render/_render.py | 3 --- tests/pytest/test_chat.py | 13 ++----------- 7 files changed, 8 insertions(+), 32 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index dfa398f9f..cb931fee4 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -39,12 +39,6 @@ runs: run: | make ci-install-wheel - - name: Install backports.tarfile - if: ${{ startsWith(inputs.python-version, '3.8') }} - shell: bash - run: | - uv pip install backports.tarfile - - name: Pip list shell: bash run: | diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 6775e2f21..f763aff36 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: # "3.10" must be a string; otherwise it is interpreted as 3.1. - python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"] + python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -108,7 +108,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"] + python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -118,8 +118,6 @@ jobs: - browser: ${{ github.event.pull_request.draft && 'webkit' }} # There are many unexplained tests that fail on webkit w/ python 3.8, 3.9 # Given the more recent versions of python work, we will exclude this combination - - browser: "webkit" - python-version: "3.8" - browser: "webkit" python-version: "3.9" fail-fast: false @@ -158,7 +156,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.12", "3.11", "3.10", "3.9", "3.8"] + python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} diff --git a/pyproject.toml b/pyproject.toml index 079839741..c63597cb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,18 +15,18 @@ dynamic = ["version"] authors = [{ name = "Winston Chang", email = "winston@posit.co" }] description = "A web development framework for Python." readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" license = { text = "MIT" } classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = [ "typing-extensions>=4.10.0", diff --git a/shiny/_datastructures.py b/shiny/_datastructures.py index f2ac287ef..2a243d418 100644 --- a/shiny/_datastructures.py +++ b/shiny/_datastructures.py @@ -15,8 +15,6 @@ class PriorityQueueFIFO(Generic[T]): """ def __init__(self) -> None: - # Using Tuple instead of tuple because in Python 3.8 and earlier, tuple isn't - # generic self._pq: PriorityQueue[tuple[int, int, T]] = PriorityQueue() self._counter: int = 0 diff --git a/shiny/_utils.py b/shiny/_utils.py index aff24044b..3f828b1a0 100644 --- a/shiny/_utils.py +++ b/shiny/_utils.py @@ -72,7 +72,7 @@ def sort_keys_length(x: dict[str, T], descending: bool = False) -> dict[str, T]: def guess_mime_type( - url: "str | os.PathLike[str]", + url: str | os.PathLike[str], default: str = "application/octet-stream", strict: bool = True, ) -> str: @@ -80,8 +80,6 @@ def guess_mime_type( Guess the MIME type of a file. This is a wrapper for mimetypes.guess_type, but it only returns the type (and not encoding), and it allows a default value. """ - # Note that in the parameters above, "os.PathLike[str]" is in quotes to avoid - # "TypeError: 'ABCMeta' object is not subscriptable", in Python<=3.8. if url: # Work around issue #1601, some installations of Windows 10 return text/plain # as the mime type for .js files diff --git a/shiny/render/_render.py b/shiny/render/_render.py index fd00d4af9..9d3d7b3c7 100644 --- a/shiny/render/_render.py +++ b/shiny/render/_render.py @@ -4,9 +4,6 @@ import os import sys import typing - -# `typing.Dict` sed for python 3.8 compatibility -# Can use `dict` in python >= 3.9 from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, Union, cast from htmltools import Tag, TagAttrValue, TagChild diff --git a/tests/pytest/test_chat.py b/tests/pytest/test_chat.py index c4d9d3e14..1f86e9694 100644 --- a/tests/pytest/test_chat.py +++ b/tests/pytest/test_chat.py @@ -1,6 +1,5 @@ from __future__ import annotations -import sys from datetime import datetime from typing import Union, cast, get_args, get_origin @@ -202,10 +201,6 @@ def test_langchain_normalization(): def test_google_normalization(): - # Not available for Python 3.8 - if sys.version_info < (3, 9): - return - from google.generativeai import ( # pyright: ignore[reportMissingTypeStubs] GenerativeModel, ) @@ -362,16 +357,12 @@ def test_as_anthropic_message(): def test_as_google_message(): - from shiny.ui._chat_provider_types import as_google_message - - # Not available for Python 3.8 - if sys.version_info < (3, 9): - return - from google.generativeai import ( # pyright: ignore[reportMissingTypeStubs] GenerativeModel, ) + from shiny.ui._chat_provider_types import as_google_message + generate_content = GenerativeModel.generate_content # type: ignore assert generate_content.__annotations__["contents"] == "content_types.ContentsType" From fdc685cdada242bcb5b512cd6366f9b53b57d953 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 1 Oct 2024 15:06:55 -0400 Subject: [PATCH 02/24] Update 3.13 python versions to 3.13-dev --- .github/py-shiny/setup/action.yaml | 2 +- .github/workflows/build-docs.yaml | 2 +- .github/workflows/pytest.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index cb931fee4..a4c8b2724 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -4,7 +4,7 @@ inputs: python-version: description: 'Python version to use' required: false - default: "3.12" + default: "3.13-dev" runs: using: "composite" steps: diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index f88b71ef9..c21454d0c 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12"] + python-version: ["3.13-dev"] fail-fast: false steps: diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index f763aff36..cdbdee7f7 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: # "3.10" must be a string; otherwise it is interpreted as 3.1. - python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13-dev", "3.12", "3.11", "3.10", "3.9"] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -108,7 +108,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13-dev", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -156,7 +156,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13-dev", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} From 21f1022ed5227af6c75d82d6f9d9cc7711e77f9f Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 1 Oct 2024 15:12:51 -0400 Subject: [PATCH 03/24] Remove `WrapAsync` code --- shiny/_utils.py | 54 ------------------------------ shiny/render/renderer/_renderer.py | 3 -- 2 files changed, 57 deletions(-) diff --git a/shiny/_utils.py b/shiny/_utils.py index 3f828b1a0..5b26bafdf 100644 --- a/shiny/_utils.py +++ b/shiny/_utils.py @@ -279,60 +279,6 @@ async def fn_async(*args: P.args, **kwargs: P.kwargs) -> R: return fn_async -# # TODO-barret-future; Q: Keep code? -# class WrapAsync(Generic[P, R]): -# """ -# Make a function asynchronous. - -# Parameters -# ---------- -# fn -# Function to make asynchronous. - -# Returns -# ------- -# : -# Asynchronous function (within the `WrapAsync` instance) -# """ - -# def __init__(self, fn: Callable[P, R] | Callable[P, Awaitable[R]]): -# if isinstance(fn, WrapAsync): -# fn = cast(WrapAsync[P, R], fn) -# return fn -# self._is_async = is_async_callable(fn) -# self._fn = wrap_async(fn) - -# async def __call__(self, *args: P.args, **kwargs: P.kwargs) -> R: -# """ -# Call the asynchronous function. -# """ -# return await self._fn(*args, **kwargs) - -# @property -# def is_async(self) -> bool: -# """ -# Was the original function asynchronous? - -# Returns -# ------- -# : -# Whether the original function is asynchronous. -# """ -# return self._is_async - -# @property -# def fn(self) -> Callable[P, R] | Callable[P, Awaitable[R]]: -# """ -# Retrieve the original function - -# Returns -# ------- -# : -# Original function supplied to the `WrapAsync` constructor. -# """ -# return self._fn - - # This function should generally be used in this code base instead of # `iscoroutinefunction()`. def is_async_callable( diff --git a/shiny/render/renderer/_renderer.py b/shiny/render/renderer/_renderer.py index b79009c91..ce3cf3e26 100644 --- a/shiny/render/renderer/_renderer.py +++ b/shiny/render/renderer/_renderer.py @@ -336,9 +336,6 @@ def _auto_register(self) -> None: self._auto_registered = True -# Not inheriting from `WrapAsync[[], IT]` as python 3.8 needs typing extensions that -# doesn't support `[]` for a ParamSpec definition. :-( Would be minimal/clean if we -# could do `class AsyncValueFn(WrapAsync[[], IT]):` class AsyncValueFn(Generic[IT]): """ App-supplied output value function which returns type `IT`. From 958b051cff214d4fc761b5c0939bc49092ee099e Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 1 Oct 2024 15:17:03 -0400 Subject: [PATCH 04/24] Use `3.13.0-rc.2` version --- .github/py-shiny/setup/action.yaml | 2 +- .github/workflows/build-docs.yaml | 2 +- .github/workflows/pytest.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index a4c8b2724..ed3046518 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -4,7 +4,7 @@ inputs: python-version: description: 'Python version to use' required: false - default: "3.13-dev" + default: "3.13.0-rc.2" runs: using: "composite" steps: diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index c21454d0c..634a08097 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.13-dev"] + python-version: ["3.13.0-rc.2"] fail-fast: false steps: diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index cdbdee7f7..68d289b47 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: # "3.10" must be a string; otherwise it is interpreted as 3.1. - python-version: ["3.13-dev", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13.0-rc.2", "3.12", "3.11", "3.10", "3.9"] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -108,7 +108,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.13-dev", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13.0-rc.2", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -156,7 +156,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.13-dev", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13.0-rc.2", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} From d07d067b01cbe39ebf3c9aafabf07ba6e561e87b Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 1 Oct 2024 15:23:57 -0400 Subject: [PATCH 05/24] Bump python version to 3.13.0-rc.3 Requires https://github.com/actions/python-versions/pull/308 Python 3.13 has been delayed until 2024-10-07 --- .github/py-shiny/setup/action.yaml | 2 +- .github/workflows/build-docs.yaml | 2 +- .github/workflows/pytest.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index ed3046518..f600354d8 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -4,7 +4,7 @@ inputs: python-version: description: 'Python version to use' required: false - default: "3.13.0-rc.2" + default: "3.13.0-rc.3" runs: using: "composite" steps: diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 634a08097..b0d610ee4 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.13.0-rc.2"] + python-version: ["3.13.0-rc.3"] fail-fast: false steps: diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 68d289b47..f0eec81e8 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: # "3.10" must be a string; otherwise it is interpreted as 3.1. - python-version: ["3.13.0-rc.2", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13.0-rc.3", "3.12", "3.11", "3.10", "3.9"] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -108,7 +108,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.13.0-rc.2", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13.0-rc.3", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -156,7 +156,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.13.0-rc.2", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13.0-rc.3", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} From 43fd1047ac87b31a1d81119d2f48c265adb0f97f Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 12:33:40 -0400 Subject: [PATCH 06/24] Try short version --- .github/py-shiny/setup/action.yaml | 2 +- .github/workflows/build-docs.yaml | 2 +- .github/workflows/pytest.yaml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index f600354d8..0c50c616e 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -4,7 +4,7 @@ inputs: python-version: description: 'Python version to use' required: false - default: "3.13.0-rc.3" + default: "3.13" runs: using: "composite" steps: diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index b0d610ee4..ab63cdd11 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.13.0-rc.3"] + python-version: ["3.13"] fail-fast: false steps: diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index f4519e8f0..8e4bf432a 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -17,7 +17,7 @@ jobs: strategy: matrix: # "3.10" must be a string; otherwise it is interpreted as 3.1. - python-version: ["3.13.0-rc.3", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] os: [ubuntu-latest, windows-latest, macOS-latest] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -107,7 +107,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.13.0-rc.3", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} @@ -155,7 +155,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python-version: ["3.13.0-rc.3", "3.12", "3.11", "3.10", "3.9"] + python-version: ["3.13", "3.12", "3.11", "3.10", "3.9"] browser: ["chromium", "firefox", "webkit"] exclude: - python-version: ${{ github.event.pull_request.draft && '3.11' }} From 8f9e8c1c103a657506de3c765e91f31bf4a4c0cd Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 12:38:42 -0400 Subject: [PATCH 07/24] Update pytest.yaml --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 8e4bf432a..a7cc6633e 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -73,7 +73,7 @@ jobs: with: fetch-depth: 0 - name: "Set up Python 3.10" - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.10" - name: Install dependencies From 257f7f6c919061ba694f9ffb02fdcbf8251c294d Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 12:38:53 -0400 Subject: [PATCH 08/24] Allow for pre-releases --- .github/py-shiny/setup/action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index 0c50c616e..812a186f0 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -12,6 +12,7 @@ runs: uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} + allow-prereleases: true - name: Upgrade `pip` shell: bash From cf723ec87a3b7a24d75e76c15ff02f7b24648cd9 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 12:44:13 -0400 Subject: [PATCH 09/24] try using pip for now. Revert commit later! --- .github/py-shiny/setup/action.yaml | 4 ++-- .github/workflows/build-docs.yaml | 2 +- .github/workflows/deploy-tests.yaml | 2 +- .github/workflows/pytest.yaml | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index 812a186f0..1435e27b8 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -33,12 +33,12 @@ runs: - name: Install dependencies shell: bash run: | - make ci-install-deps + make install-deps - name: Install shell: bash run: | - make ci-install-wheel + make install-wheel - name: Pip list shell: bash diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index ab63cdd11..dcd2b3987 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -38,7 +38,7 @@ jobs: - name: Install dependencies run: | - make ci-install-docs + make install-docs - name: Run quartodoc run: | diff --git a/.github/workflows/deploy-tests.yaml b/.github/workflows/deploy-tests.yaml index 24fdfa358..76547f56c 100644 --- a/.github/workflows/deploy-tests.yaml +++ b/.github/workflows/deploy-tests.yaml @@ -97,7 +97,7 @@ jobs: - name: Install rsconnect (GitHub) if: ${{ ! matrix.config.pypi_rsconnect }} run: | - make ci-install-rsconnect + make install-rsconnect - name: Test that deployable example apps work timeout-minutes: 5 # ~10s locally diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index a7cc6633e..510a23d62 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -58,10 +58,10 @@ jobs: run: | make check-format - - name: Verify code can run with mypy (not Windows) - if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' - run: | - make ci-check-mypy-can-run + # - name: Verify code can run with mypy (not Windows) + # if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' + # run: | + # make ci-check-mypy-can-run pypi: name: "Deploy to PyPI" From 5e7a61c616b39e7ce870936169bb7588da779b6b Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 12:53:56 -0400 Subject: [PATCH 10/24] Revert "try using pip for now. Revert commit later!" This reverts commit cf723ec87a3b7a24d75e76c15ff02f7b24648cd9. --- .github/py-shiny/setup/action.yaml | 4 ++-- .github/workflows/build-docs.yaml | 2 +- .github/workflows/deploy-tests.yaml | 2 +- .github/workflows/pytest.yaml | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index 1435e27b8..812a186f0 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -33,12 +33,12 @@ runs: - name: Install dependencies shell: bash run: | - make install-deps + make ci-install-deps - name: Install shell: bash run: | - make install-wheel + make ci-install-wheel - name: Pip list shell: bash diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index dcd2b3987..ab63cdd11 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -38,7 +38,7 @@ jobs: - name: Install dependencies run: | - make install-docs + make ci-install-docs - name: Run quartodoc run: | diff --git a/.github/workflows/deploy-tests.yaml b/.github/workflows/deploy-tests.yaml index 76547f56c..24fdfa358 100644 --- a/.github/workflows/deploy-tests.yaml +++ b/.github/workflows/deploy-tests.yaml @@ -97,7 +97,7 @@ jobs: - name: Install rsconnect (GitHub) if: ${{ ! matrix.config.pypi_rsconnect }} run: | - make install-rsconnect + make ci-install-rsconnect - name: Test that deployable example apps work timeout-minutes: 5 # ~10s locally diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 510a23d62..a7cc6633e 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -58,10 +58,10 @@ jobs: run: | make check-format - # - name: Verify code can run with mypy (not Windows) - # if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' - # run: | - # make ci-check-mypy-can-run + - name: Verify code can run with mypy (not Windows) + if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' + run: | + make ci-check-mypy-can-run pypi: name: "Deploy to PyPI" From 62d52ae4ae58ad11d220b09996a61ed74cb422b5 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 12:54:33 -0400 Subject: [PATCH 11/24] Update playwright as 1.43 depends on greenlet version that is incompatible with py3.13 --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eee37aa6e..b6637552a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,8 +57,8 @@ theme = ["libsass>=0.23.0"] test = [ "pytest>=6.2.4", "pytest-asyncio>=0.17.2", - "pytest-playwright>=0.3.0", - "playwright>=1.43.0", + "pytest-playwright>=0.5.2", + "playwright>=1.47.0", "pytest-xdist", "pytest-timeout", "pytest-rerunfailures", From 02e8f91ddb38a3548e5fc072c97a4695e9541827 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 12:57:19 -0400 Subject: [PATCH 12/24] Reapply "try using pip for now. Revert commit later!" This reverts commit 5e7a61c616b39e7ce870936169bb7588da779b6b. --- .github/py-shiny/setup/action.yaml | 4 ++-- .github/workflows/build-docs.yaml | 2 +- .github/workflows/deploy-tests.yaml | 2 +- .github/workflows/pytest.yaml | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index 812a186f0..1435e27b8 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -33,12 +33,12 @@ runs: - name: Install dependencies shell: bash run: | - make ci-install-deps + make install-deps - name: Install shell: bash run: | - make ci-install-wheel + make install-wheel - name: Pip list shell: bash diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index ab63cdd11..dcd2b3987 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -38,7 +38,7 @@ jobs: - name: Install dependencies run: | - make ci-install-docs + make install-docs - name: Run quartodoc run: | diff --git a/.github/workflows/deploy-tests.yaml b/.github/workflows/deploy-tests.yaml index 24fdfa358..76547f56c 100644 --- a/.github/workflows/deploy-tests.yaml +++ b/.github/workflows/deploy-tests.yaml @@ -97,7 +97,7 @@ jobs: - name: Install rsconnect (GitHub) if: ${{ ! matrix.config.pypi_rsconnect }} run: | - make ci-install-rsconnect + make install-rsconnect - name: Test that deployable example apps work timeout-minutes: 5 # ~10s locally diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index a7cc6633e..510a23d62 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -58,10 +58,10 @@ jobs: run: | make check-format - - name: Verify code can run with mypy (not Windows) - if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' - run: | - make ci-check-mypy-can-run + # - name: Verify code can run with mypy (not Windows) + # if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' + # run: | + # make ci-check-mypy-can-run pypi: name: "Deploy to PyPI" From 70dfdfa63b6f58eb65c9771193021857eb739fc9 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Mon, 7 Oct 2024 13:02:10 -0400 Subject: [PATCH 13/24] Revert "Reapply "try using pip for now. Revert commit later!"" This reverts commit 02e8f91ddb38a3548e5fc072c97a4695e9541827. --- .github/py-shiny/setup/action.yaml | 4 ++-- .github/workflows/build-docs.yaml | 2 +- .github/workflows/deploy-tests.yaml | 2 +- .github/workflows/pytest.yaml | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index 1435e27b8..812a186f0 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -33,12 +33,12 @@ runs: - name: Install dependencies shell: bash run: | - make install-deps + make ci-install-deps - name: Install shell: bash run: | - make install-wheel + make ci-install-wheel - name: Pip list shell: bash diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index dcd2b3987..ab63cdd11 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -38,7 +38,7 @@ jobs: - name: Install dependencies run: | - make install-docs + make ci-install-docs - name: Run quartodoc run: | diff --git a/.github/workflows/deploy-tests.yaml b/.github/workflows/deploy-tests.yaml index 76547f56c..24fdfa358 100644 --- a/.github/workflows/deploy-tests.yaml +++ b/.github/workflows/deploy-tests.yaml @@ -97,7 +97,7 @@ jobs: - name: Install rsconnect (GitHub) if: ${{ ! matrix.config.pypi_rsconnect }} run: | - make install-rsconnect + make ci-install-rsconnect - name: Test that deployable example apps work timeout-minutes: 5 # ~10s locally diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 510a23d62..a7cc6633e 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -58,10 +58,10 @@ jobs: run: | make check-format - # - name: Verify code can run with mypy (not Windows) - # if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' - # run: | - # make ci-check-mypy-can-run + - name: Verify code can run with mypy (not Windows) + if: steps.install.outcome == 'success' && (success() || failure()) && matrix.os != 'windows-latest' + run: | + make ci-check-mypy-can-run pypi: name: "Deploy to PyPI" From a304dba94a10dea8ea99840b84abd75bc594e6ab Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Thu, 10 Oct 2024 16:42:59 -0400 Subject: [PATCH 14/24] Remove `allow-prereleases: true` flag --- .github/py-shiny/setup/action.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/py-shiny/setup/action.yaml b/.github/py-shiny/setup/action.yaml index 812a186f0..0c50c616e 100644 --- a/.github/py-shiny/setup/action.yaml +++ b/.github/py-shiny/setup/action.yaml @@ -12,7 +12,6 @@ runs: uses: actions/setup-python@v5 with: python-version: ${{ inputs.python-version }} - allow-prereleases: true - name: Upgrade `pip` shell: bash From 5a84f697b0f5f51ee5a36a7250062758f819170b Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Thu, 10 Oct 2024 22:14:48 -0400 Subject: [PATCH 15/24] Use playwright version from github until next release --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index b6637552a..e9ffc16eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,7 +58,8 @@ test = [ "pytest>=6.2.4", "pytest-asyncio>=0.17.2", "pytest-playwright>=0.5.2", - "playwright>=1.47.0", + # "playwright>1.47.0", + "playwright@git+https://github.com/microsoft/playwright-python@main", "pytest-xdist", "pytest-timeout", "pytest-rerunfailures", From 4b8bb6aa0835f76f680cef6b5505146c7f7069f4 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 22 Oct 2024 09:47:22 -0400 Subject: [PATCH 16/24] Use playwright v1.48.0 w/ Py3.13 support --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index e9ffc16eb..867e63b12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,8 +58,7 @@ test = [ "pytest>=6.2.4", "pytest-asyncio>=0.17.2", "pytest-playwright>=0.5.2", - # "playwright>1.47.0", - "playwright@git+https://github.com/microsoft/playwright-python@main", + "playwright>=1.48.0", "pytest-xdist", "pytest-timeout", "pytest-rerunfailures", From 3db13c0dae98dc1fb4735808b912acea7b3b6f34 Mon Sep 17 00:00:00 2001 From: Carson Date: Wed, 26 Feb 2025 11:59:52 -0600 Subject: [PATCH 17/24] Don't install ray on pyton 3.13 --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index fcdc39225..aa9041319 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,8 @@ test = [ "ridgeplot", "great_tables", "modin[all]", + # ray doesn't currently support Python 3.13 + "ray;python_version<'3.13'", "polars", "dask[dataframe]", "pyarrow", From 42ee7a216d85849532e5c977eaf4d2923c9d8188 Mon Sep 17 00:00:00 2001 From: Carson Date: Wed, 26 Feb 2025 13:26:54 -0600 Subject: [PATCH 18/24] Do same for modin --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aa9041319..eebd338af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -90,7 +90,8 @@ test = [ "faicons", "ridgeplot", "great_tables", - "modin[all]", + # modin depends on ray, which doesn't support Python 3.13 + "modin[all];python_version<'3.13'", # ray doesn't currently support Python 3.13 "ray;python_version<'3.13'", "polars", From 40cc6daad011248a831d73776a36f667e25ab143 Mon Sep 17 00:00:00 2001 From: Carson Date: Wed, 26 Feb 2025 14:49:06 -0600 Subject: [PATCH 19/24] Undo test_chat changes --- tests/pytest/test_chat.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/pytest/test_chat.py b/tests/pytest/test_chat.py index 2f57c9ab8..2fca1a8ef 100644 --- a/tests/pytest/test_chat.py +++ b/tests/pytest/test_chat.py @@ -1,5 +1,6 @@ from __future__ import annotations +import sys from datetime import datetime from typing import Union, cast, get_args, get_origin @@ -385,8 +386,6 @@ def test_as_google_message(): GenerativeModel, ) - from shiny.ui._chat_provider_types import as_google_message - generate_content = GenerativeModel.generate_content # type: ignore assert generate_content.__annotations__["contents"] == "content_types.ContentsType" From b8b6d2446ef6d672eb5b1edc0e54ad6679aae4cc Mon Sep 17 00:00:00 2001 From: Karan Date: Thu, 6 Mar 2025 10:16:44 -0800 Subject: [PATCH 20/24] fix(tests): skip modin tests if python version == 3.13 (#1882) --- .../shiny/components/data_frame/data_type/app.py | 9 ++++++++- .../components/data_frame/data_type/test_df_data_type.py | 6 ++++++ tests/playwright/shiny/components/table/app.py | 9 ++++++++- tests/playwright/shiny/components/table/test_table.py | 6 ++++++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/tests/playwright/shiny/components/data_frame/data_type/app.py b/tests/playwright/shiny/components/data_frame/data_type/app.py index 50c76b952..e18ede0b0 100644 --- a/tests/playwright/shiny/components/data_frame/data_type/app.py +++ b/tests/playwright/shiny/components/data_frame/data_type/app.py @@ -1,6 +1,13 @@ from __future__ import annotations -import modin.pandas as mpd # pyright: ignore[reportMissingTypeStubs] +import sys + +# Remove this conditional once modin is supported on Python 3.13 +if sys.version_info < (3, 13): + import modin.pandas as mpd # pyright: ignore[reportMissingTypeStubs] +else: + raise RuntimeError("This test is not supported on Python 3.13") + import narwhals.stable.v1 as nw import palmerpenguins # pyright: ignore[reportMissingTypeStubs] import polars as pl diff --git a/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py b/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py index d3c24e130..ff131eac9 100644 --- a/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py +++ b/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py @@ -1,5 +1,7 @@ import re +import sys +import pytest from playwright.sync_api import Page from shiny.playwright import controller @@ -39,6 +41,10 @@ ] +@pytest.mark.skipif( + sys.version_info[:2] == (3, 13), + reason="Skipping on Python 3.13, since modin is not supported on 3.13", +) def test_data_frame_data_type( page: Page, local_app: ShinyAppProc, diff --git a/tests/playwright/shiny/components/table/app.py b/tests/playwright/shiny/components/table/app.py index 1a2a2a4e9..4b101bd4c 100644 --- a/tests/playwright/shiny/components/table/app.py +++ b/tests/playwright/shiny/components/table/app.py @@ -1,6 +1,13 @@ from __future__ import annotations -import modin.pandas as md # pyright: ignore[reportMissingTypeStubs] +import sys + +# Remove this conditional once modin is supported on Python 3.13 +if sys.version_info < (3, 13): + import modin.pandas as md # pyright: ignore[reportMissingTypeStubs] +else: + # This block executes for Python 3.13 and above + raise RuntimeError("This test is not supported on Python 3.13") import narwhals.stable.v1 as nw import palmerpenguins # pyright: ignore[reportMissingTypeStubs] diff --git a/tests/playwright/shiny/components/table/test_table.py b/tests/playwright/shiny/components/table/test_table.py index d04bcd39d..5b75b2d4e 100644 --- a/tests/playwright/shiny/components/table/test_table.py +++ b/tests/playwright/shiny/components/table/test_table.py @@ -1,11 +1,17 @@ import re +import sys +import pytest from playwright.sync_api import Page from shiny.playwright import controller from shiny.run import ShinyAppProc +@pytest.mark.skipif( + sys.version_info[:2] == (3, 13), + reason="Skipping on Python 3.13, since modin is not supported on 3.13", +) def test_table_data_support(page: Page, local_app: ShinyAppProc) -> None: page.goto(local_app.url) From a3f675b1ae3eec7e6c182218550cfb3409867e30 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 8 Apr 2025 01:25:35 -0400 Subject: [PATCH 21/24] Skip test w/ modin for anyting >= 3.13 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- tests/playwright/shiny/components/table/test_table.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/playwright/shiny/components/table/test_table.py b/tests/playwright/shiny/components/table/test_table.py index 5b75b2d4e..0f5f27f15 100644 --- a/tests/playwright/shiny/components/table/test_table.py +++ b/tests/playwright/shiny/components/table/test_table.py @@ -9,8 +9,8 @@ @pytest.mark.skipif( - sys.version_info[:2] == (3, 13), - reason="Skipping on Python 3.13, since modin is not supported on 3.13", + sys.version_info >= (3, 13), + reason="Skipping on Python 3.13 and above, since modin is not supported on these versions", ) def test_table_data_support(page: Page, local_app: ShinyAppProc) -> None: page.goto(local_app.url) From eae8fab103120abb12ea58c13573d78dcb5aef5d Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Tue, 22 Jul 2025 15:22:26 -0400 Subject: [PATCH 22/24] Remove the headache of modin --- pyproject.toml | 4 -- .../components/data_frame/data_type/app.py | 49 ------------------- .../data_frame/data_type/test_df_data_type.py | 12 ----- .../playwright/shiny/components/table/app.py | 20 ++------ .../shiny/components/table/test_table.py | 10 +--- 5 files changed, 7 insertions(+), 88 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 96e187845..307d230e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -87,10 +87,6 @@ test = [ "faicons", "ridgeplot", "great_tables", - # modin depends on ray, which doesn't support Python 3.13 - "modin[all];python_version<'3.13'", - # ray doesn't currently support Python 3.13 - "ray;python_version<'3.13'", "polars", "dask[dataframe]", "pyarrow", diff --git a/tests/playwright/shiny/components/data_frame/data_type/app.py b/tests/playwright/shiny/components/data_frame/data_type/app.py index e18ede0b0..ffcee1ff0 100644 --- a/tests/playwright/shiny/components/data_frame/data_type/app.py +++ b/tests/playwright/shiny/components/data_frame/data_type/app.py @@ -1,13 +1,5 @@ from __future__ import annotations -import sys - -# Remove this conditional once modin is supported on Python 3.13 -if sys.version_info < (3, 13): - import modin.pandas as mpd # pyright: ignore[reportMissingTypeStubs] -else: - raise RuntimeError("This test is not supported on Python 3.13") - import narwhals.stable.v1 as nw import palmerpenguins # pyright: ignore[reportMissingTypeStubs] import polars as pl @@ -19,7 +11,6 @@ nw_df = nw.from_native(pd_df, eager_only=True) pa_df = pa.table(pd_df) # pyright: ignore[reportUnknownMemberType] -mpd_df = mpd.DataFrame(pd_df) pl_df = pl.DataFrame(pd_df) @@ -145,46 +136,6 @@ def pa_data_view(): def pa_data_view_selected(): return str(type(pa_df_original.data_view(selected=True))) - with ui.card(): - ui.h2("Modin Data") - - @render.data_frame - def mpd_df_original(): - return render.DataGrid( - data=mpd_df, - selection_mode="row", - ) - - "Selected row:" - - @render.data_frame - def selected_mpd_row(): - return mpd_df_original.data_view(selected=True) - - "Data type:" - - @render.code - def mpd_type(): - return str(type(mpd_df)) - - ui.markdown("`.data()` type:") - - @render.code - def mpd_data(): - return str(type(mpd_df_original.data())) - - ui.markdown("`.data_view()` type:") - - @render.code - def mpd_data_view(): - return str(type(mpd_df_original.data_view())) - - ui.markdown("`.data_view(selected=True)` type:") - - @render.code - def mpd_data_view_selected(): - return str(type(mpd_df_original.data_view(selected=True))) - with ui.card(): ui.h2("Polars Data") diff --git a/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py b/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py index ff131eac9..c2dc8a1fe 100644 --- a/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py +++ b/tests/playwright/shiny/components/data_frame/data_type/test_df_data_type.py @@ -1,7 +1,5 @@ import re -import sys -import pytest from playwright.sync_api import Page from shiny.playwright import controller @@ -32,19 +30,9 @@ "df_original": "pl_df_original", "selected_row": "selected_pl_row", }, - { - "name": "modin", - "prefix": "mpd", - "df_original": "mpd_df_original", - "selected_row": "selected_mpd_row", - }, ] -@pytest.mark.skipif( - sys.version_info[:2] == (3, 13), - reason="Skipping on Python 3.13, since modin is not supported on 3.13", -) def test_data_frame_data_type( page: Page, local_app: ShinyAppProc, diff --git a/tests/playwright/shiny/components/table/app.py b/tests/playwright/shiny/components/table/app.py index 4b101bd4c..d2a5ee0e4 100644 --- a/tests/playwright/shiny/components/table/app.py +++ b/tests/playwright/shiny/components/table/app.py @@ -1,13 +1,5 @@ from __future__ import annotations -import sys - -# Remove this conditional once modin is supported on Python 3.13 -if sys.version_info < (3, 13): - import modin.pandas as md # pyright: ignore[reportMissingTypeStubs] -else: - # This block executes for Python 3.13 and above - raise RuntimeError("This test is not supported on Python 3.13") import narwhals.stable.v1 as nw import palmerpenguins # pyright: ignore[reportMissingTypeStubs] @@ -17,8 +9,6 @@ nw_df = nw.from_native(pd_df, eager_only=True) -md_df = md.DataFrame(pd_df) - with ui.card(): ui.h2("Polars Pandas Data") @@ -36,14 +26,14 @@ def nw_df_type(): with ui.card(): - ui.h2("Modin dataframe Data") + ui.h2("Pandas dataframe Data") @render.table - def md_table(): - return md_df + def pd_table(): + return pd_df "Data type:" @render.code - def md_df_type(): - return str(type(md_df)) + def pd_df_type(): + return str(type(pd_df)) diff --git a/tests/playwright/shiny/components/table/test_table.py b/tests/playwright/shiny/components/table/test_table.py index 0f5f27f15..f86d56e18 100644 --- a/tests/playwright/shiny/components/table/test_table.py +++ b/tests/playwright/shiny/components/table/test_table.py @@ -1,22 +1,16 @@ import re -import sys -import pytest from playwright.sync_api import Page from shiny.playwright import controller from shiny.run import ShinyAppProc -@pytest.mark.skipif( - sys.version_info >= (3, 13), - reason="Skipping on Python 3.13 and above, since modin is not supported on these versions", -) def test_table_data_support(page: Page, local_app: ShinyAppProc) -> None: page.goto(local_app.url) controller.OutputTable(page, "nw_table").expect_nrow(2) controller.OutputCode(page, "nw_df_type").expect_value(re.compile("narwhals")) - controller.OutputTable(page, "md_table").expect_nrow(2) - controller.OutputCode(page, "md_df_type").expect_value(re.compile("modin")) + controller.OutputTable(page, "pd_table").expect_nrow(2) + controller.OutputCode(page, "pd_df_type").expect_value(re.compile("pandas")) From 25eeeed23d48e5f1809bd1fc01f78af558d884f7 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 23 Jul 2025 16:42:44 -0400 Subject: [PATCH 23/24] remove build-docs version matrix. Just use variable once --- .github/workflows/build-docs.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 8d1d3c037..29c35894e 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -13,10 +13,6 @@ on: jobs: build-docs: runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.13"] - fail-fast: false steps: - uses: actions/checkout@v4 @@ -26,7 +22,7 @@ jobs: - name: Setup py-shiny uses: ./.github/py-shiny/setup with: - python-version: ${{ matrix.python-version }} + python-version: "3.13" # ===================================================== # API docs From bdbd3185311c2739f2b14a30e2f0343cda5241b9 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Wed, 23 Jul 2025 16:43:39 -0400 Subject: [PATCH 24/24] Revert "remove build-docs version matrix. Just use variable once" This reverts commit 25eeeed23d48e5f1809bd1fc01f78af558d884f7. --- .github/workflows/build-docs.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml index 29c35894e..8d1d3c037 100644 --- a/.github/workflows/build-docs.yaml +++ b/.github/workflows/build-docs.yaml @@ -13,6 +13,10 @@ on: jobs: build-docs: runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.13"] + fail-fast: false steps: - uses: actions/checkout@v4 @@ -22,7 +26,7 @@ jobs: - name: Setup py-shiny uses: ./.github/py-shiny/setup with: - python-version: "3.13" + python-version: ${{ matrix.python-version }} # ===================================================== # API docs