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
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
os:
- ubuntu-24.04
python-version:
- "3.10"
- "3.11"
- "3.13"
fail-fast: true

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/python-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
env:
# renovate: datasource=python-version depName=python
PYTHON_VERSION: "3.14"
MIN_PYTHON_VERSION: "3.10"
MIN_PYTHON_VERSION: "3.11"
# renovate: datasource=pypi depName=flake8
FLAKE8_VERSION: "7.3.0"
# renovate: datasource=pypi depName=pylint
Expand Down Expand Up @@ -111,8 +111,7 @@ jobs:
pipx install "flake8==${FLAKE8_VERSION}"
pipx install "pylint==${PYLINT_VERSION}"
pipx inject pylint -r .github/workflows/python_requirements.txt -r .github/workflows/optional_requirements.txt
# The extra toml is only needed before Python 3.11
pipx install "bandit[sarif,toml]==${BANDIT_VERSION}"
pipx install "bandit[sarif]==${BANDIT_VERSION}"

- name: Run Flake8
run: |
Expand Down
2 changes: 1 addition & 1 deletion REQUIREMENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for other platforms you may have to install some of them.
- **GDAL/OGR >= 3.7** for import and export of most external raster and
vector map formats
GDAL: [https://gdal.org](https://gdal.org)
- **Python >= 3.10** (for temporal framework, scripts, wxGUI, and ctypes interface)
- **Python >= 3.11** (for temporal framework, scripts, wxGUI, and ctypes interface)
[https://www.python.org](https://www.python.org)
- **MkDocs** with "Material" theme Python packages for the manual pages:
See `man/mkdocs/requirements.txt`.
Expand Down
2 changes: 1 addition & 1 deletion lib/init/grass.py
Original file line number Diff line number Diff line change
Expand Up @@ -2439,7 +2439,7 @@ def main() -> None:
fatal(e.args[0])
sys.exit(_("Exiting..."))

start_time = datetime.datetime.now(datetime.timezone.utc)
start_time = datetime.datetime.now(datetime.UTC)

# unlock the mapset which is current at the time of turning off
# in case mapset was changed
Expand Down
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]
name = "grass"
requires-python = ">=3.10"
requires-python = ">=3.11"
# *GRASS TODO: keep in sync with MIN_PYTHON_VERSION supported*

[tool.black]
line-length = 88
required-version = '25'
target-version = ['py310', 'py311', 'py312', 'py313', 'py314']
target-version = ['py311', 'py312', 'py313', 'py314']
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
(
Expand Down Expand Up @@ -603,7 +603,7 @@ load-plugins = [
# version used to run pylint.
# *GRASS modified*
# *GRASS TODO: keep in sync with MIN_PYTHON_VERSION supported*
py-version = "3.10"
py-version = "3.11"

# Add paths to the list of the source roots. Supports globbing patterns. The
# source root is an absolute path or a path relative to the current working
Expand Down Expand Up @@ -880,12 +880,12 @@ include = ["python"]

# *GRASS modified*
# *GRASS TODO: keep in sync with MIN_PYTHON_VERSION supported*
pythonVersion = "3.10"
pythonVersion = "3.11"

[tool.pyrefact]
line_length = 88

[tool.isort]
profile = "black"
# *GRASS TODO: keep in sync with MIN_PYTHON_VERSION supported*
py_version = 310
py_version = 311
4 changes: 2 additions & 2 deletions python/grass/script/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ class SessionHandle:
def __init__(self, *, env, active=True, locked=False):
self._env = env
self._active = active
self._start_time = datetime.datetime.now(datetime.timezone.utc)
self._start_time = datetime.datetime.now(datetime.UTC)
self._locked = locked

@property
Expand Down Expand Up @@ -563,7 +563,7 @@ def clean_default_db(*, modified_after=None, env=None, gis_env=None):
return
if modified_after:
modified_time = datetime.datetime.fromtimestamp(
file_stat.st_mtime, tz=datetime.timezone.utc
file_stat.st_mtime, tz=datetime.UTC
)
if modified_after >= modified_time:
return
Expand Down
12 changes: 1 addition & 11 deletions utils/mkdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,7 @@ def format_git_commit_date_from_local_git(

:return str: output formatted commit datetime
"""
try:
date = datetime.fromisoformat(
commit_datetime,
)
except ValueError:
if commit_datetime.endswith("Z"):
# Python 3.10 and older does not support Z in time, while recent versions
# of Git (2.45.1) use it. Try to help the parsing if Z is in the string.
date = datetime.fromisoformat(commit_datetime[:-1] + "+00:00")
else:
raise
date = datetime.fromisoformat(commit_datetime)
return date.strftime(datetime_format)


Expand Down
Loading