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-30897: Add is_mount() to pathlib.Path #2669

Merged
merged 1 commit into from
Aug 1, 2017
Merged

bpo-30897: Add is_mount() to pathlib.Path #2669

merged 1 commit into from
Aug 1, 2017

Conversation

cooperlees
Copy link
Contributor

@cooperlees cooperlees commented Jul 11, 2017

  • Add in is_mount() call to pathlib.Path similiar to os.path.ismount(path)
  • Add tests for is_mount()

https://bugs.python.org/issue30897

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@cooperlees
Copy link
Contributor Author

Getting a Windows VM to play with the error. All suggestions welcome!

@vstinner vstinner changed the title bpo-30891: Add is_mount() to pathlib.Path Add is_mount() to pathlib.Path Jul 11, 2017
@vstinner
Copy link
Member

I removed "bpo-30891: " from the title, since http://bugs.python.org/issue30891 is unrelated.

@cooperlees cooperlees changed the title Add is_mount() to pathlib.Path bpo-30897: Add is_mount() to pathlib.Path Jul 11, 2017
@@ -1329,6 +1329,27 @@ def is_file(self):
# (see https://bitbucket.org/pitrou/pathlib/issue/12/)
return False

def is_mount(self):
"""
Copy link
Contributor

Choose a reason for hiding this comment

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

would it be much easy to just return os.path.ismount(self) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Easier, possibly. But I still think I'll hit my current issue with Windows. No like function in the library hits the 'os' module and I am pretty sure Python core developers would want this library standalone where possible.

@cooperlees
Copy link
Contributor Author

I may need to rebase - that appveyor failure looks unrelated to me.

* Add in is_mount() call to pathlib.Path similiar to os.path.ismount(path)
* Add tests for is_mount()
@cooperlees
Copy link
Contributor Author

Rebase got all checks to pass 💃

@ambv ambv merged commit 173ff4a into python:master Aug 1, 2017
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