pyupio / pyup

A tool to update your project's dependencies on GitHub. Runs on pyup.io, comes with a command line interface.
https://pyup.io
MIT License
454 stars 67 forks source link

Fix : Create Session object, over multiple requests.get #402

Open jackbayliss opened 3 years ago

jackbayliss commented 3 years ago

This addresses #341

In short, essentially the requests get() method creates a new Session object each time it's called. By creating a Session it'll only create one session object. Making it more efficient!

Tests:

----------------------------------------------------------------------
Ran 271 tests in 0.343s
OK
codecov[bot] commented 3 years ago

Codecov Report

Merging #402 (193cc21) into master (56cfe8c) will increase coverage by 0.00%. The diff coverage is 83.33%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #402   +/-   ##
=======================================
  Coverage   94.24%   94.24%           
=======================================
  Files          11       11           
  Lines        1164     1165    +1     
=======================================
+ Hits         1097     1098    +1     
  Misses         67       67           
Impacted Files Coverage Δ
pyup/requirements.py 88.49% <75.00%> (+0.03%) :arrow_up:
pyup/package.py 100.00% <100.00%> (ø)

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 56cfe8c...193cc21. Read the comment docs.