Skip to content

Commit

Permalink
More MRO adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Nov 18, 2023
1 parent 1f9a480 commit 6dd0208
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Lib/pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,7 @@ def as_uri(self):
self._unsupported("as_uri")


class Path(PurePath, _PathBase):
class Path(_PathBase, PurePath):
"""PurePath subclass that can make system calls.
Path represents a filesystem path but unlike PurePath, also offers
Expand All @@ -1366,6 +1366,7 @@ class Path(PurePath, _PathBase):
but cannot instantiate a WindowsPath on a POSIX system or vice versa.
"""
__slots__ = ()
as_uri = PurePath.as_uri

def __init__(self, *args, **kwargs):
if kwargs:
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -2833,7 +2833,7 @@ class DummyPathWithSymlinksTest(DummyPathTest):
# Tests for the concrete classes.
#

class PathTest(PurePathTest, DummyPathTest):
class PathTest(DummyPathTest, PurePathTest):
"""Tests for the FS-accessing functionalities of the Path classes."""
cls = pathlib.Path
can_symlink = os_helper.can_symlink()
Expand Down

0 comments on commit 6dd0208

Please sign in to comment.