Skip to content

Commit 660c3b1

Browse files
committed
Add support for Python 3.10; drop support for Python 2.7
1 parent 8659769 commit 660c3b1

File tree

9 files changed

+14
-23
lines changed

9 files changed

+14
-23
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ jobs:
99
max-parallel: 8
1010
matrix:
1111
os: [ubuntu-20.04, macos-10.15]
12-
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]
12+
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9", "3.10"]
1313
steps:
14-
- uses: actions/checkout@v1
14+
- uses: actions/checkout@v2
1515
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v1
16+
uses: actions/setup-python@v2
1717
with:
1818
python-version: ${{ matrix.python-version }}
1919
- name: Install

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ test_deps:
22
pip install coverage flake8 wheel
33

44
lint: test_deps
5-
./setup.py flake8
5+
flake8 $$(python setup.py --name) test
66

77
test: test_deps lint
88
coverage run --source=$$(python setup.py --name) ./test/test.py

README.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@ payload security in `SAML 2.0 <http://en.wikipedia.org/wiki/SAML_2.0>`_ and
1414
* Support for exclusive XML canonicalization with inclusive prefixes (`InclusiveNamespaces PrefixList
1515
<http://www.w3.org/TR/xml-exc-c14n/#def-InclusiveNamespaces-PrefixList>`_, required to verify signatures generated by
1616
some SAML implementations)
17-
* Modern Python compatibility (3.5-3.9+ and PyPy)
17+
* Modern Python compatibility (3.5-3.10+ and PyPy)
1818
* Well-supported, portable, reliable dependencies: `lxml <https://github.com/lxml/lxml>`_,
19-
`cryptography <https://github.com/pyca/cryptography>`_, `eight <https://github.com/kislyuk/eight>`_,
20-
`pyOpenSSL <https://github.com/pyca/pyopenssl>`_
19+
`cryptography <https://github.com/pyca/cryptography>`_, `pyOpenSSL <https://github.com/pyca/pyopenssl>`_
2120
* Comprehensive testing (including the XMLDSig interoperability suite) and `continuous integration
2221
<https://github.com/XML-Security/signxml/actions>`_
2322
* Simple interface with useful defaults

common.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ release:
4646
$(MAKE) release-docs
4747

4848
release-pypi:
49-
python setup.py sdist bdist_wheel
49+
python -m build
5050
twine upload dist/*.tar.gz dist/*.whl --sign --verbose
5151

5252
release-docs:

setup.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,13 @@
1515
# Dependencies are restricted by major version range according to semver.
1616
# By default, version minimums are set to be compatible with the oldest supported Ubuntu LTS (currently 18.04).
1717
'lxml >= 4.2.1, < 5',
18-
'eight >= 0.4.2, < 2',
1918
'cryptography >= 2.1.4',
2019
'pyOpenSSL >= 17.5.0, < 21',
2120
'certifi >= 2018.1.18'
2221
],
23-
extras_require={
24-
':python_version == "2.7"': [
25-
'enum34 >= 1.1.6, < 2',
26-
'ipaddress >= 1.0.17, < 2'
27-
]
28-
},
2922
packages=find_packages(exclude=['test']),
3023
platforms=['MacOS X', 'Posix'],
3124
package_data={'signxml': ['schemas/*.xsd']},
32-
zip_safe=False,
3325
include_package_data=True,
3426
test_suite='test',
3527
classifiers=[
@@ -43,6 +35,7 @@
4335
'Programming Language :: Python :: 3.7',
4436
'Programming Language :: Python :: 3.8',
4537
'Programming Language :: Python :: 3.9',
38+
'Programming Language :: Python :: 3.10',
4639
'Topic :: Software Development :: Libraries :: Python Modules'
4740
]
4841
)

signxml/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from base64 import b64encode, b64decode
44
from enum import Enum
55

6-
from eight import str, bytes
76
from lxml import etree
87
from lxml.etree import Element, SubElement
98

signxml/util/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from xml.etree import ElementTree as stdlibElementTree
1212
from base64 import b64encode, b64decode
1313

14-
from eight import str, bytes
1514
from lxml import etree
1615

1716
from ..exceptions import RedundantCert, InvalidCertificate, InvalidInput

test/generate_125_example.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import os.path
44
from base64 import b64encode
55

6-
from eight import str, bytes
76
from lxml import etree
87
from lxml.etree import Element, SubElement
98

test/test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@
1212
import cryptography.exceptions
1313
from cryptography.hazmat.backends import default_backend
1414
from cryptography.hazmat.primitives.asymmetric import rsa, dsa, ec
15-
from eight import str, open
1615

1716
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
18-
from signxml import (XMLSigner, XMLVerifier, XMLSignatureProcessor, methods, namespaces, InvalidInput, InvalidSignature,
19-
InvalidCertificate, InvalidDigest)
17+
from signxml import (XMLSigner, XMLVerifier, XMLSignatureProcessor, methods, namespaces, InvalidInput, # noqa
18+
InvalidSignature, InvalidCertificate, InvalidDigest)
2019

2120
def reset_tree(t, method):
2221
if not isinstance(t, str):
@@ -475,7 +474,10 @@ def test_signature_properties_with_detached_method_re_enveloping(self):
475474
key=key,
476475
reference_uri="#mytest",
477476
signature_properties=sigprop)
478-
fulldoc = b'<ns0:root xmlns:ns0="http://enveloping.namespace">' + etree.tostring(signature) + etree.tostring(doc) + b'</ns0:root>'
477+
fulldoc = b'<ns0:root xmlns:ns0="http://enveloping.namespace">' \
478+
+ etree.tostring(signature) \
479+
+ etree.tostring(doc) \
480+
+ b'</ns0:root>'
479481
XMLVerifier().verify(etree.fromstring(fulldoc), x509_cert=cert, expect_references=2)
480482

481483

0 commit comments

Comments
 (0)