Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

# PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12"]
PYTHON_VERSIONS = ["3.9"]
MAJOR_TEXTUAL_VERSIONS = [3, 4, 5]
MAJOR_TEXTUAL_VERSIONS = [5.1]

##############
# NOX CONFIG #
Expand Down Expand Up @@ -62,18 +62,19 @@ def tests(session: nox.Session, ver: int) -> None:
external=True,
)

# running pip install after syncing will make it override any
# Running pip install after syncing will override any
# packages that were installed by the sync command.
# Calculate the next minor version for the upper bound
major, minor = str(ver).split(".")
next_minor = f"{major}.{int(minor)+1}"
session.run_install(
"uv", "pip", "install",
f"textual<{ver + 1}.0.0",
f"textual>={ver},<{next_minor}.0",
external=True,
)
session.run("uv", "pip", "show", "textual")
# EXPLANATION: The `ver + 1` is a trick to make UV
# only download the last version of each major revision of Textual.
# If the current version is 3, we're saying `install textual<4.0.0`.
# This will make UV grab the highest version of Textual 3.x.x, which is 3.7.1.
# EXPLANATION: This will install the latest patch release for the specified minor version series (e.g., 5.1.x, 5.3.x, etc.)
# by using textual>={ver},<{next_minor}.0. To test a new minor version, just add it to MAJOR_TEXTUAL_VERSIONS.
# The last `uv pip show textual` is just for logging purposes.

# These are all assuming you have corresponding
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [

dependencies = [
"ezpubsub>=0.2.0",
"textual>=3.0.0,<6.0.0",
"textual>=5.1.0,<6.0.0",
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion src/textual_window/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Textual and Rich imports
import textual.events as events
from textual._compose import compose # type: ignore[unused-ignore]
from textual.app import compose # type: ignore[attr-defined]
from textual.dom import check_identifiers
from textual.widget import Widget, AwaitMount
from textual.message import Message
Expand Down
1 change: 0 additions & 1 deletion tests/test_suite.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from typing import cast
from pathlib import Path
from textual.pilot import Pilot
from textual_window.demo import WindowDemo
Expand Down
Loading