Skip to content

Commit

Permalink
Remove support for deprecated Python version 3.8 (#230)
Browse files Browse the repository at this point in the history
Python 3.8 is officially not supported anymore since October 2024.
Removing support for this version, allows us to use more modern syntax
features and keep the code up to speed with the development of the language.
  • Loading branch information
mdomke authored Nov 11, 2024
1 parent 7385683 commit 0df8709
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ Changelog

Versions follow `CalVer <http://www.calver.org/>`_ with the scheme ``YY.0M.Micro``.

`2024.11.0`_ - 2024/11/11
-------------------------
Changed
~~~~~~~
* Removed support for deprecated Python version 3.8

`2024.09.0`_ - 2024/09/31
-------------------------
Fixed
Expand Down Expand Up @@ -685,6 +691,7 @@ Added
* Added :attr:`.BIC.country` and :attr:`.IBAN.country`.


.. _2024.11.0: https://github.com/mdomke/schwifty/compare/2024.09.0...2024.11.0
.. _2024.09.0: https://github.com/mdomke/schwifty/compare/2024.08.1...2024.09.0
.. _2024.08.1: https://github.com/mdomke/schwifty/compare/2024.08.0...2024.08.1
.. _2024.08.0: https://github.com/mdomke/schwifty/compare/2024.06.1...2024.08.0
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{ name = "Martin Domke", email = "[email protected]" },
]
Expand Down
3 changes: 1 addition & 2 deletions schwifty/bban.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from random import Random
from typing import Any
from typing import cast
from typing import Dict

from rstr import Rstr

Expand Down Expand Up @@ -183,7 +182,7 @@ def random(
if random is None:
random = Random() # noqa: S311

banks_by_country = cast(Dict[str, Any], registry.get("country"))
banks_by_country = cast(dict[str, Any], registry.get("country"))
if not country_code:
country_code = random.choice(list(banks_by_country.keys()))

Expand Down
4 changes: 1 addition & 3 deletions schwifty/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
from pathlib import Path
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import Union


Expand All @@ -18,7 +16,7 @@


Key = Union[str, tuple]
Value = Union[Dict[Key, Any], List[Dict[Key, Any]]]
Value = Union[dict[Key, Any], list[dict[Key, Any]]]

_registry: dict[Key, Value] = {}

Expand Down

0 comments on commit 0df8709

Please sign in to comment.