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

Document strpath attribute of LocalPath object #187

Closed
asottile opened this issue Jun 26, 2018 · 11 comments
Closed

Document strpath attribute of LocalPath object #187

asottile opened this issue Jun 26, 2018 · 11 comments

Comments

@asottile
Copy link
Member

lots of code uses this attribute, but it is not documented

how do I convince the sphinx docs to include this 😆

(note that it is included for svnwc)

Originally noticed here

@RonnyPfannschmidt
Copy link
Member

it shouldnt be used to begin with

@asottile
Copy link
Member Author

pytest uses it: https://github.com/pytest-dev/pytest/search?q=strpath&unscoped_q=strpath

It has one benefit over str(localpathobj) in that it preserves bytes / text:

>>> # python 2
>>> local.LocalPath(u'bar').strpath
u'/private/tmp/py/bar'
>>> # python 3
>>> LocalPath(b'foo').strpath
b'/private/tmp/py/foo'

@RonnyPfannschmidt
Copy link
Member

@asottile pytest will completely remove all internal py.path.local usage in the next few months

@RonnyPfannschmidt
Copy link
Member

once thats done we will deprecate all local path based apis ^^

@RonnyPfannschmidt
Copy link
Member

@asottile on a extra note - py.path.local is unreasonably unaware of unicode vs bytest, its at best irresponsible to rely on it for that distinction

@asottile
Copy link
Member Author

Sure, but it's going to be incredibly difficult to remove due to tmpdir publically, it's a public name, and quite a lot of code on github uses it

@RonnyPfannschmidt
Copy link
Member

oh, we won't remove it, just deprecate it ^^

@asottile
Copy link
Member Author

In the meantime (especially since it's used) can we improve this from a public undocumented attribute to a documented one?

@RonnyPfannschmidt
Copy link
Member

as long as the broken fundamentals of it are documented as well

@asottile
Copy link
Member Author

seems even str(...) isn't documented 🙃

@RonnyPfannschmidt
Copy link
Member

im not exactly surprised, im going to be really happy once its gone ^^

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

No branches or pull requests

2 participants