Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
python_version:
- "3.9"
- "3.10"
- "3.11"

steps:
- name: Check Out VCS Repository
Expand Down Expand Up @@ -85,6 +86,7 @@ jobs:
python_version:
- "3.9"
- "3.10"
- "3.11"

steps:
- name: Check Out VCS Repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: set_up_python
uses: actions/setup-python@v6.0.0
with:
python-version: "3.10"
python-version: "3.11"

- name: Restoring/Saving Cache
uses: actions/cache@v4.3.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
id: set_up_python
uses: actions/setup-python@v6.0.0
with:
python-version: "3.10"
python-version: "3.11"

- name: Create Python Virtual Environment
run: make python-virtualenv PYTHON_VIRTUALENV_DIR="venv"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The full documentation is at <https://lib-cl-sii-python.readthedocs.io>.

## Supported Python versions

Only Python 3.9 and 3.10. Python 3.8 and below will not work because we use some features
Only Python 3.9, 3.10, and 3.11. Python 3.8 and below will not work because we use some features
introduced in Python 3.9.

## Quickstart
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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.12"
authors = [
{name = "Fyntex TI SpA", email = "no-reply@fyntex.ai"},
]
Expand All @@ -44,6 +44,7 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
dynamic = ["version"]

Expand Down
21 changes: 17 additions & 4 deletions src/tests/test_libs_tz_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import datetime
import re
import sys
import unittest

from cl_sii.libs.tz_utils import ( # noqa: F401
Expand Down Expand Up @@ -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)

Expand All @@ -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)
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
envlist =
py39,
py310,
py311,

[testenv]
setenv =
Expand All @@ -13,3 +14,4 @@ deps =
basepython =
py39: python3.9
py310: python3.10
py311: python3.11
Loading