Skip to content

Deprecate py.path support #26450

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
WillAyd opened this issue May 18, 2019 · 9 comments · Fixed by #26458
Closed

Deprecate py.path support #26450

WillAyd opened this issue May 18, 2019 · 9 comments · Fixed by #26458
Labels
Dependencies Required and optional dependencies Deprecate Functionality to remove in pandas good first issue
Milestone

Comments

@WillAyd
Copy link
Member

WillAyd commented May 18, 2019

Since our min version is Py35 path lib is guaranteed to be installed. However we have a few functions that accept py.path.LocalPath objects for compatability

Not sure if we need an explicit deprecation cycle or if this is implied with moving minimum support to Py35

@WillAyd WillAyd added 2/3 Compat Dependencies Required and optional dependencies labels May 18, 2019
@jreback
Copy link
Contributor

jreback commented May 18, 2019

we should deprecate as have accepted these for a long time and they work py 3

@WillAyd WillAyd changed the title Drop py.path support Deprecate py.path support May 18, 2019
@WillAyd WillAyd added Deprecate Functionality to remove in pandas good first issue labels May 18, 2019
@WillAyd WillAyd added this to the Contributions Welcome milestone May 18, 2019
@nandahkrishna
Copy link
Contributor

If possible, I'd like to contribute to this. Should I search for functions with LocalPath and deprecate them accordingly?

@WillAyd
Copy link
Member Author

WillAyd commented May 19, 2019

@nandahkrishna that's great! And yes you've got it right. You might want to check out other PRs labeled Deprecate that have been merged to see how we typically handle as well

@nandahkrishna
Copy link
Contributor

You might want to check out other PRs labeled Deprecate that have been merged to see how we typically handle as well

Sure, I'll do that. Thanks!

@nandahkrishna
Copy link
Contributor

I took a look at previous PRs labeled deprecate. I got a fair idea of how it works, but I couldn't seem to find a case that deprecated an external library (might have missed my eye?) so just confirming:

  1. Visit functions where py.path.local has been used
  2. Add a DeprecateWarning with a suitable message
  3. Add tests for the warning
    Is this right?

@WillAyd
Copy link
Member Author

WillAyd commented May 19, 2019

That's right!

@jorisvandenbossche jorisvandenbossche modified the milestones: Contributions Welcome, 0.25.0 May 19, 2019
@TomAugspurger
Copy link
Contributor

TomAugspurger commented May 19, 2019 via email

@WillAyd
Copy link
Member Author

WillAyd commented May 19, 2019

Does py.path implement the fspath protocol? If so, then no need to deprecate. We can just remove the py.path specific code.

I think so from jaraco/path#123. The problem however is we internally don't fully operate using the __fspath__ protocol, especially since that didn't become standard until 3.6. The PR by @nandahkrishna shows an example where we special case for py.path.

So would your suggestion be to just defer any kind of deprecation and work towards full fspath support when we drop 3.5?

@TomAugspurger
Copy link
Contributor

TomAugspurger commented May 19, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Required and optional dependencies Deprecate Functionality to remove in pandas good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants