Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
081cbc2
bpo-41109: separate object creation by Path and PurePath member varia…
websurfer5 Aug 16, 2020
0e4d53e
bpo-41109: Windows PurePath tests
websurfer5 Aug 17, 2020
53643f4
bpo-41109: use correct class in PureWindowsSubclassNewAndInitTest
websurfer5 Aug 17, 2020
c418958
bpo-41109: fix comment
websurfer5 Aug 17, 2020
34683c4
bpo-41109: fix class names and comments
websurfer5 Aug 17, 2020
19e0a40
bpo-41109: WindowsPath test suite
websurfer5 Aug 17, 2020
1853c6d
bpo-41109: add __init__() to Path and PurePath
websurfer5 Aug 17, 2020
17c141c
bpo-41109: remove extraneous **kwargs parameter from Path.__init__()
websurfer5 Aug 17, 2020
505cab0
bpo-41109: remove extraneous whitespace
websurfer5 Aug 17, 2020
c47bf06
bpo-41109: remove double-initialization in Path.__new__()
websurfer5 Aug 18, 2020
6607e77
bpo-41109: no longer need to call _init() from PurePath.__init__()
websurfer5 Aug 18, 2020
cf6afb0
bpo-41109: reorganize tests using a common base class for common tests
websurfer5 Aug 18, 2020
d25fdd7
bpo-41109: fix readlink test for Windows
websurfer5 Aug 18, 2020
4be7b7a
bpo-41109: cleanup test_resolve
websurfer5 Aug 18, 2020
1660fa6
bpo-41109: cleanup test_glob
websurfer5 Aug 18, 2020
2a27016
bpo-41109: test all initialization cases
websurfer5 Aug 18, 2020
4014a16
bpo-41109: news blurb
websurfer5 Aug 19, 2020
31b449e
bpo-41109: What's New entry and better news blurb
websurfer5 Aug 19, 2020
ebc8371
bpo-4119: Merge branch 'master' of github.com:python/cpython into fix…
websurfer5 Aug 19, 2020
86bb25b
bpo-41109: improve What's New and News entries
websurfer5 Aug 19, 2020
b2c62a6
bpo-41109: simplify _new_from_parts() and _new_from_parsed_parts() in…
websurfer5 Aug 19, 2020
6f363b9
Merge branch 'master' of github.com:python/cpython into fix-issue-41109
websurfer5 Aug 23, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bpo-41109: no longer need to call _init() from PurePath.__init__()
  • Loading branch information
websurfer5 committed Aug 18, 2020
commit 6607e77b68d9cc047608198d4b25bdbf7935e5ca
6 changes: 2 additions & 4 deletions Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,13 +660,11 @@ def __new__(cls, *args):
cls = PureWindowsPath if os.name == 'nt' else PurePosixPath
return object.__new__(cls)

def __init__(self, *args, init=True):
def __init__(self, *args):
drv, root, parts = self._parse_args(args)
self._drv = drv
self._root = root
self._parts = parts
if init:
self._init()

def __reduce__(self):
# Using the parts tuple helps share interned path parts
Expand Down Expand Up @@ -1105,7 +1103,7 @@ def __new__(cls, *args, **kwargs):
return self

def __init__(self, *args):
super().__init__(*args, init=False)
super().__init__(*args)
self._init()

def _init(self,
Expand Down