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

Move away from deprecated methods #85

Merged
merged 1 commit into from
May 4, 2018
Merged

Move away from deprecated methods #85

merged 1 commit into from
May 4, 2018

Conversation

nelz9999
Copy link
Contributor

@nelz9999 nelz9999 commented Apr 6, 2018

I noticed that running the project unit test in pytest, I was getting some of the following Warnings:

tests/algorithms/test_EC.py::TestECAlgorithm::()::test_signing_parity[CryptographyECKey-ECDSAECKey]
  ~/python-jose/jose/backends/cryptography_backend.py:104: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
    verifier = self.prepared_key.verifier(signature, ec.ECDSA(self.hash_alg()))

tests/algorithms/test_RSA.py::TestRSAAlgorithm::()::test_signing_parity[CryptographyRSAKey-CryptographyRSAKey]
  ~/python-jose/jose/backends/cryptography_backend.py:257: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
    self.hash_alg()
  ~/python-jose/jose/backends/cryptography_backend.py:269: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
    self.hash_alg()

This PR moves from verifier->verify and signer->sign.

I would love a decent review of this code, just to double check that I didn't borken anything.

@codecov-io
Copy link

codecov-io commented Apr 6, 2018

Codecov Report

Merging #85 into master will decrease coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
- Coverage   93.69%   93.65%   -0.05%     
==========================================
  Files          12       12              
  Lines         841      835       -6     
==========================================
- Hits          788      782       -6     
  Misses         53       53
Impacted Files Coverage Δ
jose/backends/cryptography_backend.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c97f18a...cb48006. Read the comment docs.

@zejn
Copy link
Collaborator

zejn commented May 4, 2018

Looks good to me. /cc @mpdavis

@mpdavis
Copy link
Owner

mpdavis commented May 4, 2018

lgtm

@mpdavis mpdavis merged commit caaa1a4 into mpdavis:master May 4, 2018
@nelz9999 nelz9999 deleted the backend-crypto-verifier branch May 6, 2018 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants