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

Doc: os.path.abspath and Path.resolve are also different #23276

Merged
merged 2 commits into from
Jan 20, 2021

Conversation

xuhdev
Copy link
Contributor

@xuhdev xuhdev commented Nov 14, 2020

Add more explanation to point out that os.path.abspath and Path.resolve
are also not equivalent.

@JulienPalard
Copy link
Member

JulienPalard commented Nov 25, 2020

Hi @xuhdev and thanks for the PR!

Can you extrapolate on their differences?

I bet at this point specific comments should be added for each diverging pair of functions, so a developer converting from sys.path to pathlib could know what to expect.

@xuhdev
Copy link
Contributor Author

xuhdev commented Nov 26, 2020

@JulienPalard I agree, added

@Mariatta
Copy link
Member

There's a doctest failing in the build. Would you be able to look into it?

@xuhdev xuhdev force-pushed the pathlib-doc branch 3 times, most recently from c8911b2 to 377111d Compare December 17, 2020 20:56
@xuhdev
Copy link
Contributor Author

xuhdev commented Dec 17, 2020

@Mariatta Thanks for the reminder. The doctest has been fixed now.

@JulienPalard
Copy link
Member

That's better with the explanations, and I learnt something.

I'm not fan of the 187 character wide table though. An idea: you could use footnotes for this? Like:

====================================   ==============================
:mod:`os` and :mod:`os.path`           :mod:`pathlib`
====================================   ==============================
:func:`os.path.abspath`                :meth:`Path.resolve` [#]_

followed by :

.. rubric:: Footnotes

.. [#] :func:`os.path.abspath` does not resolve symbolic links while :meth:`Path.resolve` does.

An exmple of footnotes can be found in reference/expressions.rst.

@xuhdev xuhdev force-pushed the pathlib-doc branch 2 times, most recently from 4d04cef to 2ec4a20 Compare December 18, 2020 22:18
@xuhdev
Copy link
Contributor Author

xuhdev commented Dec 18, 2020

@JulienPalard Thanks, I have updated the PR to use footnotes.

@JulienPalard
Copy link
Member

@Mariatta Some required tests are skipped, if I understand correctly that's why it says checks are not successful?

@Mariatta
Copy link
Member

Somehow the Travis I build is in "Cancelled" status. Perhaps we need to restart it.

Add more explanation to point out that os.path.abspath and Path.resolve
are also not equivalent.
@xuhdev
Copy link
Contributor Author

xuhdev commented Dec 19, 2020

@Mariatta @JulienPalard I rebase the PR so all tests have now been retriggered.

@Mariatta
Copy link
Member

We're aware of the issue with bedevere skip-issues/news status https://mail.python.org/archives/list/python-committers@python.org/message/4QD47S5OB4EVC6A2QTT7EH26EQBW4PGR/

@xuhdev
Copy link
Contributor Author

xuhdev commented Jan 12, 2021

Can we proceed with this PR? It's been 3 weeks since last activity.

@JulienPalard JulienPalard merged commit 1459fed into python:master Jan 20, 2021
@JulienPalard
Copy link
Member

@xuhdev thanks for the PR :)

@xuhdev xuhdev deleted the pathlib-doc branch January 20, 2021 19:33
@xuhdev
Copy link
Contributor Author

xuhdev commented Jan 20, 2021

And thanks for all the feed back :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants