Skip to content

Commit

Permalink
Added support for Python 3.13, removed support for Python 3.8.
Browse files Browse the repository at this point in the history
  • Loading branch information
kpfleming committed Oct 12, 2024
1 parent f4badf4 commit f1f2ed5
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
repos:
- repo: https://github.com/tox-dev/pyproject-fmt
rev: "2.2.1"
rev: "2.3.0"
hooks:
- id: pyproject-fmt
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
rev: v0.6.9
hooks:
- id: ruff-format
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<a href="https://opensource.org"><img height="150" align="left" src="https://opensource.org/files/OSIApprovedCropped.png" alt="Open Source Initiative Approved License logo"></a>
[![CI](https://github.com/kpfleming/jinjanator/workflows/CI%20checks/badge.svg)](https://github.com/kpfleming/jinjanator/actions?query=workflow%3ACI%20checks)
[![Python](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/release/python-3812/)
[![Python](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/release/python-3920/)
[![License - Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-9400d3.svg)](https://spdx.org/licenses/Apache-2.0.html)
[![Types - Mypy](https://img.shields.io/badge/Types-Mypy-blue.svg)](https://github.com/python/mypy)
[![Code Style and Quality - Ruff](https://img.shields.io/badge/Code%20Quality-Ruff-red.svg)](https://github.com/astral-sh/ruff)
Expand Down
1 change: 1 addition & 0 deletions changelog.d/+e1c61bf0.breaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added support for Python 3.13, and removed support for Python 3.8.
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ authors = [
{ name = "Kevin P. Fleming", email = "jinjanator@kevin.km6g.us" },
{ name = "Mark Vartanyan", email = "kolypto@gmail.com" },
]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -23,11 +23,11 @@ classifiers = [
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"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",
"Typing :: Typed",
]
dynamic = [
Expand Down Expand Up @@ -136,7 +136,6 @@ dependencies = [

[[tool.hatch.envs.ci.matrix]]
python = [
"3.8",
"3.9",
"3.10",
"3.11",
Expand Down Expand Up @@ -292,7 +291,7 @@ name = "Fixes"
showcontent = true

[tool.mypy]
python_version = 3.8
python_version = 3.9
namespace_packages = true
explicit_package_bases = true
check_untyped_defs = true
Expand Down
8 changes: 5 additions & 3 deletions src/jinjanator/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
import os
import sys

from typing import TYPE_CHECKING


if TYPE_CHECKING: # pragma: no cover
from collections.abc import Iterable, Mapping, Sequence
from pathlib import Path
from typing import (
Any,
Callable,
Iterable,
Mapping,
Sequence,
TextIO,
cast,
)
Expand Down
4 changes: 3 additions & 1 deletion src/jinjanator/context.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Mapping, TextIO
from typing import TYPE_CHECKING, Any, TextIO


if TYPE_CHECKING: # pragma: no cover
from collections.abc import Mapping

from jinjanator_plugins import (
Format,
)
Expand Down
7 changes: 6 additions & 1 deletion src/jinjanator/formats.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@
import json
import keyword

from typing import TYPE_CHECKING


if TYPE_CHECKING: # pragma: no cover
from collections.abc import Iterable, Mapping
from io import StringIO
from typing import Any, Iterable, Mapping
from typing import Any

import yaml

Expand Down
7 changes: 6 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from __future__ import annotations

from typing import TYPE_CHECKING


if TYPE_CHECKING: # pragma: no cover
from collections.abc import Mapping, Sequence
from pathlib import Path
from typing import Callable, Mapping, Sequence
from typing import Callable

from attrs import define

Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from . import FilePair, FilePairFactory


if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
from pathlib import Path


Expand Down
6 changes: 5 additions & 1 deletion tests/test_argparse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
from __future__ import annotations

from typing import Iterable, Mapping
from typing import TYPE_CHECKING


if TYPE_CHECKING: # pragma: no cover
from collections.abc import Iterable, Mapping

import pytest

Expand Down
2 changes: 1 addition & 1 deletion tests/test_output_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
)


if TYPE_CHECKING:
if TYPE_CHECKING: # pragma: no cover
import pathlib


Expand Down
7 changes: 6 additions & 1 deletion tests/test_plugin/jinjanator_test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
from __future__ import annotations

from typing import Iterable, Mapping
from typing import TYPE_CHECKING


if TYPE_CHECKING: # pragma: no cover
from collections.abc import Iterable, Mapping


from jinjanator_plugins import (
Extensions,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_plugin/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ requires = [
[project]
name = "jinjanator-test-plugin"
version = "0.0.0"
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"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",
]

entry-points.jinjanator.test = "jinjanator_test_plugin"
Expand Down
2 changes: 1 addition & 1 deletion workflow-support/versions.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
versions={"python": ["3.8", "3.9", "3.10", "3.11", "3.12"]}
versions={"python": ["3.9", "3.10", "3.11", "3.12"]}

0 comments on commit f1f2ed5

Please sign in to comment.