Skip to content

add Python 3.10 rc #87

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

Merged
merged 9 commits into from
Sep 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.10.0-rc.2"
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -33,6 +34,8 @@ jobs:
run: |
pip install poetry
poetry config virtualenvs.in-project true
- name: Python 3.10 workaround
run: poetry config experimental.new-installer false
- name: Install dependencies
run: poetry install
- name: Run pytest
Expand Down
80 changes: 53 additions & 27 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ jwkconv = "cryptojwt.tools.keyconv:main"
jwtpeek = "cryptojwt.tools.jwtpeek:main"

[tool.poetry.dependencies]
python = "^3.6"
python = "^3.6.2"
cryptography = "^3.4.6"
requests = "^2.25.1"
readerwriterlock = "^1.0.9"

[tool.poetry.dev-dependencies]
alabaster = "^0.7.12"
black = "^20.8b1"
black = "^21.5b1"
isort = "^5.6.4"
pytest = "^6.1.2"
pytest-black = "^0.3.12"
Expand Down
2 changes: 1 addition & 1 deletion src/cryptojwt/key_issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


class KeyIssuer(object):
""" A key issuer instance contains a number of KeyBundles. """
"""A key issuer instance contains a number of KeyBundles."""

params = {
"ca_certs": None,
Expand Down
2 changes: 1 addition & 1 deletion src/cryptojwt/key_jar.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


class KeyJar(object):
""" A keyjar contains a number of KeyBundles sorted by owner/issuer """
"""A keyjar contains a number of KeyBundles sorted by owner/issuer"""

def __init__(
self,
Expand Down
4 changes: 2 additions & 2 deletions src/cryptojwt/serialize/item.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
class KeyIssuer:
@staticmethod
def serialize(item: key_issuer.KeyIssuer) -> str:
""" Convert from KeyIssuer to JSON """
"""Convert from KeyIssuer to JSON"""
return json.dumps(item.dump(exclude_attributes=["keybundle_cls"]))

def deserialize(self, spec: str) -> key_issuer.KeyIssuer:
""" Convert from JSON to KeyIssuer """
"""Convert from JSON to KeyIssuer"""
_dict = json.loads(spec)
issuer = key_issuer.KeyIssuer().load(_dict)
return issuer
2 changes: 1 addition & 1 deletion src/cryptojwt/tools/keyconv.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def output_bytes(data: bytes, binary: bool = False, filename: Optional[str] = No


def main():
""" Main function"""
"""Main function"""
parser = argparse.ArgumentParser(description="JWK Conversion Utility")

parser.add_argument("--kid", dest="kid", metavar="key_id", help="Key ID")
Expand Down
2 changes: 1 addition & 1 deletion src/cryptojwt/tools/keygen.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


def main():
""" Main function"""
"""Main function"""
parser = argparse.ArgumentParser(description="JSON Web Key (JWK) Generator")

parser.add_argument("--kty", dest="kty", metavar="type", help="Key type", required=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_04_key_jar.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ def setup(self):
self.sjwt_b = _jws.sign_compact([sig_key])

def test_no_kid_multiple_keys(self):
""" This is extremely strict """
"""This is extremely strict"""
_jwt = factory(self.sjwt_a)
# remove kid reference
_jwt.jwt.headers["kid"] = ""
Expand Down