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

Deprecated sslcontext with no Arg #105

Merged
merged 3 commits into from
Oct 27, 2023
Merged

Deprecated sslcontext with no Arg #105

merged 3 commits into from
Oct 27, 2023

Conversation

clavedeluna
Copy link
Contributor

@clavedeluna clavedeluna commented Oct 27, 2023

Overview

upgrade-sslcontext-tls codemod now handles deprecated case of SSLContext() with no args

Description

"Deprecated since version 3.10: SSLContext without protocol argument is deprecated. The context class will either require PROTOCOL_TLS_CLIENT or PROTOCOL_TLS_SERVER protocol in the future."

To gracefully handle this case and accommodate the existing cases too, I refactored the codemod to use the newest api code. This meant that, like some other codemods (secure-tempfile) we're adding import ssl in some cases such as import aliasing.

@codecov
Copy link

codecov bot commented Oct 27, 2023

Codecov Report

Merging #105 (40cf285) into main (2bdc9dc) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #105      +/-   ##
==========================================
- Coverage   95.72%   95.71%   -0.01%     
==========================================
  Files          62       62              
  Lines        2528     2523       -5     
==========================================
- Hits         2420     2415       -5     
  Misses        108      108              
Files Coverage Δ
src/codemodder/codemods/api/helpers.py 100.00% <100.00%> (ø)
src/core_codemods/upgrade_sslcontext_tls.py 100.00% <100.00%> (ø)

@clavedeluna clavedeluna merged commit 9b80e96 into main Oct 27, 2023
11 checks passed
@clavedeluna clavedeluna deleted the ssl branch October 27, 2023 14:12
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.

3 participants