Skip to content

Commit de5962e

Browse files
committed
Merge branch 'release/v3.7.0'
2 parents c4a3471 + 4124930 commit de5962e

19 files changed

Lines changed: 160 additions & 127 deletions

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
strategy:
4747
matrix:
4848
os: [ubuntu-latest, macos-latest, windows-latest]
49-
python-version: ['3.9', '3.10', '3.11', '3.12']
49+
python-version: ['3.10', '3.11', '3.12']
5050

5151
steps:
5252
- uses: actions/checkout@v4.2.2

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Build Status](https://github.com/szaghi/FoBiS/actions/workflows/python-package.yml/badge.svg)](https://github.com/szaghi/FoBiS/actions)
88
[![codecov](https://codecov.io/gh/szaghi/FoBiS/graph/badge.svg)](https://codecov.io/gh/szaghi/FoBiS)
99
[![GitHub issues](https://img.shields.io/github/issues/szaghi/FoBiS.svg)]()
10-
[![Supported Python versions](https://img.shields.io/badge/Py-%203.9,%203.10,%203.11,%203.12-blue.svg)]()
10+
[![Supported Python versions](https://img.shields.io/badge/Py-%203.10,%203.11,%203.12-blue.svg)]()
1111

1212
[![License](https://img.shields.io/badge/license-GNU%20GeneraL%20Public%20License%20v3,%20GPLv3-blue.svg)]()
1313

docs/guide/changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to FoBiS.py are documented here.
44
Versions follow [Semantic Versioning](https://semver.org/).
55
Format follows [Keep a Changelog](https://keepachangelog.com/).
66

7+
## [3.7.0] — 2026-03-16
8+
### Changed
9+
- Drop Python 3.9, modernize type hints to PEP 604/585 syntax ⚠ BREAKING CHANGE
10+
11+
712
## [3.6.13] — 2026-03-16
813
### Fixed
914
- **cli**: Resolve ruff lint failures in fobis/cli sub-package

docs/guide/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ build ─┘ (3 OS × 4 Python versions)
119119
|-----|---------|----------------|
120120
| `lint` | ubuntu, Python 3.12 | `ruff check` + `ruff format --check` |
121121
| `test` | ubuntu, Python 3.12 + gfortran | full `pytest` suite |
122-
| `build` | ubuntu / macOS / Windows × Python 3.9–3.12 | `pip install -e .` + entry-point smoke test |
122+
| `build` | ubuntu / macOS / Windows × Python 3.10–3.12 | `pip install -e .` + entry-point smoke test |
123123
| `publish` | ubuntu, Python 3.12 | builds wheel/sdist, pushes to PyPI via OIDC |
124124

125125
`publish` only runs when the commit is a `v*` tag **and** all three other jobs pass.

docs/guide/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Requirements
44

5-
- **Python** 3.9 or later
5+
- **Python** 3.10 or later
66
- **A Fortran compiler** in `PATH` (e.g. `gfortran`, `ifort`, `ifx`)
77
- [**Typer**](https://typer.tiangolo.com/) — installed automatically as a dependency (provides the CLI and shell completion)
88
- Optional: [PreForM.py](https://github.com/szaghi/PreForM) for source preprocessing

fobis/Builder.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import operator
3131
import os
3232
from collections.abc import Callable
33-
from typing import Any, Optional
33+
from typing import Any
3434

3535
from .Compiler import Compiler
3636
from .utils import check_results, print_fake, safe_mkdir, syswork, syswork_steps
@@ -42,8 +42,8 @@ class Builder:
4242
def __init__(
4343
self,
4444
cliargs: Any,
45-
print_n: Optional[Callable[..., None]] = None,
46-
print_w: Optional[Callable[..., None]] = None,
45+
print_n: Callable[..., None] | None = None,
46+
print_w: Callable[..., None] | None = None,
4747
) -> None:
4848
"""
4949
Parameters
@@ -644,10 +644,10 @@ def gnu_make(self) -> str:
644644
def build(
645645
self,
646646
file_to_build: Any,
647-
output: Optional[str] = None,
648-
nomodlibs: Optional[list[str]] = None,
649-
submodules: Optional[list[str]] = None,
650-
mklib: Optional[str] = None,
647+
output: str | None = None,
648+
nomodlibs: list[str] | None = None,
649+
submodules: list[str] | None = None,
650+
mklib: str | None = None,
651651
verbose: bool = False,
652652
log: bool = False,
653653
quiet: bool = False,
@@ -746,7 +746,7 @@ def build(
746746
)
747747
return build_ok
748748

749-
def get_output_name(self, file_to_build: Any, output: Optional[str] = None, mklib: Optional[str] = None) -> str:
749+
def get_output_name(self, file_to_build: Any, output: str | None = None, mklib: str | None = None) -> str:
750750
"""
751751
Return the output build file name.
752752

fobis/Fetcher.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import os
2626
import shutil
2727
from collections.abc import Callable
28-
from typing import Any, Optional
28+
from typing import Any
2929

3030
from .utils import print_fake, syswork
3131

@@ -40,8 +40,8 @@ class Fetcher:
4040
def __init__(
4141
self,
4242
deps_dir: str,
43-
print_n: Optional[Callable[..., None]] = None,
44-
print_w: Optional[Callable[..., None]] = None,
43+
print_n: Callable[..., None] | None = None,
44+
print_w: Callable[..., None] | None = None,
4545
) -> None:
4646
"""
4747
Parameters
@@ -85,9 +85,9 @@ def fetch(
8585
self,
8686
name: str,
8787
url: str,
88-
branch: Optional[str] = None,
89-
tag: Optional[str] = None,
90-
rev: Optional[str] = None,
88+
branch: str | None = None,
89+
tag: str | None = None,
90+
rev: str | None = None,
9191
update: bool = False,
9292
) -> str:
9393
"""
@@ -141,7 +141,7 @@ def fetch(
141141
self.print_w("Error merging updates for " + name + ":\n" + result[1])
142142
return dep_dir
143143

144-
def build_dep(self, name: str, dep_dir: str, mode: Optional[str] = None) -> None:
144+
def build_dep(self, name: str, dep_dir: str, mode: str | None = None) -> None:
145145
"""
146146
Build a dependency using FoBiS.py build.
147147
@@ -226,10 +226,10 @@ def _resolve_url(self, repo: str) -> str:
226226
def install_from_github(
227227
self,
228228
repo: str,
229-
branch: Optional[str] = None,
230-
tag: Optional[str] = None,
231-
rev: Optional[str] = None,
232-
mode: Optional[str] = None,
229+
branch: str | None = None,
230+
tag: str | None = None,
231+
rev: str | None = None,
232+
mode: str | None = None,
233233
update: bool = False,
234234
no_build: bool = False,
235235
prefix: str = "./",
@@ -276,7 +276,7 @@ def install_from_github(
276276
self._build_dep_tracked(name, dep_dir, mode=mode)
277277
self._install_artifacts(dep_dir, prefix, bin_dir, lib_dir, include_dir)
278278

279-
def _build_dep_tracked(self, name: str, dep_dir: str, mode: Optional[str] = None) -> None:
279+
def _build_dep_tracked(self, name: str, dep_dir: str, mode: str | None = None) -> None:
280280
"""
281281
Build a dependency using 'fobis build --track_build'.
282282

fobis/FoBiSConfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import os
2525
import re
2626
import sys
27-
from typing import Any, Optional
27+
from typing import Any
2828

2929
from typer.testing import CliRunner as _CliRunner
3030

@@ -49,7 +49,7 @@ class FoBiSConfig:
4949
FoBiS configuration class handling.
5050
"""
5151

52-
def __init__(self, fake_args: Optional[list[str]] = None) -> None:
52+
def __init__(self, fake_args: list[str] | None = None) -> None:
5353
"""
5454
Attributes
5555
----------

fobis/Fobos.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import sys
3232
from collections.abc import Callable
3333
from copy import deepcopy
34-
from typing import Any, Optional
34+
from typing import Any
3535

3636
from .utils import check_results, print_fake, syswork
3737

@@ -44,8 +44,8 @@ class Fobos:
4444
def __init__(
4545
self,
4646
cliargs: Any,
47-
print_n: Optional[Callable[..., None]] = None,
48-
print_w: Optional[Callable[..., None]] = None,
47+
print_n: Callable[..., None] | None = None,
48+
print_w: Callable[..., None] | None = None,
4949
) -> None:
5050
"""
5151
Parameters
@@ -277,7 +277,7 @@ def _set_cliargs(self, cliargs):
277277
self._check_cliargs_cflags(cliargs=cliargs, cliargs_dict=cliargs_dict)
278278
return
279279

280-
def get(self, option: str, mode: Optional[str] = None, toprint: bool = True) -> Optional[str]:
280+
def get(self, option: str, mode: str | None = None, toprint: bool = True) -> str | None:
281281
"""
282282
Get options defined into the fobos file.
283283
@@ -302,7 +302,7 @@ def get(self, option: str, mode: Optional[str] = None, toprint: bool = True) ->
302302
else:
303303
return value
304304

305-
def get_output_name(self, mode: Optional[str] = None, toprint: bool = True) -> Optional[str]:
305+
def get_output_name(self, mode: str | None = None, toprint: bool = True) -> str | None:
306306
"""
307307
Method for building the output name accordingly to the fobos options.
308308

fobis/ParsedFile.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# along with FoBiS.py. If not, see <http://www.gnu.org/licenses/>.
2121

2222
import sys
23-
from typing import Any, Optional, Union
23+
from typing import Any
2424

2525
try:
2626
import functools
@@ -283,7 +283,7 @@ def __init__(
283283
include: bool = False,
284284
nomodlib: bool = False,
285285
to_compile: bool = False,
286-
output: Optional[str] = None,
286+
output: str | None = None,
287287
is_doctest: bool = False,
288288
) -> None:
289289
"""
@@ -374,7 +374,7 @@ def parse(
374374
inc: list[str] = [".INC", ".F", ".FOR", ".FPP", ".F77", ".F90", ".F95", ".F03", ".F08"],
375375
preprocessor: str = "cpp",
376376
preproc: str = "",
377-
include: Union[str, list[str]] = "",
377+
include: str | list[str] = "",
378378
) -> None:
379379
"""
380380
Parse the file creating its the dependencies list and the list of modules names that self eventually contains.

0 commit comments

Comments
 (0)