Skip to content

Commit 90f5d6a

Browse files
committed
Merge branch 'master' into add-python-requires
2 parents a351b34 + 4b0701b commit 90f5d6a

File tree

17 files changed

+57
-91
lines changed

17 files changed

+57
-91
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,73 +6,75 @@ on:
66
pull_request:
77
branches:
88
- master
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
11+
cancel-in-progress: true
912
jobs:
1013
test:
1114
timeout-minutes: 30
1215
strategy:
1316
fail-fast: false
1417
matrix:
15-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "pypy3"]
18+
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "pypy3.9"]
1619
os: [ubuntu-latest, macos-latest, windows-latest]
1720
exclude:
1821
- os: macos-latest
19-
python-version: "pypy3"
22+
python-version: "pypy3.9"
2023
- os: windows-latest
21-
python-version: "pypy3"
24+
python-version: "pypy3.9"
2225
runs-on: ${{ matrix.os }}
2326
name: "${{ matrix.os }} Python: ${{ matrix.python-version }}"
2427
steps:
25-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v3
2629
with:
2730
fetch-depth: 0
2831
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v2
32+
uses: actions/setup-python@v4
3033
with:
3134
python-version: ${{ matrix.python-version }}
3235
- name: Install dependencies
3336
run: |
34-
pip install -U "pip>=21.1"
35-
pip install -U setuptools
36-
pip install -U "tox>=3.23.0,<4" codecov tox-gh-actions coverage
37+
pip install -U "pip>=23.1.2"
38+
pip install -U "tox-gh-actions==3.1.0" coverage
3739
- name: Log python & pip versions
3840
run: |
3941
python --version
4042
pip --version
4143
- name: Run unit tests
4244
run: tox
43-
- name: "Coverage report"
45+
- name: Coverage report
4446
run: coverage xml
45-
- name: "Upload coverage to Codecov"
46-
uses: "codecov/codecov-action@v1"
47+
- name: Upload coverage to Codecov
48+
uses: codecov/codecov-action@v3
4749
with:
48-
fail_ci_if_error: true
50+
fail_ci_if_error: false
4951
linting:
5052
runs-on: ubuntu-latest
5153
steps:
52-
- uses: actions/checkout@v2
53-
- uses: actions/setup-python@v2
54+
- uses: actions/checkout@v3
55+
- uses: actions/setup-python@v4
5456
with:
55-
python-version: 3.8
57+
python-version: 3.9
5658
- name: Install dependencies
5759
run: |
5860
pip install -U setuptools
59-
pip install -U "tox>=3.23.0,<4"
61+
pip install -U "tox>=4.5.1,<5"
6062
- run: tox -e lint
6163
package:
62-
name: "Build & verify package"
64+
name: Build & verify package
6365
runs-on: "ubuntu-latest"
6466
steps:
65-
- uses: "actions/checkout@v2"
66-
- uses: "actions/setup-python@v2"
67+
- uses: actions/checkout@v3
68+
- uses: actions/setup-python@v4
6769
with:
68-
python-version: "3.8"
69-
- name: "Install build, check-wheel-content, and twine"
70+
python-version: "3.9"
71+
- name: Install build, check-wheel-content, and twine
7072
run: "python -m pip install build twine check-wheel-contents"
71-
- name: "Build package"
73+
- name: Build package
7274
run: "python -m build --sdist --wheel ."
73-
- name: "List result"
75+
- name: List result
7476
run: "ls -l dist"
75-
- name: "Check wheel contents"
77+
- name: Check wheel contents
7678
run: "check-wheel-contents dist/*.whl"
77-
- name: "Check long_description"
79+
- name: Check long_description
7880
run: "python -m twine check dist/*"

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog #
22

3+
## 3.4.0 -- UNPUBLISHED ##
4+
5+
### News ###
6+
7+
* Remove support for python 3.6
8+
9+
### Housekeeping ###
10+
11+
* Updated Github Actions Workflows
12+
* Updated to use tox 4.x
13+
* Revise codecov integration
14+
15+
316
## 3.3.0 -- 2021-06-04 ##
417

