Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for python3.7 #5879

Merged
merged 7 commits into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions news/5879.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Drop support for Python 3.7
9 changes: 1 addition & 8 deletions pipenv/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
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
Expand All @@ -30,14 +31,6 @@
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
Expand Down
2 changes: 1 addition & 1 deletion pipenv/utils/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
4 changes: 2 additions & 2 deletions pipenv/utils/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def __repr__(self):
)

@staticmethod
@lru_cache()
@lru_cache
def _get_pip_command():
return InstallCommand(name="InstallCommand", summary="pip Install command.")

Expand Down Expand Up @@ -931,7 +931,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
Expand Down
2 changes: 1 addition & 1 deletion pipenv/utils/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
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
Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@ license = {file = "LICENSE"}
authors = [
{name = "Pipenv maintainer team", email = "[email protected]"},
]
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",
Expand Down
2 changes: 1 addition & 1 deletion run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
8 changes: 0 additions & 8 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down