Skip to content

Fix deprecation warning for Cryptography 44.0.0 or newer#87

Merged
jborean93 merged 2 commits into
jborean93:mainfrom
hamarituc:arc4
Jul 23, 2024
Merged

Fix deprecation warning for Cryptography 44.0.0 or newer#87
jborean93 merged 2 commits into
jborean93:mainfrom
hamarituc:arc4

Conversation

@hamarituc

Copy link
Copy Markdown
Contributor

Starting with cryptography-44.0.0 the ARC4 cipher was relocated to a module for deprecated ciphers. It needs to be imported from there now.

Starting with cryptography-44.0.0 the ARC4 cipher was relocated to a
module for deprecated ciphers. It needs to be imported from there now.
@jborean93

jborean93 commented Jul 23, 2024

Copy link
Copy Markdown
Owner

Thanks for the PR, I probably would prefer to keep the older import as a fallback in case someone still running with an older cryptography version.

I’ll probably need to also figure out another way forward for the future as it looks like it’ll be removed from cryptography as well in a future release but for now let’s get it working.

Edit: I misread the changelog, it’ll still be there, the old import will be removed in the future.

@codecov

codecov Bot commented Jul 23, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 99.92%. Comparing base (2811a7e) to head (e51fa02).

Files Patch % Lines
src/spnego/_ntlm_raw/crypto.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
- Coverage   99.96%   99.92%   -0.04%     
==========================================
  Files          30       30              
  Lines        5361     5365       +4     
==========================================
+ Hits         5359     5361       +2     
- Misses          2        4       +2     
Flag Coverage Δ
arm64 ?
heimdal 96.32% <66.66%> (-0.04%) ⬇️
macOS 94.70% <66.66%> (-0.04%) ⬇️
mit 96.45% <66.66%> (-0.04%) ⬇️
py3.10 99.88% <66.66%> (-0.04%) ⬇️
py3.11 99.88% <66.66%> (-0.04%) ⬇️
py3.12 99.88% <66.66%> (-0.04%) ⬇️
py3.8 99.88% <66.66%> (-0.04%) ⬇️
py3.9 99.92% <66.66%> (-0.04%) ⬇️
sspi 95.84% <66.66%> (-0.04%) ⬇️
ubuntu 96.51% <66.66%> (-0.04%) ⬇️
windows 95.84% <66.66%> (-0.04%) ⬇️
x64 99.92% <66.66%> (-0.04%) ⬇️
x86 95.80% <66.66%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jborean93

Copy link
Copy Markdown
Owner

Thanks for fixing this up, I pushed a small commit that cleaned up some metadata and added the old import back in as a fallback.

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.

2 participants