<NME> setup.py
<BEF> import sys

from setuptools import find_packages, setup


def get_version_and_cmdclass(package_path):
    """Load version.py module without importing the whole package.

    Template code from miniver
    """
    import os
    from importlib.util import module_from_spec, spec_from_file_location

    spec = spec_from_file_location("version", os.path.join(package_path, "_version.py"))
    module = module_from_spec(spec)
    spec.loader.exec_module(module)
    return module.__version__, module.cmdclass


version, cmdclass = get_version_and_cmdclass("menpo")

# Please see conda/meta.yaml for other binary dependencies
install_requires = ["numpy>=1.14", "scipy>=1.0", "matplotlib>=3.0", "pillow>=4.0"]

if sys.version_info.major == 2:
    install_requires.append("pathlib==1.0")

setup(
    name="menpo",
    version=version,
    cmdclass=cmdclass,
    description="A Python toolkit for handling annotated data",
    author="The Menpo Team",
    author_email="hello@menpo.org",
    packages=find_packages(),
    install_requires=install_requires,
    package_data={"menpo": ["data/*"]},
    tests_require=["pytest>=5.0", "pytest-mock>=1.0", "mock>=3.0", "black>=19.0"],
)

<MSG> Remove python 2 future imports (#850)

* Remove future imports that were for Python 2

* Update setup.py requirements

And remove Python 2 only requirement
<DFF> @@ -22,8 +22,6 @@ version, cmdclass = get_version_and_cmdclass("menpo")
 # Please see conda/meta.yaml for other binary dependencies
 install_requires = ["numpy>=1.14", "scipy>=1.0", "matplotlib>=3.0", "pillow>=4.0"]
 
-if sys.version_info.major == 2:
-    install_requires.append("pathlib==1.0")
 
 setup(
     name="menpo",
@@ -35,5 +33,5 @@ setup(
     packages=find_packages(),
     install_requires=install_requires,
     package_data={"menpo": ["data/*"]},
-    tests_require=["pytest>=5.0", "pytest-mock>=1.0", "mock>=3.0", "black>=19.0"],
+    tests_require=["pytest>=6.0", "pytest-mock>=3.0", "black>=20.0"],
 )

{'addition_count': 1, 'commit_subject': 'Remove python 2 future imports (#850)', 'deletion_count': 3, 'file_extension': '.py', 'lang': 'py', 'license': 'bsd-3-clause', 'repo_name': 'menpo/menpo'}