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 13, 2024
1 parent ebc810b commit ba7ce05
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 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-plugin-format-xml/workflows/CI%20checks/badge.svg)](https://github.com/kpfleming/jinjanator-plugin-format-xml/actions?query=workflow%3ACI%20checks)
[![Python](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/release/python-3912/)
[![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)
[![Code Style - Black](https://img.shields.io/badge/Code%20Style-Black-000000.svg)](https://github.com/psf/black)
[![Types - Mypy](https://img.shields.io/badge/Types-Mypy-blue.svg)](https://github.com/python/mypy)
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.
1 change: 0 additions & 1 deletion changelog.d/7.adding.md

This file was deleted.

8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ license = { text = "Apache-2.0" }
authors = [
{ name = "Kevin P. Fleming", email = "jinjanator@kevin.km6g.us" },
]
requires-python = ">=3.8"
requires-python = ">=3.9"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
Expand All @@ -22,11 +22,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 @@ -121,7 +121,6 @@ dependencies = [

[[tool.hatch.envs.ci.matrix]]
python = [
"3.8",
"3.9",
"3.10",
"3.11",
Expand Down Expand Up @@ -191,6 +190,7 @@ lint.ignore = [
"C901", # Leave complexity to me.
"COM812", # conflicts with formatter
"D", # We have different ideas about docstrings.
"FA100", # Intentionally not using '__future__' for annotations
"ISC001", # conflicts with formatter
"PLR0912", # Leave complexity to me.
"TRY301", # Raise in try blocks can totally make sense.
Expand Down Expand Up @@ -262,7 +262,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
11 changes: 5 additions & 6 deletions src/jinjanator_plugin_format_xml/plugin.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

from typing import Any, Iterable, Mapping
from collections.abc import Iterable, Mapping
from typing import Any, Optional

import xmltodict

Expand All @@ -12,10 +11,10 @@

class XMLFormat:
name = "xml"
suffixes: Iterable[str] | None = ".xml"
option_names: Iterable[str] | None = "process-namespaces"
suffixes: Optional[Iterable[str]] = ".xml"
option_names: Optional[Iterable[str]] = "process-namespaces"

def __init__(self, options: Iterable[str] | None) -> None:
def __init__(self, options: Optional[Iterable[str]]) -> None:
self.process_namespaces = False
if options:
for _option in options:
Expand Down
2 changes: 0 additions & 2 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from __future__ import annotations

from jinjanator_plugin_format_xml import 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 ba7ce05

Please sign in to comment.