Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/downstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
repository: python-poetry/poetry
ref: ${{ matrix.ref }}

- name: Set up Python 3.10
- name: Set up Python 3.14
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: "3.10"
python-version: "3.14"

- name: Get full python version
id: full-python-version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
python-version: ["3.11", "3.12", "3.13", "3.14"]
include:
- os: Ubuntu
image: ubuntu-24.04
Expand Down
1 change: 1 addition & 0 deletions news/556.removal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for Python 3.9 and 3.10
155 changes: 5 additions & 150 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "poetry.core.masonry.api"
name = "cleo"
version = "3.0.0.dev0"
description = "Cleo allows you to create beautiful and testable command-line interfaces."
requires-python = ">=3.9"
requires-python = ">=3.11"
authors = [
{ name = "Sébastien Eustace", email = "sebastien@eustace.io" }
]
Expand Down Expand Up @@ -63,7 +63,7 @@ docs = [

[tool.ruff]
fix = true
target-version = "py39"
target-version = "py311"
line-length = 88
extend-exclude = [
"docs/*",
Expand Down
7 changes: 1 addition & 6 deletions src/cleo/io/outputs/stream_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@ def _get_utf8_support_info(self) -> bool:
"""
Returns whether the stream supports the UTF-8 encoding.
"""
if self._stream.encoding:
encoding = self._stream.encoding
elif sys.version_info < (3, 11):
encoding = locale.getpreferredencoding(False)
else:
encoding = locale.getencoding()
encoding = self._stream.encoding or locale.getencoding()

try:
return codecs.lookup(encoding).name == "utf-8"
Expand Down
7 changes: 3 additions & 4 deletions src/cleo/ui/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from copy import deepcopy
from itertools import repeat
from typing import TYPE_CHECKING
from typing import Union
from typing import cast

from cleo.formatters.formatter import Formatter
Expand All @@ -23,8 +22,8 @@

from cleo.io.io import IO

Row = list[Union[str, TableCell]]
Rows = list[Union[Row, TableSeparator]]
Row = list[str | TableCell]
Rows = list[Row | TableSeparator]
Header = Row


Expand Down Expand Up @@ -648,7 +647,7 @@ def _calculate_column_widths(self, rows: Rows) -> None:
for position, content in enumerate(content_columns):
try:
row_[i + position] = content
except IndexError: # noqa: PERF203
except IndexError:
row_.append(content)

lengths.append(self._get_cell_width(row_, column))
Expand Down
2 changes: 1 addition & 1 deletion src/cleo/ui/table_cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@


if TYPE_CHECKING:
from typing_extensions import Self
from typing import Self

from cleo.ui.table_cell_style import TableCellStyle

Expand Down
Loading