Skip to content

Change method of getting json data out of HTTP requests#4349

Merged
rakanalh merged 1 commit intoraiden-network:developfrom
lullis:4174_fix_requests_json_parsing
Jul 8, 2019
Merged

Change method of getting json data out of HTTP requests#4349
rakanalh merged 1 commit intoraiden-network:developfrom
lullis:4174_fix_requests_json_parsing

Conversation

@lullis
Copy link
Contributor

@lullis lullis commented Jul 5, 2019

The requests module has some undercover magic of using a different implementation
depending on whether the simplejson package is installed, which makes the built-in
requests.response.json() method unreliable

To avoid this issue, we are removing all calls to response.json() and parsing the
response using python's built-in json module.

Resolves #4174

@lullis lullis requested a review from palango July 5, 2019 13:16
@CLAassistant
Copy link

CLAassistant commented Jul 5, 2019

CLA assistant check
All committers have signed the CLA.

The requests module has some undercover magic of using a different implementation
depending on whether the simplejson package is installed, which makes the built-in
requests.response.json() method unreliable

To avoid this issue, we are removing all calls to response.json() and parsing the
response using python's built-in json module.
@codecov
Copy link

codecov bot commented Jul 5, 2019

Codecov Report

Merging #4349 into develop will increase coverage by 0.07%.
The diff coverage is 44.44%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4349      +/-   ##
===========================================
+ Coverage    80.96%   81.03%   +0.07%     
===========================================
  Files          105      105              
  Lines        13787    13793       +6     
  Branches      2115     2115              
===========================================
+ Hits         11162    11177      +15     
+ Misses        2028     2019       -9     
  Partials       597      597
Impacted Files Coverage Δ
raiden/network/resolver/client.py 36.66% <100%> (+2.18%) ⬆️
raiden/network/pathfinding.py 92.75% <100%> (+0.03%) ⬆️
raiden/ui/sync.py 20.33% <16.66%> (+0.33%) ⬆️
raiden/raiden_service.py 88.55% <0%> (-0.23%) ⬇️
raiden/network/transport/matrix/transport.py 81.48% <0%> (-0.16%) ⬇️
raiden/network/proxies/token_network.py 55.11% <0%> (+0.95%) ⬆️
raiden/waiting.py 88.73% <0%> (+4.92%) ⬆️

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 b3dd003...186bd24. Read the comment docs.

@lullis lullis marked this pull request as ready for review July 5, 2019 13:39
Copy link
Contributor

@jomuel jomuel left a comment

Choose a reason for hiding this comment

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

LGTM

@rakanalh rakanalh merged commit f91affe into raiden-network:develop Jul 8, 2019
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.

Traceback when PFS returns non-JSON data

4 participants