Closed asottile closed 3 years ago
it shouldnt be used to begin with
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'
@asottile pytest will completely remove all internal py.path.local usage in the next few months
once thats done we will deprecate all local path based apis ^^
@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
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
oh, we won't remove it, just deprecate it ^^
In the meantime (especially since it's used) can we improve this from a public undocumented attribute to a documented one?
as long as the broken fundamentals of it are documented as well
seems even str(...)
isn't documented 🙃
im not exactly surprised, im going to be really happy once its gone ^^
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