[issue39897] `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses

2020-04-17 Thread Antoine Pitrou


Change by Antoine Pitrou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> enhancement

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39897] `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses

2020-04-17 Thread Antoine Pitrou


Antoine Pitrou  added the comment:


New changeset c746c4f353510a17683a49ed7f90ffaae664ff7b by Barney Gale in branch 
'master':
bpo-39897: Remove needless `Path(self.parent)` call, which makes `is_mount()` 
misbehave in `Path` subclasses. (GH-18839)
https://github.com/python/cpython/commit/c746c4f353510a17683a49ed7f90ffaae664ff7b


--
nosy: +pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39897] `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses

2020-03-07 Thread Barney Gale


Change by Barney Gale :


--
keywords: +patch
pull_requests: +18196
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/18839

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue39897] `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore misbehaves in `Path` subclasses

2020-03-07 Thread Barney Gale


New submission from Barney Gale :

`pathlib.Path.is_mount()` calls `Path(self.parent)`, which:

- Is needless, as `self.parent` is already a Path instance!
- Prevents effective subclassing, as `self.parent` may be a `Path` subclass 
with its own `stat()` implementation

--
components: Library (Lib)
messages: 363633
nosy: barneygale
priority: normal
severity: normal
status: open
title: `pathlib.Path.is_mount()` calls `Path(self.parent)` and therefore 
misbehaves in `Path` subclasses
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com