diff --git a/CHANGES.rst b/CHANGES.rst new file mode 100644 index 0000000..e69de29 diff --git a/cpython b/cpython index 86dac34..cdb5d84 160000 --- a/cpython +++ b/cpython @@ -1 +1 @@ -Subproject commit 86dac34bd6268714c2da9343a23cd0c8decdb7f0 +Subproject commit cdb5d842757eb777e45d8354abd7e377bb99ac22 diff --git a/pathlib_abc/_posixpath.py b/pathlib_abc/_posixpath.py deleted file mode 100644 index 4b82a82..0000000 --- a/pathlib_abc/_posixpath.py +++ /dev/null @@ -1,31 +0,0 @@ -import os -from posixpath import * - - -def splitroot(p): - """Split a pathname into drive, root and tail. On Posix, drive is always - empty; the root may be empty, a single slash, or two slashes. The tail - contains anything after the root. For example: - - splitroot('foo/bar') == ('', '', 'foo/bar') - splitroot('/foo/bar') == ('', '/', 'foo/bar') - splitroot('//foo/bar') == ('', '//', 'foo/bar') - splitroot('///foo/bar') == ('', '/', '//foo/bar') - """ - p = os.fspath(p) - if isinstance(p, bytes): - sep = b'/' - empty = b'' - else: - sep = '/' - empty = '' - if p[:1] != sep: - # Relative path, e.g.: 'foo' - return empty, empty, p - elif p[1:2] != sep or p[2:3] == sep: - # Absolute path, e.g.: '/foo', '///foo', '////foo', etc. - return empty, sep, p[1:] - else: - # Precisely two leading slashes, e.g.: '//foo'. Implementation defined per POSIX, see - # https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap04.html#tag_04_13 - return empty, p[:2], p[2:] diff --git a/tests/test_pathlib_abc.py b/tests/test_pathlib_abc.py index 34034f4..4691b39 100644 --- a/tests/test_pathlib_abc.py +++ b/tests/test_pathlib_abc.py @@ -6,7 +6,7 @@ import unittest from pathlib_abc import UnsupportedOperation, PathModuleBase, PurePathBase, PathBase -from pathlib_abc import _posixpath as posixpath +import posixpath TESTFN = "TESTFN"