518
### News ###
@@ -17,7 +30,6 @@
1730
* Updated Syntax to use Python 3.6+
1831
* Upgrade to latest pytest, remove used dev requirements.
1932

20-
2133
## 3.2.0 -- 2020-07-29 ##
2234

2335
### News ###
@@ -39,8 +51,6 @@
3951

4052
* Fixed some typos #160, #162, and #164
4153

42-
43-
4454
## 3.1.0 -- 2019-12-10 ##
4555

4656
This is a greatly overdue release.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
# All configuration values have a default; values that are commented out
1111
# serve to show the default.
1212

13-
import sys
1413
import os
14+
import sys
1515

1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the

jose/backends/rsa_backend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ def public_key(self):
221221
return self.__class__(pyrsa.PublicKey(n=self._prepared_key.n, e=self._prepared_key.e), self._algorithm)
222222

223223
def to_pem(self, pem_format="PKCS8"):
224-
225224
if isinstance(self._prepared_key, pyrsa.PrivateKey):
226225
der = self._prepared_key.save_pkcs1(format="DER")
227226
if pem_format == "PKCS8":

jose/jws.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import binascii
22
import json
3-
from collections.abc import Iterable, Mapping
3+
4+
try:
5+
from collections.abc import Iterable, Mapping
6+
except ImportError:
7+
from collections import Mapping, Iterable
48

59
from jose import jwk
610
from jose.backends.base import Key
@@ -215,7 +219,6 @@ def _sig_matches_keys(keys, signing_input, signature, alg):
215219

216220

217221
def _get_keys(key):
218-
219222
if isinstance(key, Key):
220223
return (key,)
221224

@@ -248,7 +251,6 @@ def _get_keys(key):
248251

249252

250253
def _verify_signature(signing_input, header, signature, key="", algorithms=None):
251-
252254
alg = header.get("alg")
253255
if not alg:
254256
raise JWSError("No algorithm was specified in the JWS header.")

jose/jwt.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import json
22
from calendar import timegm
3-
from collections.abc import Mapping
3+
4+
try:
5+
from collections.abc import Mapping
6+
except ImportError:
7+
from collections import Mapping
48
from datetime import datetime, timedelta
59

610
from jose import jws
@@ -42,7 +46,6 @@ def encode(claims, key, algorithm=ALGORITHMS.HS256, headers=None, access_token=N
4246
"""
4347

4448
for time_claim in ["exp", "iat", "nbf"]:
45-
4649
# Convert datetime to a intDate value in known time-format claims
4750
if isinstance(claims.get(time_claim), datetime):
4851
claims[time_claim] = timegm(claims[time_claim].utctimetuple())
@@ -456,7 +459,6 @@ def _validate_at_hash(claims, access_token, algorithm):
456459

457460

458461
def _validate_claims(claims, audience=None, issuer=None, subject=None, algorithm=None, access_token=None, options=None):
459-
460462
leeway = options.get("leeway", 0)
461463

462464
if isinstance(leeway, timedelta):

jose/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
def long_to_bytes(n, blocksize=0):
1010
return _long_to_bytes(n, blocksize or None)
1111

12-
1312
except ImportError:
1413
from ecdsa.ecdsa import int_to_string as _long_to_bytes
1514

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PyYAML==5.4.1
22
cov-core==1.15.0
33
coverage==5.5
44
coveralls==1.5.1
5-
cryptography==3.4.7
5+
cryptography==39.0.1
66
docopt==0.6.2
77
pytest==6.2.3
88
pytest-cov==2.11.1

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ classifiers =
2121
Programming Language :: Python
2222
Programming Language :: Python :: 3
2323
Programming Language :: Python :: 3 :: Only
24-
Programming Language :: Python :: 3.6
2524
Programming Language :: Python :: 3.7
2625
Programming Language :: Python :: 3.8
2726
Programming Language :: Python :: 3.9
2827
Programming Language :: Python :: 3.10
28+
Programming Language :: Python :: 3.11
2929
Programming Language :: Python :: Implementation :: PyPy
3030
Topic :: Utilities
3131

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/usr/bin/env python
22
from setuptools import setup
33

4-
54
setup()

0 commit comments

Comments
 (0)