Skip to content

Commit a7d3779

Browse files
committed
Update MINIMUM_PYTHON_VERSION to 3.11.0.
1 parent 1ee5cc5 commit a7d3779

File tree

8 files changed

+15
-14
lines changed

8 files changed

+15
-14
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
python-version: ["3.10", "3.11", "3.12"]
13+
python-version: ["3.11", "3.12"]
1414

1515
steps:
1616

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ pyyaml >= 5.4.1
66
requests >= 2.18.4
77
rich >= 6.2.0
88
rich-argparse >= 1.0.0
9-
typing_extensions >= 4.0.0

rubisco/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,11 @@
1818
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1919

2020
"""C++ Plus repository distributing, packaging and initialization utilities."""
21+
22+
import sys
23+
24+
from rubisco.config import MINIMUM_PYTHON_VERSION
25+
from rubisco.lib.version import Version
26+
27+
if Version(sys.version_info) < MINIMUM_PYTHON_VERSION:
28+
sys.exit(f"Python {MINIMUM_PYTHON_VERSION} or newer is required.")

rubisco/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# Application basic configurations.
3232
APP_NAME = "rubisco"
3333
APP_VERSION = Version((0, 1, 0))
34-
MINIMUM_PYTHON_VERSION = Version((3, 10, 0))
34+
MINIMUM_PYTHON_VERSION = Version((3, 11, 0))
3535

3636
# I18n configurations.
3737
TEXT_DOMAIN = APP_NAME

rubisco/lib/fileutil.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@
2626
import sys
2727
import tempfile
2828
from pathlib import Path
29-
from typing import TYPE_CHECKING
30-
31-
from typing_extensions import Self
29+
from typing import TYPE_CHECKING, Self
3230

3331
from rubisco.config import APP_NAME
3432
from rubisco.lib.exceptions import RUOSError, RUShellExecutionError

rubisco/lib/variable.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
from platform import uname
2929
from queue import Empty, LifoQueue
3030
from time import monotonic as time
31-
from typing import TYPE_CHECKING, Any, overload
32-
33-
from typing_extensions import Self
31+
from typing import TYPE_CHECKING, Any, Self, overload
3432

3533
from rubisco.config import APP_VERSION, RUBISCO_COMMAND
3634
from rubisco.lib.l10n import _

rubisco/lib/version.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
from __future__ import annotations
2323

2424
import re
25-
from typing import overload
26-
27-
from typing_extensions import Self
25+
from typing import Self, overload
2826

2927
__all__ = ["Version"]
3028

ruff.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ line-length = 80
3333

3434
indent-width = 4
3535

36-
# Assume Python 3.10
37-
target-version = "py310"
36+
# Assume Python 3.11
37+
target-version = "py311"
3838

3939
[lint]
4040
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.

0 commit comments

Comments
 (0)