Compatibilidad con Python 3.13

- Actualiza dependencias: cryptography>=41.0.0, pyOpenSSL>=23.2.0,
  xmlsec>=1.3.12, xmlsig>=0.1.9, zeep>=4.2.1, lxml>=5.2.2
- Anade monkey-patch para xades.load_pkcs12 con pyOpenSSL >= 24
  (PKCS12 eliminado de OpenSSL.crypto)
- Reemplaza datetime.utcnow() por datetime.now(timezone.utc)
- Reemplaza APIs deprecadas de lxml en facho.py y codelist
- Migra verificacion PKCS12 de pyOpenSSL a cryptography API en fe.py
- Moderniza typing: Union/Optional/List a sintaxis | y list[]
- Actualiza requirements_dev.txt con versiones recientes
- Actualiza tox.ini y Makefile.dev para Python 3.13
This commit is contained in:
2026-07-02 22:45:33 -05:00
parent f98ab98c9c
commit 93a3d18e32
13 changed files with 89 additions and 74 deletions

View File

@@ -140,12 +140,12 @@ class LXMLBuilder:
attrs['pretty_print'] = attrs.pop('pretty_print', False)
attrs['encoding'] = attrs.pop('encoding', 'UTF-8')
for el in elem.getiterator():
for el in elem.iter():
keys = filter(lambda key: key.startswith('facho_'), el.keys())
self.remove_attributes(el, keys, exclude=['facho_optional'])
is_optional = el.get('facho_optional', 'False') == 'True'
if is_optional and el.getchildren() == [] and el.keys() == [
if is_optional and list(el) == [] and el.keys() == [
'facho_optional']:
el.getparent().remove(el)
@@ -291,7 +291,7 @@ class FachoXML:
# se fuerza la adicion como un nuevo elemento
if append:
last_slibing = None
for child in parent.getchildren():
for child in list(parent):
if child.tag == node_tag:
last_slibing = child