-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
DEPR: Deprecate literal json string input to read_json #53409
Conversation
…g is passed to read_json
…g is passed to read_json
Code Checks / Docstring validation, typing, and other manual pre-commit hooks (pull_request) test failing seems to be unrelated to changes in my PR. Doc Build and Upload seems to be failing because the CI test itself passes literal JSON strings to |
@mroeschke Would you be able to take a look at this PR and let me know if anything needs updating? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change the existing tests by wrapping them in StringIO
?
@mroeschke This PR should be ready for review! |
@mroeschke Should be good to go now. |
Looks like some of the code checks are still failing in the CI |
@mroeschke Code Checks / Docstring validation passing now. Docbuild and upload test failure doesn't appear to be associated with PR |
You may want to check usage of |
@mroeschke Pinging on green! |
@mroeschke Should be good to go now! |
Thanks @rmhowe425 |
) * Adding logic to throw a deprecation warning when a literal json string is passed to read_json * Adding logic to throw a deprecation warning when a literal json string is passed to read_json * Updating documentation and adding PR num to unit test * Adding a deprecation warning to the user guide * Updating unit tests to check for FutureWarning * Fixing unit tests * Fixing unit tests * Fixing unit tests * Fixing unit tests * Fixing documentation errors in PR feedback * Fixing documentation errors in PR feedback * Updating unit tests to use StringIO rather than catch FutureWarning * Finishing updating unit tests to use StringIO rather than catch FutureWarning * Fixing indendation errors in unit tests. Moved one unit test to another file. * Updating unit test name * Adding additional checks to unit tests * Fixing unit tests * Fixing unit tests * Updating whatsnew documentation per reviewer recommendations. * Fixing failing code tests * Fixing failing code tests * Adding import to doc string example * Fixing documentation formatting error * Fixing documentation formatting error * Fixing documentation error after fixing merge conflict * Fixing formatting errors in whatsnew file * Updating formatting errors in documentation * Updating formatting errors in documentation
) * Adding logic to throw a deprecation warning when a literal json string is passed to read_json * Adding logic to throw a deprecation warning when a literal json string is passed to read_json * Updating documentation and adding PR num to unit test * Adding a deprecation warning to the user guide * Updating unit tests to check for FutureWarning * Fixing unit tests * Fixing unit tests * Fixing unit tests * Fixing unit tests * Fixing documentation errors in PR feedback * Fixing documentation errors in PR feedback * Updating unit tests to use StringIO rather than catch FutureWarning * Finishing updating unit tests to use StringIO rather than catch FutureWarning * Fixing indendation errors in unit tests. Moved one unit test to another file. * Updating unit test name * Adding additional checks to unit tests * Fixing unit tests * Fixing unit tests * Updating whatsnew documentation per reviewer recommendations. * Fixing failing code tests * Fixing failing code tests * Adding import to doc string example * Fixing documentation formatting error * Fixing documentation formatting error * Fixing documentation error after fixing merge conflict * Fixing formatting errors in whatsnew file * Updating formatting errors in documentation * Updating formatting errors in documentation
This PR deprecates reading literal strings in read_json, instead users will need to pass StringIO for these cases to silence the warning. This change is to match: pandas-dev/pandas#53409 On pandas_2.0_feature_branch: = 501 failed, 101106 passed, 2071 skipped, 786 xfailed, 312 xpassed, 20 errors in 1234.91s (0:20:34) = This PR: = 426 failed, 101181 passed, 2091 skipped, 786 xfailed, 312 xpassed in 1126.93s (0:18:46) =
read_json
#52271doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.