Merge pull request #5879 from deronnax/mdupuy/drop-python-3.7

Drop support for python3.7
This commit is contained in:
Matt Davis
2023-10-20 06:56:08 -04:00
committed by GitHub
9 changed files with 10 additions and 25 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ venv_dir := $(get_venv_dir)/pipenv_venv
venv_file := $(CURDIR)/.test_venv
get_venv_path =$(file < $(venv_file))
# This is how we will build tag-specific wheels, e.g. py36 or py37
PY_VERSIONS:= 3.7 3.8 3.9 3.10 3.11
PY_VERSIONS:= 3.8 3.9 3.10 3.11
BACKSLASH = '\\'
# This is how we will build generic wheels, e.g. py2 or py3
INSTALL_TARGETS := $(addprefix install-py,$(PY_VERSIONS))
@@ -96,7 +96,7 @@ retest: virtualenv submodules test-install
.PHONY: build
build: install-virtualenvs.stamp install.stamp
PIPENV_PYTHON=3.7 pipenv run python -m build
PIPENV_PYTHON=3.8 pipenv run python -m build
.PHONY: update-version
update-version:
+1
View File
@@ -0,0 +1 @@
Drop support for Python 3.7
+1 -8
View File
@@ -9,6 +9,7 @@ import os
import site
import sys
import typing
from functools import cached_property
from pathlib import Path
from sysconfig import get_paths, get_python_version, get_scheme_names
from urllib.parse import urlparse
@@ -30,14 +31,6 @@ from pipenv.utils.processes import subprocess_run
from pipenv.utils.shell import make_posix, temp_environ
from pipenv.vendor.pythonfinder.utils import is_in_path
try:
# this is only in Python3.8 and later
from functools import cached_property
except ImportError:
# eventually distlib will remove cached property when they drop Python3.7
from pipenv.patched.pip._vendor.distlib.util import cached_property
if typing.TYPE_CHECKING:
from types import ModuleType
from typing import ContextManager, Generator
+1 -1
View File
@@ -87,7 +87,7 @@ def ensure_project(
os.environ["PIP_PYTHON_PATH"] = project.python(system=system)
@lru_cache()
@lru_cache
def get_setuptools_version():
# type: () -> Optional[STRING_TYPE]
+2 -2
View File
@@ -148,7 +148,7 @@ class Resolver:
)
@staticmethod
@lru_cache()
@lru_cache
def _get_pip_command():
return InstallCommand(name="InstallCommand", summary="pip Install command.")
@@ -945,7 +945,7 @@ def resolve_deps(
return results, internal_resolver
@lru_cache()
@lru_cache
def get_pipenv_sitedir() -> Optional[str]:
site_dir = next(
iter(d for d in pkg_resources.working_set if d.key.lower() == "pipenv"), None
+1 -1
View File
@@ -19,7 +19,7 @@ from .constants import FALSE_VALUES, SCHEME_LIST, TRUE_VALUES
from .processes import subprocess_run
@lru_cache()
@lru_cache
def make_posix(path: str) -> str:
"""
Convert a path with possible windows-style separators to a posix-style path
+1 -2
View File
@@ -12,12 +12,11 @@ license = {file = "LICENSE"}
authors = [
{name = "Pipenv maintainer team", email = "distutils-sig@python.org"},
]
requires-python = ">=3.7"
requires-python = ">=3.8"
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
+1 -1
View File
@@ -13,7 +13,7 @@ export PIPENV_CACHE_DIR=`mktemp -d 2>/dev/null || mktemp -d -t 'pipenv_cache'`
# on some Linux OS python is python3
PYTHON=${PYTHON:-"python"}
PIPENV_PYTHON="${PIPENV_PYTHON:-3.7}"
PIPENV_PYTHON="${PIPENV_PYTHON:-3.8}"
PIP_CALL="${PIP_CALL:-${PYTHON} -m pip install --user}"
-8
View File
@@ -104,14 +104,6 @@ def pytest_runtest_setup(item):
pytest.skip('test not applicable on python 3.8')
if item.get_closest_marker('skip_osx') is not None and sys.platform == 'darwin':
pytest.skip('test does not apply on OSX')
if item.get_closest_marker('lte_py36') is not None and (
sys.version_info >= (3, 7)
):
pytest.skip('test only runs on python < 3.7')
if item.get_closest_marker('skip_py36') is not None and (
sys.version_info[:2] == (3, 6)
):
pytest.skip('test is skipped on python 3.6')
if item.get_closest_marker('skip_windows') is not None and (os.name == 'nt'):
pytest.skip('test does not run on windows')