From 6b0d5bd41dd98b5ae17c7074cb09b12befb2bc47 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 09:07:25 +0000 Subject: [PATCH 01/13] chore: Bump pydantic from 2.5.3 to 2.6.0 Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.5.3 to 2.6.0. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v2.5.3...v2.6.0) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.in b/requirements.in index 647232d7..7470c82f 100644 --- a/requirements.in +++ b/requirements.in @@ -13,7 +13,7 @@ importlib-metadata==6.1.0 jsonschema==4.21.1 lxml==4.9.2 marshmallow==3.20.1 -pydantic==2.5.3 +pydantic==2.6.0 pyOpenSSL==23.2.0 pytz==2023.3.post1 signxml==3.2.1 diff --git a/requirements.txt b/requirements.txt index 1c40be74..045978e3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,9 +51,9 @@ pkgutil-resolve-name==1.3.10 # via jsonschema pycparser==2.20 # via cffi -pydantic==2.5.3 +pydantic==2.6.0 # via -r requirements.in -pydantic-core==2.14.6 +pydantic-core==2.16.1 # via pydantic pyopenssl==23.2.0 # via From af589447ef7dc762fc972d089968998fcc3aa50f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 20:34:57 +0000 Subject: [PATCH 02/13] chore: Bump lxml from 4.9.2 to 4.9.4 Bumps [lxml](https://github.com/lxml/lxml) from 4.9.2 to 4.9.4. - [Release notes](https://github.com/lxml/lxml/releases) - [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt) - [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.2...lxml-4.9.4) --- updated-dependencies: - dependency-name: lxml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 7470c82f..41b2e6fa 100644 --- a/requirements.in +++ b/requirements.in @@ -11,7 +11,7 @@ Django>=2.2.24 djangorestframework>=3.10.3,<3.15 importlib-metadata==6.1.0 jsonschema==4.21.1 -lxml==4.9.2 +lxml==4.9.4 marshmallow==3.20.1 pydantic==2.6.0 pyOpenSSL==23.2.0 diff --git a/requirements.txt b/requirements.txt index 045978e3..f6b4a65c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -39,7 +39,7 @@ jsonschema==4.21.1 # via -r requirements.in jsonschema-specifications==2023.7.1 # via jsonschema -lxml==4.9.2 +lxml==4.9.4 # via # -r requirements.in # signxml From 5bbdaa9b257f2cfb8df8b6dc0bf0de84108fe5ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 22:12:19 +0000 Subject: [PATCH 03/13] chore: Bump the development-dependencies group with 6 updates Bumps the development-dependencies group with 6 updates: | Package | From | To | | --- | --- | --- | | [black](https://github.com/psf/black) | `23.12.1` | `24.1.1` | | [coverage](https://github.com/nedbat/coveragepy) | `7.4.0` | `7.4.1` | | [flake8](https://github.com/pycqa/flake8) | `6.1.0` | `7.0.0` | | [types-jsonschema](https://github.com/python/typeshed) | `4.20.0.0` | `4.21.0.20240118` | | [types-pyopenssl](https://github.com/python/typeshed) | `23.3.0.0` | `24.0.0.20240130` | | [types-pytz](https://github.com/python/typeshed) | `2023.3.1.1` | `2024.1.0.20240203` | Updates `black` from 23.12.1 to 24.1.1 - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/23.12.1...24.1.1) Updates `coverage` from 7.4.0 to 7.4.1 - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.4.0...7.4.1) Updates `flake8` from 6.1.0 to 7.0.0 - [Commits](https://github.com/pycqa/flake8/compare/6.1.0...7.0.0) Updates `types-jsonschema` from 4.20.0.0 to 4.21.0.20240118 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pyopenssl` from 23.3.0.0 to 24.0.0.20240130 - [Commits](https://github.com/python/typeshed/commits) Updates `types-pytz` from 2023.3.1.1 to 2024.1.0.20240203 - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies - dependency-name: coverage dependency-type: direct:development update-type: version-update:semver-patch dependency-group: development-dependencies - dependency-name: flake8 dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies - dependency-name: types-jsonschema dependency-type: direct:development update-type: version-update:semver-minor dependency-group: development-dependencies - dependency-name: types-pyopenssl dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies - dependency-name: types-pytz dependency-type: direct:development update-type: version-update:semver-major dependency-group: development-dependencies ... Signed-off-by: dependabot[bot] --- requirements-dev.in | 12 ++++++------ requirements-dev.txt | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/requirements-dev.in b/requirements-dev.in index 2d021c81..24b7f92d 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -4,16 +4,16 @@ -c requirements.txt -black==23.12.1 +black==24.1.1 bumpversion==0.5.3 -coverage==7.4.0 -flake8==6.1.0 +coverage==7.4.1 +flake8==7.0.0 isort==5.13.2 mypy==1.8.0 pip-tools==7.3.0 tox==4.11.4 twine==4.0.2 -types-jsonschema==4.20.0.0 -types-pyOpenSSL==23.3.0.0 -types-pytz==2023.3.1.1 +types-jsonschema==4.21.0.20240118 +types-pyOpenSSL==24.0.0.20240130 +types-pytz==2024.1.0.20240203 wheel==0.42.0 diff --git a/requirements-dev.txt b/requirements-dev.txt index d5d23e5e..6516c209 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -8,7 +8,7 @@ attrs==23.1.0 # via # -c requirements.txt # referencing -black==23.12.1 +black==24.1.1 # via -r requirements-dev.in bleach==5.0.1 # via readme-renderer @@ -36,7 +36,7 @@ click==8.0.3 # pip-tools colorama==0.4.6 # via tox -coverage==7.4.0 +coverage==7.4.1 # via -r requirements-dev.in cryptography==41.0.7 # via @@ -51,7 +51,7 @@ filelock==3.12.4 # via # tox # virtualenv -flake8==6.1.0 +flake8==7.0.0 # via -r requirements-dev.in idna==2.10 # via requests @@ -106,7 +106,7 @@ pycparser==2.20 # via # -c requirements.txt # cffi -pyflakes==3.1.0 +pyflakes==3.2.0 # via flake8 pygments==2.15.0 # via @@ -153,11 +153,11 @@ tox==4.11.4 # via -r requirements-dev.in twine==4.0.2 # via -r requirements-dev.in -types-jsonschema==4.20.0.0 +types-jsonschema==4.21.0.20240118 # via -r requirements-dev.in -types-pyopenssl==23.3.0.0 +types-pyopenssl==24.0.0.20240130 # via -r requirements-dev.in -types-pytz==2023.3.1.1 +types-pytz==2024.1.0.20240203 # via -r requirements-dev.in typing-extensions==4.7.1 # via From c5040e9878dbf62cceb6262a1aa27df72d0c0752 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Mon, 5 Feb 2024 19:16:19 -0300 Subject: [PATCH 04/13] chore: Reformat source code using 'Black' --- src/cl_sii/__init__.py | 1 - src/cl_sii/base/constants.py | 2 +- src/cl_sii/contribuyente/constants.py | 1 - src/cl_sii/dte/constants.py | 3 +-- src/cl_sii/dte/data_models.py | 6 +----- src/cl_sii/extras/dj_form_fields.py | 2 +- src/cl_sii/extras/dj_model_fields.py | 2 +- src/cl_sii/extras/drf_fields.py | 2 +- src/cl_sii/extras/mm_fields.py | 4 +--- src/cl_sii/libs/crypto_utils.py | 1 + src/cl_sii/libs/dataclass_utils.py | 3 +-- src/cl_sii/libs/rows_processing.py | 1 - src/cl_sii/libs/tz_utils.py | 1 + src/cl_sii/libs/xml_utils.py | 9 +-------- src/cl_sii/rcv/constants.py | 1 - src/cl_sii/rcv/data_models.py | 7 +------ src/cl_sii/rcv/parse_csv.py | 2 +- src/cl_sii/rtc/constants.py | 1 - src/cl_sii/rut/__init__.py | 2 +- src/cl_sii/rut/constants.py | 1 + 20 files changed, 15 insertions(+), 37 deletions(-) diff --git a/src/cl_sii/__init__.py b/src/cl_sii/__init__.py index c1042412..a52b8e28 100644 --- a/src/cl_sii/__init__.py +++ b/src/cl_sii/__init__.py @@ -4,5 +4,4 @@ """ - __version__ = '0.26.0' diff --git a/src/cl_sii/base/constants.py b/src/cl_sii/base/constants.py index 28d85736..c019bb47 100644 --- a/src/cl_sii/base/constants.py +++ b/src/cl_sii/base/constants.py @@ -3,6 +3,7 @@ ================ """ + import enum import pytz @@ -17,7 +18,6 @@ @enum.unique class TipoDocumento(enum.IntEnum): - """ Enum of "Tipo de Documento". diff --git a/src/cl_sii/contribuyente/constants.py b/src/cl_sii/contribuyente/constants.py index 31bda97d..65e81b23 100644 --- a/src/cl_sii/contribuyente/constants.py +++ b/src/cl_sii/contribuyente/constants.py @@ -7,7 +7,6 @@ """ - # TODO: RAZON_SOCIAL_LONG_REGEX = re.compile(r'^...$') RAZON_SOCIAL_LONG_MAX_LENGTH = 100 diff --git a/src/cl_sii/dte/constants.py b/src/cl_sii/dte/constants.py index 2c2e4c75..5d57a2d4 100644 --- a/src/cl_sii/dte/constants.py +++ b/src/cl_sii/dte/constants.py @@ -5,6 +5,7 @@ https://github.com/fyntex/lib-cl-sii-python/blob/f57a326/cl_sii/data/ref/factura_electronica/schemas-xml/ """ + import enum from datetime import date from typing import FrozenSet @@ -87,7 +88,6 @@ @enum.unique class TipoDte(enum.IntEnum): - """ Enum of "Tipo de DTE". @@ -351,7 +351,6 @@ def receptor_is_vendedor(self) -> bool: @enum.unique class CodigoReferencia(enum.IntEnum): - """ Enum of "Código de referencia". diff --git a/src/cl_sii/dte/data_models.py b/src/cl_sii/dte/data_models.py index 192a7fcc..c3a32a4e 100644 --- a/src/cl_sii/dte/data_models.py +++ b/src/cl_sii/dte/data_models.py @@ -15,6 +15,7 @@ It *usually* corresponds to the DTE's "receptor", but not always. """ + from __future__ import annotations import dataclasses @@ -105,7 +106,6 @@ def validate_non_empty_bytes(value: bytes) -> None: ), ) class DteNaturalKey: - """ Natural key of a DTE. @@ -176,7 +176,6 @@ def validate_folio(cls, v: object) -> object: ), ) class DteDataL0(DteNaturalKey): - """ DTE data level 0. @@ -214,7 +213,6 @@ def natural_key(self) -> DteNaturalKey: ), ) class DteDataL1(DteDataL0): - """ DTE data level 1. @@ -329,7 +327,6 @@ def validate_monto_total(cls, v: object, info: pydantic.ValidationInfo) -> objec ), ) class DteDataL2(DteDataL1): - """ DTE data level 2. @@ -653,7 +650,6 @@ def validate_razon_ref(cls, value: str | None) -> str | None: ), ) class DteXmlData(DteDataL1): - """ DTE XML data. diff --git a/src/cl_sii/extras/dj_form_fields.py b/src/cl_sii/extras/dj_form_fields.py index 579f63e2..829f7e5b 100644 --- a/src/cl_sii/extras/dj_form_fields.py +++ b/src/cl_sii/extras/dj_form_fields.py @@ -2,6 +2,7 @@ cl_sii "extras" / Django form fields. """ + try: import django except ImportError as exc: # pragma: no cover @@ -17,7 +18,6 @@ class RutField(django.forms.CharField): - """ Django form field for RUT. diff --git a/src/cl_sii/extras/dj_model_fields.py b/src/cl_sii/extras/dj_model_fields.py index 28cee2b8..cc2ee719 100644 --- a/src/cl_sii/extras/dj_model_fields.py +++ b/src/cl_sii/extras/dj_model_fields.py @@ -2,6 +2,7 @@ cl_sii "extras" / Django model fields. """ + try: import django except ImportError as exc: # pragma: no cover @@ -18,7 +19,6 @@ class RutField(django.db.models.Field): - """ Django model field for RUT. diff --git a/src/cl_sii/extras/drf_fields.py b/src/cl_sii/extras/drf_fields.py index 9cbe7488..65383f33 100644 --- a/src/cl_sii/extras/drf_fields.py +++ b/src/cl_sii/extras/drf_fields.py @@ -4,6 +4,7 @@ (for serializers) """ + try: import rest_framework except ImportError as exc: # pragma: no cover @@ -15,7 +16,6 @@ class RutField(rest_framework.fields.CharField): - """ DRF field for RUT. diff --git a/src/cl_sii/extras/mm_fields.py b/src/cl_sii/extras/mm_fields.py index a85bcf56..dfb2de42 100644 --- a/src/cl_sii/extras/mm_fields.py +++ b/src/cl_sii/extras/mm_fields.py @@ -4,6 +4,7 @@ (for serializers) """ + from __future__ import annotations @@ -24,7 +25,6 @@ class RutField(marshmallow.fields.Field): - """ Marshmallow field for RUT. @@ -77,7 +77,6 @@ def _validated(self, value: Optional[object]) -> Optional[Rut]: class TipoDteField(marshmallow.fields.Field): - """ Marshmallow field for a DTE's "tipo DTE". @@ -136,7 +135,6 @@ def _validated(self, value: Optional[object]) -> Optional[TipoDte]: class RcvTipoDoctoField(marshmallow.fields.Field): - """ Marshmallow field for RCV's "tipo documento". diff --git a/src/cl_sii/libs/crypto_utils.py b/src/cl_sii/libs/crypto_utils.py index a362ecfe..51d6edab 100644 --- a/src/cl_sii/libs/crypto_utils.py +++ b/src/cl_sii/libs/crypto_utils.py @@ -37,6 +37,7 @@ > base64 encoding of the DER certificate [plus the header and footer]. """ + import base64 from typing import Union diff --git a/src/cl_sii/libs/dataclass_utils.py b/src/cl_sii/libs/dataclass_utils.py index 55ff9135..1eae6538 100644 --- a/src/cl_sii/libs/dataclass_utils.py +++ b/src/cl_sii/libs/dataclass_utils.py @@ -5,13 +5,13 @@ Utils for std lib's :class:`dataclasses.Dataclass` classes and instances. """ + import dataclasses import enum @enum.unique class DcDeepComparison(enum.IntEnum): - """ The possible results of a "deep comparison" between 2 dataclass instances. @@ -50,7 +50,6 @@ class DcDeepComparison(enum.IntEnum): class DcDeepCompareMixin: - """ Mixin for dataclass instances "deep comparison". """ diff --git a/src/cl_sii/libs/rows_processing.py b/src/cl_sii/libs/rows_processing.py index 082d4395..fc9fda90 100644 --- a/src/cl_sii/libs/rows_processing.py +++ b/src/cl_sii/libs/rows_processing.py @@ -9,7 +9,6 @@ class MaxRowsExceeded(RuntimeError): - """ The maximum number of rows has been exceeded. """ diff --git a/src/cl_sii/libs/tz_utils.py b/src/cl_sii/libs/tz_utils.py index 0fe59009..a64f5d98 100644 --- a/src/cl_sii/libs/tz_utils.py +++ b/src/cl_sii/libs/tz_utils.py @@ -10,6 +10,7 @@ `docs `_. """ + from datetime import datetime from typing import Optional, Union diff --git a/src/cl_sii/libs/xml_utils.py b/src/cl_sii/libs/xml_utils.py index 2ff7d1fa..550818ee 100644 --- a/src/cl_sii/libs/xml_utils.py +++ b/src/cl_sii/libs/xml_utils.py @@ -19,6 +19,7 @@ """ + import io import logging import os @@ -69,14 +70,12 @@ class BaseXmlParsingError(Exception): - """ Base class for all XML parsing errors. """ class XmlSyntaxError(BaseXmlParsingError): - """ The value to be parsed is syntactically invalid XML. @@ -87,7 +86,6 @@ class XmlSyntaxError(BaseXmlParsingError): class XmlFeatureForbidden(BaseXmlParsingError): - """ The parsed XML contains/uses a feature that is forbidden. @@ -101,7 +99,6 @@ class XmlFeatureForbidden(BaseXmlParsingError): class UnknownXmlParsingError(BaseXmlParsingError): - """ An unkwnown XML parsing error or for which there is no handling implementation. @@ -113,7 +110,6 @@ class UnknownXmlParsingError(BaseXmlParsingError): class XmlSchemaDocValidationError(Exception): - """ XML document did not be validate against an XML schema. @@ -121,14 +117,12 @@ class XmlSchemaDocValidationError(Exception): class XmlSignatureInvalid(Exception): - """ XML signature is invalid, for any reason. """ class XmlSignatureUnverified(XmlSignatureInvalid): - """ XML signature verification (i.e. digest validation) failed. @@ -137,7 +131,6 @@ class XmlSignatureUnverified(XmlSignatureInvalid): class XmlSignatureInvalidCertificate(XmlSignatureInvalid): - """ Certificate validation failed on XML signature processing. """ diff --git a/src/cl_sii/rcv/constants.py b/src/cl_sii/rcv/constants.py index b3ecab1b..ed87ac26 100644 --- a/src/cl_sii/rcv/constants.py +++ b/src/cl_sii/rcv/constants.py @@ -99,7 +99,6 @@ class RcEstadoContable(enum.Enum): @enum.unique class RcvTipoDocto(enum.IntEnum): - """ Enum of "Tipo de Documento" for the RCV domain. diff --git a/src/cl_sii/rcv/data_models.py b/src/cl_sii/rcv/data_models.py index 6a8bec5e..f9fc3b3b 100644 --- a/src/cl_sii/rcv/data_models.py +++ b/src/cl_sii/rcv/data_models.py @@ -4,6 +4,7 @@ """ + from __future__ import annotations import logging @@ -106,7 +107,6 @@ def as_datetime(self) -> datetime: ), ) class RcvDetalleEntry: - """ Entry of the "detalle" of an RCV. """ @@ -237,7 +237,6 @@ def as_dte_data_l2(self) -> cl_sii.dte.data_models.DteDataL2: ), ) class RvDetalleEntry(RcvDetalleEntry): - """ Entry of the "detalle" of an RV ("Registro de Ventas"). """ @@ -289,7 +288,6 @@ def validate_datetime_tz(cls, v: object) -> object: ), ) class RcRegistroDetalleEntry(RcvDetalleEntry): - """ Entry of the "detalle" of an RC ("Registro de Compras") / "registro". """ @@ -338,7 +336,6 @@ def validate_datetime_tz(cls, v: object) -> object: ), ) class RcNoIncluirDetalleEntry(RcRegistroDetalleEntry): - """ Entry of the "detalle" of an RC ("Registro de Compras") / "no incluir". """ @@ -354,7 +351,6 @@ class RcNoIncluirDetalleEntry(RcRegistroDetalleEntry): ), ) class RcReclamadoDetalleEntry(RcvDetalleEntry): - """ Entry of the "detalle" of an RC ("Registro de Compras") / "reclamado". """ @@ -407,7 +403,6 @@ def validate_datetime_tz(cls, v: object) -> object: ), ) class RcPendienteDetalleEntry(RcvDetalleEntry): - """ Entry of the "detalle" of an RC ("Registro de Compras") / "pendiente". """ diff --git a/src/cl_sii/rcv/parse_csv.py b/src/cl_sii/rcv/parse_csv.py index 7b57b5dc..e5e2a7b7 100644 --- a/src/cl_sii/rcv/parse_csv.py +++ b/src/cl_sii/rcv/parse_csv.py @@ -4,6 +4,7 @@ """ + import csv import logging from datetime import date, datetime @@ -1086,7 +1087,6 @@ def to_detalle_entry(self, data: dict) -> RcPendienteDetalleEntry: class _RcvCsvDialect(csv.Dialect): - """ CSV dialect of RCV CSV files. diff --git a/src/cl_sii/rtc/constants.py b/src/cl_sii/rtc/constants.py index 37d58e09..17e2b34b 100644 --- a/src/cl_sii/rtc/constants.py +++ b/src/cl_sii/rtc/constants.py @@ -66,7 +66,6 @@ @enum.unique class RolContribuyenteEnCesion(enum.Enum): - """ "Rol" of "contribuyente" in a "cesion". """ diff --git a/src/cl_sii/rut/__init__.py b/src/cl_sii/rut/__init__.py index c5aeb29e..4b12b74e 100644 --- a/src/cl_sii/rut/__init__.py +++ b/src/cl_sii/rut/__init__.py @@ -9,6 +9,7 @@ ``'76042235-5'``, ``'96874030-K'``. """ + import itertools import random import re @@ -17,7 +18,6 @@ class Rut: - """ Representation of a RUT. diff --git a/src/cl_sii/rut/constants.py b/src/cl_sii/rut/constants.py index 832dc2b8..b8adb364 100644 --- a/src/cl_sii/rut/constants.py +++ b/src/cl_sii/rut/constants.py @@ -5,6 +5,7 @@ https://github.com/fyntex/lib-cl-sii-python/blob/f57a326/cl_sii/data/ref/factura_electronica/schemas-xml/SiiTypes_v10.xsd#L127-L136 """ + import re import cryptography.x509 From 829fe866e4a6f45f83e88cf7aa990f5eded8c2c5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 5 Feb 2024 23:50:06 +0000 Subject: [PATCH 05/13] chore: Bump the production-dependencies group with 5 updates Bumps the production-dependencies group with 5 updates: | Package | From | To | | --- | --- | --- | | [actions/cache](https://github.com/actions/cache) | `3.3.2` | `4.0.0` | | [codecov/codecov-action](https://github.com/codecov/codecov-action) | `3.1.4` | `4.0.1` | | [actions/upload-artifact](https://github.com/actions/upload-artifact) | `4.0.0` | `4.3.1` | | [actions/dependency-review-action](https://github.com/actions/dependency-review-action) | `3.1.4` | `4.0.0` | | [actions/download-artifact](https://github.com/actions/download-artifact) | `4.1.0` | `4.1.2` | Updates `actions/cache` from 3.3.2 to 4.0.0 - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.3.2...v4.0.0) Updates `codecov/codecov-action` from 3.1.4 to 4.0.1 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3.1.4...v4.0.1) Updates `actions/upload-artifact` from 4.0.0 to 4.3.1 - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v4.0.0...v4.3.1) Updates `actions/dependency-review-action` from 3.1.4 to 4.0.0 - [Release notes](https://github.com/actions/dependency-review-action/releases) - [Commits](https://github.com/actions/dependency-review-action/compare/v3.1.4...v4.0.0) Updates `actions/download-artifact` from 4.1.0 to 4.1.2 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4.1.0...v4.1.2) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-minor dependency-group: production-dependencies - dependency-name: actions/dependency-review-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: production-dependencies - dependency-name: actions/download-artifact dependency-type: direct:production update-type: version-update:semver-patch dependency-group: production-dependencies ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/dependency-review.yaml | 2 +- .github/workflows/deploy.yaml | 4 ++-- .github/workflows/release.yaml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5839e4f2..0820b911 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -45,7 +45,7 @@ jobs: run: make python-virtualenv PYTHON_VIRTUALENV_DIR="venv" - name: Restoring/Saving Cache - uses: actions/cache@v3.3.2 + uses: actions/cache@v4.0.0 with: path: "venv" key: py-v1-deps-${{ runner.os }}-${{ matrix.python_version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }} @@ -83,7 +83,7 @@ jobs: python-version: "${{ matrix.python_version }}" - name: Restoring/Saving Cache - uses: actions/cache@v3.3.2 + uses: actions/cache@v4.0.0 with: path: "venv" key: py-v1-deps-${{ runner.os }}-${{ matrix.python_version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }} @@ -122,7 +122,7 @@ jobs: make test-coverage-report - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3.1.4 + uses: codecov/codecov-action@v4.0.1 with: token: ${{ secrets.CODECOV_TOKEN }} directory: ./test-reports/coverage/ @@ -137,7 +137,7 @@ jobs: - name: Store Artifacts if: ${{ always() }} - uses: actions/upload-artifact@v4.0.0 + uses: actions/upload-artifact@v4.3.1 with: name: test_reports_${{ matrix.python_version }} path: test-reports/ diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index dcea71d1..7c3ea70c 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -24,6 +24,6 @@ jobs: uses: actions/checkout@v4.1.1 - name: Dependency Review - uses: actions/dependency-review-action@v3.1.4 + uses: actions/dependency-review-action@v4.0.0 with: fail-on-severity: critical diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index ead87069..99976c0a 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -47,13 +47,13 @@ jobs: python-version: "3.10.9" - name: Restoring/Saving Cache - uses: actions/cache@v3.3.2 + uses: actions/cache@v4.0.0 with: path: "venv" key: py-v1-deps-${{ runner.os }}-${{ steps.set_up_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }} - name: Restore Artifacts (Release) - uses: actions/download-artifact@v4.1.0 + uses: actions/download-artifact@v4.1.2 with: name: release path: ${{ inputs.artifacts_path }}/ diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 46d9bcb1..5e603c19 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -47,7 +47,7 @@ jobs: run: make python-virtualenv PYTHON_VIRTUALENV_DIR="venv" - name: Restoring/Saving Cache - uses: actions/cache@v3.3.2 + uses: actions/cache@v4.0.0 with: path: "venv" key: py-v1-deps-${{ runner.os }}-${{ steps.set_up_python.outputs.python-version }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}-${{ hashFiles('Makefile', 'make/**.mk') }} @@ -68,7 +68,7 @@ jobs: make dist - name: Store Artifacts - uses: actions/upload-artifact@v4.0.0 + uses: actions/upload-artifact@v4.3.1 with: name: release path: ${{ env.ARTIFACTS_PATH }}/ From 9b7d277392802e66635b638e35a7561897774233 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Feb 2024 20:11:11 +0000 Subject: [PATCH 06/13] chore: Bump signxml from 3.2.1 to 3.2.2 Bumps [signxml](https://github.com/kislyuk/signxml) from 3.2.1 to 3.2.2. - [Release notes](https://github.com/kislyuk/signxml/releases) - [Changelog](https://github.com/XML-Security/signxml/blob/develop/Changes.rst) - [Commits](https://github.com/kislyuk/signxml/compare/v3.2.1...v3.2.2) --- updated-dependencies: - dependency-name: signxml dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 41b2e6fa..149e705c 100644 --- a/requirements.in +++ b/requirements.in @@ -16,4 +16,4 @@ marshmallow==3.20.1 pydantic==2.6.0 pyOpenSSL==23.2.0 pytz==2023.3.post1 -signxml==3.2.1 +signxml==3.2.2 diff --git a/requirements.txt b/requirements.txt index f6b4a65c..49eb9e1f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -72,7 +72,7 @@ rpds-py==0.10.6 # via # jsonschema # referencing -signxml==3.2.1 +signxml==3.2.2 # via -r requirements.in sqlparse==0.4.4 # via django From 04944394070d139549c5e3bf0cef7bed921f3c16 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:57:20 +0000 Subject: [PATCH 07/13] chore: Bump pydantic from 2.6.0 to 2.6.1 Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.6.0 to 2.6.1. - [Release notes](https://github.com/pydantic/pydantic/releases) - [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md) - [Commits](https://github.com/pydantic/pydantic/compare/v2.6.0...v2.6.1) --- updated-dependencies: - dependency-name: pydantic dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements.in b/requirements.in index 149e705c..de12e5cc 100644 --- a/requirements.in +++ b/requirements.in @@ -13,7 +13,7 @@ importlib-metadata==6.1.0 jsonschema==4.21.1 lxml==4.9.4 marshmallow==3.20.1 -pydantic==2.6.0 +pydantic==2.6.1 pyOpenSSL==23.2.0 pytz==2023.3.post1 signxml==3.2.2 diff --git a/requirements.txt b/requirements.txt index 49eb9e1f..6e408707 100644 --- a/requirements.txt +++ b/requirements.txt @@ -51,9 +51,9 @@ pkgutil-resolve-name==1.3.10 # via jsonschema pycparser==2.20 # via cffi -pydantic==2.6.0 +pydantic==2.6.1 # via -r requirements.in -pydantic-core==2.16.1 +pydantic-core==2.16.2 # via pydantic pyopenssl==23.2.0 # via From 4da973d5c2fd5a50c54e21c310612108318a7dc5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:06:00 +0000 Subject: [PATCH 08/13] chore: Bump pyopenssl from 23.2.0 to 24.0.0 Bumps [pyopenssl](https://github.com/pyca/pyopenssl) from 23.2.0 to 24.0.0. - [Changelog](https://github.com/pyca/pyopenssl/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pyca/pyopenssl/compare/23.2.0...24.0.0) --- updated-dependencies: - dependency-name: pyopenssl dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index de12e5cc..3565eaf4 100644 --- a/requirements.in +++ b/requirements.in @@ -14,6 +14,6 @@ jsonschema==4.21.1 lxml==4.9.4 marshmallow==3.20.1 pydantic==2.6.1 -pyOpenSSL==23.2.0 +pyOpenSSL==24.0.0 pytz==2023.3.post1 signxml==3.2.2 diff --git a/requirements.txt b/requirements.txt index 6e408707..2f643744 100644 --- a/requirements.txt +++ b/requirements.txt @@ -55,7 +55,7 @@ pydantic==2.6.1 # via -r requirements.in pydantic-core==2.16.2 # via pydantic -pyopenssl==23.2.0 +pyopenssl==24.0.0 # via # -r requirements.in # signxml From 796f7f1680bb445e9267e63bae98ba137f81b57b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:13:29 +0000 Subject: [PATCH 09/13] chore: Bump pytz from 2023.3.post1 to 2024.1 Bumps [pytz](https://github.com/stub42/pytz) from 2023.3.post1 to 2024.1. - [Release notes](https://github.com/stub42/pytz/releases) - [Commits](https://github.com/stub42/pytz/compare/release_2023.3.post1...release_2024.1) --- updated-dependencies: - dependency-name: pytz dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 3565eaf4..2533652b 100644 --- a/requirements.in +++ b/requirements.in @@ -15,5 +15,5 @@ lxml==4.9.4 marshmallow==3.20.1 pydantic==2.6.1 pyOpenSSL==24.0.0 -pytz==2023.3.post1 +pytz==2024.1 signxml==3.2.2 diff --git a/requirements.txt b/requirements.txt index 2f643744..c1760c94 100644 --- a/requirements.txt +++ b/requirements.txt @@ -59,7 +59,7 @@ pyopenssl==24.0.0 # via # -r requirements.in # signxml -pytz==2023.3.post1 +pytz==2024.1 # via # -r requirements.in # django From 180027d37de42ee5eec076b592adbaf501a1e1af Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:26:31 +0000 Subject: [PATCH 10/13] chore: Bump marshmallow from 3.20.1 to 3.20.2 Bumps [marshmallow](https://github.com/marshmallow-code/marshmallow) from 3.20.1 to 3.20.2. - [Changelog](https://github.com/marshmallow-code/marshmallow/blob/dev/CHANGELOG.rst) - [Commits](https://github.com/marshmallow-code/marshmallow/compare/3.20.1...3.20.2) --- updated-dependencies: - dependency-name: marshmallow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements.in | 2 +- requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.in b/requirements.in index 2533652b..02a3a75d 100644 --- a/requirements.in +++ b/requirements.in @@ -12,7 +12,7 @@ djangorestframework>=3.10.3,<3.15 importlib-metadata==6.1.0 jsonschema==4.21.1 lxml==4.9.4 -marshmallow==3.20.1 +marshmallow==3.20.2 pydantic==2.6.1 pyOpenSSL==24.0.0 pytz==2024.1 diff --git a/requirements.txt b/requirements.txt index c1760c94..30d7da70 100644 --- a/requirements.txt +++ b/requirements.txt @@ -43,7 +43,7 @@ lxml==4.9.4 # via # -r requirements.in # signxml -marshmallow==3.20.1 +marshmallow==3.20.2 # via -r requirements.in packaging==23.1 # via marshmallow From f0aacc63ff252a860f636657398bed7e37766b67 Mon Sep 17 00:00:00 2001 From: Jose Tomas Robles Hahn Date: Mon, 5 Feb 2024 19:09:42 -0300 Subject: [PATCH 11/13] chore(deps): Update `lxml` from 4.9.4 to 5.1.0 - [Software Repository](https://pypi.org/project/lxml/5.1.0/) - [Release notes](https://github.com/lxml/lxml/blob/lxml-5.1.0/CHANGES.txt#L5) - [Changelog](https://github.com/lxml/lxml/blob/lxml-5.1.0/CHANGES.txt#L5) - [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.4...lxml-5.1.0) --- requirements.in | 2 +- requirements.txt | 2 +- setup.py | 2 +- src/tests/test_libs_xml_utils.py | 10 +++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/requirements.in b/requirements.in index 02a3a75d..313df023 100644 --- a/requirements.in +++ b/requirements.in @@ -11,7 +11,7 @@ Django>=2.2.24 djangorestframework>=3.10.3,<3.15 importlib-metadata==6.1.0 jsonschema==4.21.1 -lxml==4.9.4 +lxml==5.1.0 marshmallow==3.20.2 pydantic==2.6.1 pyOpenSSL==24.0.0 diff --git a/requirements.txt b/requirements.txt index 30d7da70..4c5cd68f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -39,7 +39,7 @@ jsonschema==4.21.1 # via -r requirements.in jsonschema-specifications==2023.7.1 # via jsonschema -lxml==4.9.4 +lxml==5.1.0 # via # -r requirements.in # signxml diff --git a/setup.py b/setup.py index 838138ae..6d84bfb1 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def get_version(*file_paths: str) -> str: 'cryptography>=38.0.0', 'defusedxml>=0.6.0,<1', 'jsonschema>=3.1.1', - 'lxml>=4.6.5,<5', + 'lxml>=4.6.5,<6', 'marshmallow>=3,<4', 'pydantic>=2.3.0,!=1.7.*,!=1.8.*,!=1.9.*', 'pyOpenSSL>=22.0.0', diff --git a/src/tests/test_libs_xml_utils.py b/src/tests/test_libs_xml_utils.py index 2ab5c33c..e30c7f45 100644 --- a/src/tests/test_libs_xml_utils.py +++ b/src/tests/test_libs_xml_utils.py @@ -51,17 +51,21 @@ def test_attack_billion_laughs_1(self) -> None: self.assertSequenceEqual( cm.exception.args, - ("XML syntax error. Detected an entity reference loop, line 1, column 7.",), + ( + "XML syntax error." + " Maximum entity amplification factor exceeded, see xmlCtxtSetMaxAmplification.," + " line 1, column 25.", + ), ) def test_attack_billion_laughs_2(self) -> None: value = read_test_file_bytes('test_data/xml/attacks/billion-laughs-2.xml') - with self.assertRaises(XmlSyntaxError) as cm: + with self.assertRaises(XmlFeatureForbidden) as cm: parse_untrusted_xml(value) self.assertSequenceEqual( cm.exception.args, - ("XML syntax error. Detected an entity reference loop, line 1, column 4.",), + ("XML uses or contains a forbidden feature.",), ) def test_attack_quadratic_blowup(self) -> None: From db9cea7e37caeaff934dd447fc96021f6be08dcf Mon Sep 17 00:00:00 2001 From: Samuel Villegas Date: Wed, 7 Feb 2024 11:16:16 -0300 Subject: [PATCH 12/13] chore: Update history for new version --- HISTORY.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/HISTORY.md b/HISTORY.md index 99bc14d0..f20f42f4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,18 @@ # History +## 0.27.0 (2024-02-07) + +- (PR #593, 2024-02-01) chore: Bump pydantic from 2.5.3 to 2.6.0 +- (PR #592, 2024-02-05) chore: Bump lxml from 4.9.2 to 4.9.4 +- (PR #595, 2024-02-05) chore: Bump the development-dependencies group with 6 updates +- (PR #596, 2024-02-05) chore: Bump the production-dependencies group with 5 updates +- (PR #599, 2024-02-07) chore: Bump signxml from 3.2.1 to 3.2.2 +- (PR #598, 2024-02-07) chore: Bump pydantic from 2.6.0 to 2.6.1 +- (PR #600, 2024-02-07) chore: Bump pyopenssl from 23.2.0 to 24.0.0 +- (PR #597, 2024-02-07) chore: Bump pytz from 2023.3.post1 to 2024.1 +- (PR #601, 2024-02-07) chore: Bump marshmallow from 3.20.1 to 3.20.2 +- (PR #602, 2024-02-07) chore(deps): Update `lxml` from 4.9.4 to 5.1.0 + ## 0.26.0 (2024-01-30) - (PR #586, 2024-01-30) fix: Add default value for missing code `098` in SII CTE Form 29 From 46e5327ff08ca673919263b763970357de9fd1ff Mon Sep 17 00:00:00 2001 From: Samuel Villegas Date: Wed, 7 Feb 2024 11:16:23 -0300 Subject: [PATCH 13/13] chore: Bump version from 0.26.0 to 0.27.0 --- .bumpversion.cfg | 2 +- src/cl_sii/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 476ccaa3..c7dba797 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.26.0 +current_version = 0.27.0 commit = True tag = False message = chore: Bump version from {current_version} to {new_version} diff --git a/src/cl_sii/__init__.py b/src/cl_sii/__init__.py index a52b8e28..1164314c 100644 --- a/src/cl_sii/__init__.py +++ b/src/cl_sii/__init__.py @@ -4,4 +4,4 @@ """ -__version__ = '0.26.0' +__version__ = '0.27.0'