-
Notifications
You must be signed in to change notification settings - Fork 111
Drop Python 3.9 #602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Drop Python 3.9 #602
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #602 +/- ##
==========================================
- Coverage 46.24% 46.21% -0.03%
==========================================
Files 19 19
Lines 1875 1876 +1
Branches 294 294
==========================================
Hits 867 867
- Misses 893 894 +1
Partials 115 115 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3bd2bfa to
1627ce1
Compare
uv run ruff check . --fix --show-fixes
Building libtmux @ file:///home/d/work/python/libtmux
Built libtmux @ file:///home/d/work/python/libtmux
Uninstalled 1 package in 0.43ms
Installed 1 package in 0.65ms
B905 `zip()` without an explicit `strict=` parameter
--> src/libtmux/_internal/query_list.py:495:25
|
494 | if len(self) == len(data):
495 | for a, b in zip(self, data):
| ^^^^^^^^^^^^^^^
496 | if isinstance(a, Mapping):
497 | a_keys = a.keys()
|
help: Add explicit value for parameter `strict=`
UP007 Use `X | Y` for type annotations
--> src/libtmux/_vendor/version.py:24:17
|
22 | __all__ = ["VERSION_PATTERN", "InvalidVersion", "Version", "parse"]
23 |
24 | InfiniteTypes = t.Union[InfinityType, NegativeInfinityType]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25 | PrePostDevType = t.Union[InfiniteTypes, tuple[str, int]]
26 | SubLocalType = t.Union[InfiniteTypes, int, str]
|
help: Convert to `X | Y`
UP007 Use `X | Y` for type annotations
--> src/libtmux/_vendor/version.py:25:18
|
24 | InfiniteTypes = t.Union[InfinityType, NegativeInfinityType]
25 | PrePostDevType = t.Union[InfiniteTypes, tuple[str, int]]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
26 | SubLocalType = t.Union[InfiniteTypes, int, str]
27 | LocalType = t.Union[
|
help: Convert to `X | Y`
UP007 Use `X | Y` for type annotations
--> src/libtmux/_vendor/version.py:26:16
|
24 | InfiniteTypes = t.Union[InfinityType, NegativeInfinityType]
25 | PrePostDevType = t.Union[InfinityTypes, tuple[str, int]]
26 | SubLocalType = t.Union[InfiniteTypes, int, str]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
27 | LocalType = t.Union[
28 | NegativeInfinityType,
|
help: Convert to `X | Y`
UP007 Use `X | Y` for type annotations
--> src/libtmux/_vendor/version.py:27:13
|
25 | PrePostDevType = t.Union[InfiniteTypes, tuple[str, int]]
26 | SubLocalType = t.Union[InfiniteTypes, int, str]
27 | LocalType = t.Union[
| _____________^
28 | | NegativeInfinityType,
29 | | tuple[
30 | | SubLocalType | tuple[SubLocalType, str] | tuple[NegativeInfinityType, SubLocalType],
31 | | ...,
32 | | ],
33 | | ]
| |^
34 | CmpKey = tuple[
35 | int,
|
help: Convert to `X | Y`
E501 Line too long (92 > 88)
--> src/libtmux/_vendor/version.py:30:89
|
28 | NegativeInfinityType,
29 | tuple[
30 | SubLocalType | tuple[SubLocalType, str] | tuple[NegativeInfinityType, SubLocalType],
| ^^^^
31 | ...,
32 | ],
|
UP045 Use `X | None` for type annotations
--> src/libtmux/neo.py:16:21
|
14 | if t.TYPE_CHECKING:
15 | ListCmd = t.Literal["list-sessions", "list-windows", "list-panes"]
16 | ListExtraArgs = t.Optional[Iterable[str]]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
17 |
18 | from libtmux.server import Server
|
help: Convert to `X | None`
B905 `zip()` without an explicit `strict=` parameter
--> src/libtmux/neo.py:227:14
|
226 | obj_formatters = [
227 | dict(zip(formats, formatter.split(FORMAT_SEPARATOR)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
228 | for formatter in obj_output
229 | ]
|
help: Add explicit value for parameter `strict=`
B905 `zip()` without an explicit `strict=` parameter
--> src/libtmux/pane.py:707:32
|
705 | pane_output = pane_cmd.stdout[0]
706 |
707 | pane_formatters = dict(zip(["pane_id"], pane_output.split(FORMAT_SEPARATOR)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
708 |
709 | return self.from_pane_id(server=self.server, pane_id=pane_formatters["pane_id"])
|
help: Add explicit value for parameter `strict=`
UP036 Version block is outdated for minimum Python version
--> src/libtmux/server.py:41:8
|
39 | from libtmux._internal.types import StrPath
40 |
41 | if sys.version_info >= (3, 10):
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
42 | from typing import Self, TypeAlias
43 | else:
|
help: Remove outdated version block
B905 `zip()` without an explicit `strict=` parameter
--> src/libtmux/server.py:585:13
|
584 | session_formatters = dict(
585 | zip(["session_id"], session_stdout.split(formats.FORMAT_SEPARATOR)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
586 | )
|
help: Add explicit value for parameter `strict=`
B905 `zip()` without an explicit `strict=` parameter
--> src/libtmux/session.py:734:13
|
733 | window_formatters = dict(
734 | zip(["window_id"], window_output.split(FORMAT_SEPARATOR)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
735 | )
|
help: Add explicit value for parameter `strict=`
UP036 Version block is outdated for minimum Python version
--> tests/legacy_api/test_version.py:17:8
|
15 | from collections.abc import Callable
16 |
17 | if sys.version_info >= (3, 10):
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 | from typing import TypeAlias
19 | else:
|
help: Remove outdated version block
UP045 Use `X | None` for type annotations
--> tests/test_dataclasses.py:25:21
|
24 | ListCmd = t.Literal["list-sessions", "list-windows", "list-panes"]
25 | ListExtraArgs = t.Optional[tuple[str]]
| ^^^^^^^^^^^^^^^^^^^^^^
|
help: Convert to `X | None`
UP036 Version block is outdated for minimum Python version
--> tests/test_version.py:17:8
|
15 | from collections.abc import Callable
16 |
17 | if sys.version_info >= (3, 10):
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
18 | from typing import TypeAlias
19 | else:
|
help: Remove outdated version block
Fixed 7 errors:
- src/libtmux/_internal/types.py:
1 × I001 (unsorted-imports)
1 × UP035 (deprecated-import)
- src/libtmux/_vendor/version.py:
1 × UP007 (non-pep604-annotation-union)
- src/libtmux/server.py:
1 × I001 (unsorted-imports)
1 × UP035 (deprecated-import)
- tests/legacy_api/test_version.py:
1 × UP035 (deprecated-import)
- tests/test_version.py:
1 × UP035 (deprecated-import)
Found 22 errors (7 fixed, 15 remaining).
No fixes available (8 hidden fixes can be enabled with the `--unsafe-fixes` option).
- replace remaining Optional/Union patterns with PEP 604 unions aligned to the new baseline - guard typing_extensions imports under TYPE_CHECKING while dropping obsolete version branches - add explicit strict=False to zip-based format parsing to satisfy Ruff B905 uv run ruff check . --fix --show-fixes uv run ruff format . uv run mypy uv run py.test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Drop Python 3.9
EOL of 2025-10-31.
See also: