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

refactor: migrate from urllib to requests #1569

Merged
merged 6 commits into from Feb 16, 2022

Conversation

BreadGenie
Copy link
Contributor

@BreadGenie BreadGenie changed the title Request migrate refactor: migrate from urllib to requests Feb 5, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #1569 (2285ef1) into main (7dd0d75) will increase coverage by 2.77%.
The diff coverage is 65.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1569      +/-   ##
==========================================
+ Coverage   80.34%   83.11%   +2.77%     
==========================================
  Files         281      281              
  Lines        5581     5574       -7     
  Branches      911      913       +2     
==========================================
+ Hits         4484     4633     +149     
+ Misses        899      750     -149     
+ Partials      198      191       -7     
Flag Coverage Δ
longtests 83.11% <65.21%> (+2.77%) ⬆️

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

Impacted Files Coverage Δ
cve_bin_tool/checkers/sqlite.py 57.44% <20.00%> (+0.30%) ⬆️
cve_bin_tool/version.py 64.70% <50.00%> (-3.72%) ⬇️
cve_bin_tool/available_fix/redhat_cve_tracker.py 80.35% <75.00%> (+9.66%) ⬆️
cve_bin_tool/available_fix/debian_cve_tracker.py 83.67% <100.00%> (+5.67%) ⬆️
test/test_json.py 90.00% <100.00%> (+20.00%) ⬆️
test/utils.py 93.54% <100.00%> (ø)
cve_bin_tool/nvd_api.py 81.00% <0.00%> (-5.00%) ⬇️
cve_bin_tool/helper_script.py 41.29% <0.00%> (ø)
cve_bin_tool/version_scanner.py 57.42% <0.00%> (+0.99%) ⬆️
cve_bin_tool/extractor.py 65.21% <0.00%> (+1.24%) ⬆️
... and 11 more

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 7dd0d75...2285ef1. Read the comment docs.

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great. I think you're right about .ConnectionError not being the right one, but if we address that this should be ready to merge.

Copy link
Contributor

@terriko terriko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thanks for doing this! I see CI got rate limited in the long tests but otherwise looks fine.

@terriko terriko merged commit 49b4b24 into intel:main Feb 16, 2022
@BreadGenie BreadGenie deleted the request-migrate branch February 18, 2022 13:10
terriko pushed a commit to terriko/cve-bin-tool that referenced this pull request Mar 9, 2022
)

* refactor: migrate from urllib to requests

* chore(deps): add request in requirements

* fix: readlines() in sqlite checker

* refactor: `requests.exceptions.HTTPError` -> `requests.ConnectionError`

* refactor: requests.ConnectionError -> requests.RequestException
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.

Refactor: requests library vs urlib*
3 participants