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

Avoid recursion for bytes / bytearrays in json encoder #4621

Merged
merged 4 commits into from
Sep 15, 2022

Conversation

jenshnielsen
Copy link
Collaborator

@jenshnielsen jenshnielsen commented Sep 15, 2022

Fixes #4620

Note that this does not in any way attempt to support bytes that cannot be converted to a string but at least these will not trigger an infinite recursion.

qcodes/tests/helpers/test_json_encoder.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Sep 15, 2022

Codecov Report

Merging #4621 (03e3c1d) into master (80abc3f) will decrease coverage by 0.93%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4621      +/-   ##
==========================================
- Coverage   68.23%   67.30%   -0.94%     
==========================================
  Files         339      339              
  Lines       31799    31799              
==========================================
- Hits        21698    21402     -296     
- Misses      10101    10397     +296     

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.

Encoding bytestrings using NumpyJSONEncoder triggers RecursionError
2 participants