Skip to content

DEPR: Deprecate numpy argument in read_json #28562

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

Closed
wants to merge 38 commits into from
Closed

DEPR: Deprecate numpy argument in read_json #28562

wants to merge 38 commits into from

Conversation

lucaionescu
Copy link

@lucaionescu lucaionescu commented Sep 21, 2019

@gfyoung gfyoung added Deprecate Functionality to remove in pandas ExtensionArray Extending pandas with custom dtypes or arrays. IO JSON read_json, to_json, json_normalize labels Sep 22, 2019
@WillAyd
Copy link
Member

WillAyd commented Sep 22, 2019

I think you have to catch the warnings now to prevent test failures. You can use #27103 as a reference for how this is done

@lucaionescu
Copy link
Author

lucaionescu commented Sep 24, 2019

Do you mean using the @pytest.mark.filterwarnings("ignore:.*msgpack:FutureWarning")wrapper around the test function and this snippet?

with catch_warnings():
    filterwarnings('ignore', category=FutureWarning)

@WillAyd
Copy link
Member

WillAyd commented Sep 24, 2019

The context manager would be cleaner if you want to go that route

@lucaionescu
Copy link
Author

lucaionescu commented Sep 25, 2019

I don't understand why the tests fail here, can you point me in the right direction please?

@gfyoung
Copy link
Member

gfyoung commented Sep 25, 2019

I don't understand why the tests fail here

In general, the test results show you every test that fails, so you can go to each one and see why each is failing. Of course, this is not practical when there are hundreds of failures.

The reason is that there are a lot more tests that pass in numpy=True to read_json than you have accounted for with this context manager.

@WillAyd : Any thoughts on how we could apply this context manager to all of the failing tests? Copy-pasting that setup across all of them seems a bit tedious (might need some abstracted wrapper to handle that for the time being) 🤷‍♂

@WillAyd
Copy link
Member

WillAyd commented Oct 1, 2019

I think if there's a way to limit the filter to the numpy argument at global scope would also work

@jbrockmendel
Copy link
Member

@lucaionescu can you run isort -rc pandas? i think that will fix the failing CI check

@jbrockmendel
Copy link
Member

@lucaionescu can you rebase? theres a decent chance that the CI failures are unrelated things that have been fixed in the last few days

@jbrockmendel
Copy link
Member

@lucaionescu can you rebase?

@lucaionescu
Copy link
Author

Sorry for that! I'm going to fix it ASAP 😄

@WillAyd
Copy link
Member

WillAyd commented Nov 29, 2019

@lucaionescu looks like there are no committed changes here - can you take a look?

@WillAyd
Copy link
Member

WillAyd commented Dec 17, 2019

@lucaionescu can you take a look here? Would be nice to deprecate this before 1.0

@lucaionescu lucaionescu reopened this Dec 18, 2019
souvik3333 and others added 24 commits December 19, 2019 18:40
* CLN: remove py2-legacy UnicodeReader, UnicodeWriter

* remove unnecessar y writer_kwargs
This reverts commit df2671b, reversing
changes made to 104fc11.
@jbrockmendel
Copy link
Member

@lucaionescu can you rebase

@alimcmaster1
Copy link
Member

@lucaionescu let us know if you still want to work on this. If not I can potentially take a look.

Thanks.

@lucaionescu
Copy link
Author

@alimcmaster1 yes, that would be nice. I don't know what the best way to proceed would be with the failing tests.

@WillAyd
Copy link
Member

WillAyd commented Jan 3, 2020

superseded by #30636

@WillAyd WillAyd closed this Jan 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas ExtensionArray Extending pandas with custom dtypes or arrays. IO JSON read_json, to_json, json_normalize
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEPR: Deprecate numpy argument in read_json