diff --git a/.black.cfg.toml b/.black.cfg.toml index aca538bf..31e51fb9 100644 --- a/.black.cfg.toml +++ b/.black.cfg.toml @@ -9,4 +9,4 @@ include = '\.pyi?$' line-length = 100 skip-string-normalization = true -target-version = ['py39', 'py310'] +target-version = ['py39', 'py310', 'py311', 'py312', 'py313'] diff --git a/.bumpversion.cfg b/.bumpversion.cfg index f1e1c45f..db66902b 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.60.0 +current_version = 0.61.0 commit = True tag = False message = chore: Bump version from {current_version} to {new_version} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a23b1919..33ad8b4d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,6 +30,9 @@ jobs: python_version: - "3.9" - "3.10" + - "3.11" + - "3.12" + - "3.13" steps: - name: Check Out VCS Repository @@ -85,6 +88,9 @@ jobs: python_version: - "3.9" - "3.10" + - "3.11" + - "3.12" + - "3.13" steps: - name: Check Out VCS Repository diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 97db5c26..877616d9 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -44,7 +44,7 @@ jobs: id: set_up_python uses: actions/setup-python@v6.0.0 with: - python-version: "3.10" + python-version: "3.13" - name: Restoring/Saving Cache uses: actions/cache@v4.3.0 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index a180543a..ce517cd6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -41,7 +41,7 @@ jobs: id: set_up_python uses: actions/setup-python@v6.0.0 with: - python-version: "3.10" + python-version: "3.13" - name: Create Python Virtual Environment run: make python-virtualenv PYTHON_VIRTUALENV_DIR="venv" diff --git a/HISTORY.md b/HISTORY.md index a3cd39a3..2efb2e29 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,13 @@ # History +## 0.61.0 (2025-10-29) + +- (PR #916, 2025-10-29) Add support for Python 3.11 +- (PR #918, 2025-10-29) Add Python 3.11 to target versions of 'Black' +- (PR #919, 2025-10-29) Add support for Python 3.12 +- (PR #920, 2025-10-29) deps: Update `cffi` from 1.16.0 to 1.17.1 +- (PR #921, 2025-10-29) Add support for Python 3.13 + ## 0.60.0 (2025-10-20) - (PR #913, 2025-10-15) rcv: Refactor and extend parsing for "Otros Impuestos" field diff --git a/README.md b/README.md index d44ee39f..5b7b1888 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ The full documentation is at . ## Supported Python versions -Only Python 3.9 and 3.10. Python 3.8 and below will not work because we use some features -introduced in Python 3.9. +Only Python 3.9, 3.10, 3.11, 3.12, and 3.13. Python 3.8 and below will not work because we use some +features introduced in Python 3.9. ## Quickstart diff --git a/pyproject.toml b/pyproject.toml index e6b64ecb..9aabaad9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "signxml>=4.0.0", "typing-extensions>=4.0.1", ] -requires-python = ">=3.9, <3.11" +requires-python = ">=3.9, <3.14" authors = [ {name = "Fyntex TI SpA", email = "no-reply@fyntex.ai"}, ] @@ -44,6 +44,9 @@ classifiers = [ "Programming Language :: Python :: 3", "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", ] dynamic = ["version"] diff --git a/requirements-dev.txt b/requirements-dev.txt index 032a1c5c..9a959d92 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -26,7 +26,7 @@ certifi==2024.7.4 # via # -c requirements.txt # requests -cffi==1.16.0 +cffi==1.17.1 # via # -c requirements.txt # cryptography diff --git a/requirements.txt b/requirements.txt index 3621ffaa..caefdf10 100644 --- a/requirements.txt +++ b/requirements.txt @@ -16,7 +16,7 @@ backports-datetime-fromisoformat==2.0.3 # via marshmallow certifi==2024.7.4 # via signxml -cffi==1.16.0 +cffi==1.17.1 # via cryptography cryptography==45.0.7 # via diff --git a/src/cl_sii/__init__.py b/src/cl_sii/__init__.py index 97d64fe5..748de295 100644 --- a/src/cl_sii/__init__.py +++ b/src/cl_sii/__init__.py @@ -4,4 +4,4 @@ """ -__version__ = '0.60.0' +__version__ = '0.61.0' diff --git a/src/tests/test_libs_tz_utils.py b/src/tests/test_libs_tz_utils.py index a86c6710..af24c497 100644 --- a/src/tests/test_libs_tz_utils.py +++ b/src/tests/test_libs_tz_utils.py @@ -1,5 +1,6 @@ import datetime import re +import sys import unittest from cl_sii.libs.tz_utils import ( # noqa: F401 @@ -74,7 +75,12 @@ def test_validate_dt_tz_tzinfo_zone_attribute_check(self) -> None: ) with self.assertRaisesRegex(AssertionError, expected_error_message): validate_dt_tz(dt_with_tzinfo_utc_pytz, tzinfo_utc_stdlib) - expected_error_message = re.compile(r"^Object UTC must have 'zone' attribute.$") + if sys.version_info >= (3, 11): + expected_error_message = re.compile( + r"^Object datetime.timezone.utc must have 'zone' attribute.$" + ) + else: + expected_error_message = re.compile(r"^Object UTC must have 'zone' attribute.$") with self.assertRaisesRegex(AssertionError, expected_error_message): validate_dt_tz(dt_with_tzinfo_utc_stdlib, tzinfo_utc_pytz) @@ -86,8 +92,15 @@ def test_validate_dt_tz_tzinfo_zone_attribute_check(self) -> None: ) with self.assertRaisesRegex(AssertionError, expected_error_message): validate_dt_tz(dt_with_tzinfo_not_utc_pytz, tzinfo_not_utc_stdlib) # type: ignore - expected_error_message = re.compile( - r"^Object" r" UTC-03:00" r" must have 'zone' attribute.$" - ) + if sys.version_info >= (3, 11): + expected_error_message = re.compile( + r"^Object" + r" datetime.timezone\(datetime.timedelta\(days=-1, seconds=75600\)\)" + r" must have 'zone' attribute.$" + ) + else: + expected_error_message = re.compile( + r"^Object" r" UTC-03:00" r" must have 'zone' attribute.$" + ) with self.assertRaisesRegex(AssertionError, expected_error_message): validate_dt_tz(dt_with_tzinfo_not_utc_stdlib, tzinfo_not_utc_pytz) diff --git a/tox.ini b/tox.ini index c62778c7..b8da266f 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,9 @@ envlist = py39, py310, + py311, + py312, + py313, [testenv] setenv = @@ -13,3 +16,6 @@ deps = basepython = py39: python3.9 py310: python3.10 + py311: python3.11 + py312: python3.12 + py313: python3.13