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

bpo-39924: handle missing os functions more consistently in pathlib #19220

Merged

Conversation

barneygale
Copy link
Contributor

@barneygale barneygale commented Mar 29, 2020

This patch makes _NormalAccessor handle missing os functions consistently. The specific functions which may be unavailable are:

  • os.lchmod()
  • os.link()
  • os.symlink()
  • os.readlink()

Only user-facing change is that you'll now get a NotImplementedError rather than an AttributeError when pathlib hits _Accessor.readlink() and os.readlink doesn't exist.

https://bugs.python.org/issue39924

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one question.

@pitrou
Copy link
Member

pitrou commented Apr 17, 2020

Also, this needs to merged or rebase with git master to solve conflicts.

@csabella
Copy link
Contributor

@barneygale, please address the review question and resolve the merge conflict. Thank you!

@barneygale barneygale force-pushed the bpo-39924-pathlib-accessor-symlink-tidy branch from 9b976e3 to f614e1a Compare May 29, 2020 01:18
@barneygale
Copy link
Contributor Author

Removed the Windows version check and rebased.

@csabella csabella requested a review from pitrou May 31, 2020 11:48
@barneygale barneygale force-pushed the bpo-39924-pathlib-accessor-symlink-tidy branch from f614e1a to 4f7fa9f Compare January 22, 2021 00:19
@barneygale
Copy link
Contributor Author

@pitrou I've rebased this and I believe it's ready to merge! Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants