FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.8] bpo-38811: Check for presence of os.link method in pathlib (GH-17225) by miss-islington · Pull Request #17626 · python/cpython · GitHub

Repository navigation

[3.8] bpo-38811: Check for presence of os.link method in pathlib (GH-17225) - #17626

Merged
miss-islington merged 1 commit into
python:3.8from
miss-islington:backport-092435e-3.8
Dec 16, 2019
Merged

miss-islington merged 1 commit into
python:3.8from
miss-islington:backport-092435e-3.8

Conversation

miss-islington commented Dec 16, 2019 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Commit 6b5b013 ("bpo-26978: Implement pathlib.Path.link_to (Using
os.link) (GH-12990)") introduced a new link_to method in pathlib. However,
this makes pathlib crash when the 'os' module is missing a 'link' method.

Fix this by checking for the presence of the 'link' method on pathlib
module import, and if it's not present, turn it into a runtime error like
those emitted when there is no lchmod() or symlink().

Signed-off-by: Toke Høiland-Jørgensen toke@redhat.com
(cherry picked from commit 092435e)

Co-authored-by: Toke Høiland-Jørgensen toke@redhat.com

https://bugs.python.org/issue38811

…17225)

Commit 6b5b013 ("bpo-26978: Implement pathlib.Path.link_to (Using
os.link) (pythonGH-12990)") introduced a new link_to method in pathlib. However,
this makes pathlib crash when the 'os' module is missing a 'link' method.

Fix this by checking for the presence of the 'link' method on pathlib
module import, and if it's not present, turn it into a runtime error like
those emitted when there is no lchmod() or symlink().

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
(cherry picked from commit 092435e)

Co-authored-by: Toke Høiland-Jørgensen <toke@redhat.com>

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM, good bot.

Copy link
Copy Markdown
Contributor Author

@tohojo and @vstinner: Status check is done, and it's a success ✅ .

miss-islington merged commit 8d0f369 into python:3.8 Dec 16, 2019
miss-islington deleted the backport-092435e-3.8 branch December 16, 2019 12:42

Copy link
Copy Markdown
Contributor Author

@tohojo and @vstinner: Status check is done, and it's a success ✅ .

1 similar comment

Copy link
Copy Markdown
Contributor Author

@tohojo and @vstinner: Status check is done, and it's a success ✅ .

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL