py36+: remove pathlib2 compatibility shim

This commit is contained in:
Anthony Sottile 2020-10-02 12:04:35 -07:00
parent 325b988ca8
commit 3c93eb0f04
5 changed files with 3 additions and 15 deletions

View File

@ -169,10 +169,6 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
The returned object is a :class:`pathlib.Path` object.
.. note::
In python < 3.6 this is a pathlib2.Path.
no tests ran in 0.12s

View File

@ -15,7 +15,7 @@ You can use the ``tmp_path`` fixture which will
provide a temporary directory unique to the test invocation,
created in the `base temporary directory`_.
``tmp_path`` is a ``pathlib/pathlib2.Path`` object. Here is an example test usage:
``tmp_path`` is a ``pathlib.Path`` object. Here is an example test usage:
.. code-block:: python

View File

@ -48,7 +48,6 @@ install_requires =
atomicwrites>=1.0;sys_platform=="win32"
colorama;sys_platform=="win32"
importlib-metadata>=0.12;python_version<"3.8"
pathlib2>=2.2.0;python_version<"3.6"
python_requires = >=3.6
package_dir =
=src

View File

@ -14,6 +14,8 @@ from os.path import expanduser
from os.path import expandvars
from os.path import isabs
from os.path import sep
from pathlib import Path
from pathlib import PurePath
from posixpath import sep as posix_sep
from types import ModuleType
from typing import Callable
@ -30,11 +32,6 @@ from _pytest.compat import assert_never
from _pytest.outcomes import skip
from _pytest.warning_types import PytestWarning
if sys.version_info[:2] >= (3, 6):
from pathlib import Path, PurePath
else:
from pathlib2 import Path, PurePath
__all__ = ["Path", "PurePath"]

View File

@ -190,10 +190,6 @@ def tmp_path(request: FixtureRequest, tmp_path_factory: TempPathFactory) -> Path
directory.
The returned object is a :class:`pathlib.Path` object.
.. note::
In python < 3.6 this is a pathlib2.Path.
"""
return _mk_tmp(request, tmp_path_factory)