Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci updates #313

Merged
merged 9 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
8 changes: 0 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,6 @@ jobs:
os: ubuntu-18.04
python-version: 2.7
tox-env: gmpy2py27
- name: py3.3
os: ubuntu-18.04
python-version: 3.3
tox-env: py33
- name: py3.4
os: ubuntu-18.04
python-version: 3.4
tox-env: py34
- name: py3.5
os: ubuntu-18.04
python-version: 3.5
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ curves over prime fields.
## Dependencies

This library uses only Python and the 'six' package. It is compatible with
Python 2.6, 2.7, and 3.3+. It also supports execution on alternative
Python 2.6, 2.7, and 3.5+. It also supports execution on alternative
implementations like pypy and pypy3.

If `gmpy2` or `gmpy` is installed, they will be used for faster arithmetic.
Expand Down
9 changes: 0 additions & 9 deletions build-requirements-3.3.txt

This file was deleted.

7 changes: 0 additions & 7 deletions build-requirements-3.4.txt

This file was deleted.

4 changes: 1 addition & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@
package_dir={"": "src"},
license="MIT",
cmdclass=commands,
python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*",
python_requires=">=2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
classifiers=[
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
Expand Down
25 changes: 5 additions & 20 deletions src/ecdsa/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,28 +91,13 @@ def int_to_bytes(val, length=None, byteorder="big"):
raise ValueError("Only 'big' or 'little' endian supported")

else:
if sys.version_info < (3, 4): # pragma: no branch
# on python 3.3 hmac.hmac.update() accepts only bytes, on newer
# versions it does accept memoryview() also
def hmac_compat(data):
if not isinstance(data, bytes): # pragma: no branch
return bytes(data)
return data

def normalise_bytes(buffer_object):
"""Cast the input into array of bytes."""
if not buffer_object:
return b""
return memoryview(buffer_object).cast("B")

else:

def hmac_compat(data):
return data
def hmac_compat(data):
return data
neverpanic marked this conversation as resolved.
Show resolved Hide resolved

def normalise_bytes(buffer_object):
"""Cast the input into array of bytes."""
return memoryview(buffer_object).cast("B")
def normalise_bytes(buffer_object):
"""Cast the input into array of bytes."""
return memoryview(buffer_object).cast("B")

def compat26_str(val):
return val
Expand Down
12 changes: 3 additions & 9 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@

[tox]
envlist = py26, py27, py33, py34, py35, py36, py37, py38, py39, py310, py311, py, pypy, pypy3, gmpy2py27, gmpy2py39, gmpy2py310, gmpypy27, gmpypy39, gmpypy310, codechecks
envlist = py26, py27, py35, py36, py37, py38, py39, py310, py311, py, pypy, pypy3, gmpy2py27, gmpy2py39, gmpy2py310, gmpypy27, gmpypy39, gmpypy310, codechecks

[testenv]
deps =
py{33}: py<1.5
py{33}: pytest<3.3
py{33}: enum34
py{33}: hypothesis<3.44
py{26}: unittest2
py{26}: hypothesis<3
py{34}: attrs<21
py{26,27,34,35,36,37,38,39,310,311,py,py3}: pytest
py{27,34,35,36,37,38,39,310,311,py,py3}: hypothesis
py{26,27,35,36,37,38,39,310,311,py,py3}: pytest
py{27,35,36,37,38,39,310,311,py,py3}: hypothesis
gmpy2py{27,39,310,311}: gmpy2
gmpypy{27,39,310,311}: gmpy
gmpy{2py27,2py39,2py310,2py311,py27,py39,py310,py311}: pytest
Expand All @@ -31,7 +26,6 @@ deps =
py27_old_gmpy2: hypothesis
py: pytest
py: hypothesis
py{33}: wheel<0.30
coverage
commands = coverage run --branch -m pytest {posargs:src/ecdsa}

Expand Down