diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d39762bb..29ff8d5f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,15 @@ +2022.9.24 (2022-09-24) +====================== +Pipenv 2022.9.24 (2022-09-24) +============================= + + +Bug Fixes +--------- + +- Update ``requirementslib==2.0.3`` to always evaluate the requirement markers fresh (without lru_cache) to fix marker determinism issue. `#4660 `_ + + 2022.9.21 (2022-09-21) ====================== Pipenv 2022.9.21 (2022-09-21) diff --git a/news/5075.bugfix.rst b/news/5075.bugfix.rst new file mode 100644 index 00000000..8feed065 --- /dev/null +++ b/news/5075.bugfix.rst @@ -0,0 +1 @@ +Use ``--creator=venv`` when creating virtual environments to avoid issue with sysconfig ``posix_prefix`` on some systems. diff --git a/pipenv/__version__.py b/pipenv/__version__.py index 3eb77f66..53c21b79 100644 --- a/pipenv/__version__.py +++ b/pipenv/__version__.py @@ -2,4 +2,4 @@ # // ) ) / / // ) ) //___) ) // ) ) || / / # //___/ / / / //___/ / // // / / || / / # // / / // ((____ // / / ||/ / -__version__ = "2022.9.22.dev0" +__version__ = "2022.9.25.dev0" diff --git a/pipenv/core.py b/pipenv/core.py index 7c439802..c049231c 100644 --- a/pipenv/core.py +++ b/pipenv/core.py @@ -917,6 +917,7 @@ def do_create_virtualenv(project, python=None, site_packages=None, pypi_mirror=N Path(sys.executable).absolute().as_posix(), "-m", "virtualenv", + "--creator=venv", f"--prompt={project.name}", f"--python={python}", project.get_location_for_virtualenv(), diff --git a/pipenv/pipenv.1 b/pipenv/pipenv.1 index 770c30a0..6b2a69eb 100644 --- a/pipenv/pipenv.1 +++ b/pipenv/pipenv.1 @@ -27,7 +27,7 @@ level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. -.TH "PIPENV" "1" "Sep 21, 2022" "2022.9.21" "pipenv" +.TH "PIPENV" "1" "Sep 24, 2022" "2022.9.24" "pipenv" .SH NAME pipenv \- pipenv Documentation \fI\%\fP\fI\%\fP\fI\%\fP @@ -453,6 +453,13 @@ You might want to set \fBexport PIPENV_VENV_IN_PROJECT=1\fP in your .bashrc/.zsh .sp Congratulations, you now know how to install and use Python packages! ✨ 🍰 ✨ .SS Release and Version History +.SS 2022.9.24 (2022\-09\-24) +.SS Pipenv 2022.9.24 (2022\-09\-24) +.SS Bug Fixes +.INDENT 0.0 +.IP \(bu 2 +Update \fBrequirementslib==2.0.3\fP to always evaluate the requirement markers fresh (without lru_cache) to fix marker determinism issue. \fI\%#4660\fP +.UNINDENT .SS 2022.9.21 (2022\-09\-21) .SS Pipenv 2022.9.21 (2022\-09\-21) .SS Bug Fixes diff --git a/pipenv/vendor/requirementslib/__init__.py b/pipenv/vendor/requirementslib/__init__.py index c1be8669..7859fd0b 100644 --- a/pipenv/vendor/requirementslib/__init__.py +++ b/pipenv/vendor/requirementslib/__init__.py @@ -5,7 +5,7 @@ from .models.lockfile import Lockfile from .models.pipfile import Pipfile from .models.requirements import Requirement -__version__ = "2.0.2" +__version__ = "2.0.3" logger = logging.getLogger(__name__) diff --git a/pipenv/vendor/requirementslib/models/markers.py b/pipenv/vendor/requirementslib/models/markers.py index 8c82d5b9..1c1e3913 100644 --- a/pipenv/vendor/requirementslib/models/markers.py +++ b/pipenv/vendor/requirementslib/models/markers.py @@ -2,7 +2,7 @@ import itertools import operator import re from collections.abc import Mapping, Set -from functools import lru_cache, reduce +from functools import reduce import pipenv.vendor.attr as attr from pipenv.vendor.distlib import markers @@ -116,7 +116,6 @@ class PipenvMarkers(object): return combined_marker -@lru_cache(maxsize=1024) def _tuplize_version(version): # type: (STRING_TYPE) -> Union[Tuple[()], Tuple[int, ...], Tuple[int, int, str]] output = [] @@ -131,7 +130,6 @@ def _tuplize_version(version): return tuple(output) -@lru_cache(maxsize=1024) def _format_version(version): # type: (Tuple[int, ...]) -> STRING_TYPE if not isinstance(version, str): @@ -143,7 +141,6 @@ def _format_version(version): REPLACE_RANGES = {">": ">=", "<=": "<"} -@lru_cache(maxsize=1024) def _format_pyspec(specifier): # type: (Union[STRING_TYPE, Specifier]) -> Specifier if isinstance(specifier, str): @@ -179,7 +176,6 @@ def _format_pyspec(specifier): return specifier -@lru_cache(maxsize=1024) def _get_specs(specset): if specset is None: return @@ -263,7 +259,6 @@ def get_sorted_version_string(version_set): # TODO: Rename this to something meaningful # TODO: Add a deprecation decorator and deprecate this -- i'm sure it's used # in other libraries -@lru_cache(maxsize=1024) def cleanup_pyspecs(specs, joiner="or"): specs = normalize_specifier_set(specs) # for != operator we want to group by version @@ -309,7 +304,6 @@ def cleanup_pyspecs(specs, joiner="or"): # TODO: Rename this to something meaningful -@lru_cache(maxsize=1024) def fix_version_tuple(version_tuple): # type: (Tuple[AnyStr, AnyStr]) -> Tuple[AnyStr, AnyStr] op, version = version_tuple @@ -324,7 +318,6 @@ def fix_version_tuple(version_tuple): # TODO: Rename this to something meaningful, deprecate it (See prior function) -@lru_cache(maxsize=128) def get_versions(specset, group_by_operator=True): # type: (Union[Set[Specifier], SpecifierSet], bool) -> List[Tuple[STRING_TYPE, STRING_TYPE]] specs = [_get_specs(x) for x in list(tuple(specset))] @@ -484,7 +477,6 @@ def _markers_contains_key(markers, key): return False -@lru_cache(maxsize=128) def get_contained_extras(marker): """Collect "extra == ..." operands from a marker. @@ -498,7 +490,6 @@ def get_contained_extras(marker): return extras -@lru_cache(maxsize=1024) def get_contained_pyversions(marker): """Collect all `python_version` operands from a marker.""" @@ -529,7 +520,6 @@ def get_contained_pyversions(marker): return versions -@lru_cache(maxsize=128) def contains_extra(marker): """Check whether a marker contains an "extra == ..." operand.""" if not marker: @@ -538,7 +528,6 @@ def contains_extra(marker): return _markers_contains_extra(marker._markers) -@lru_cache(maxsize=128) def contains_pyversion(marker): """Check whether a marker contains a python_version operand.""" @@ -710,7 +699,6 @@ def normalize_marker_str(marker): return marker_str.replace('"', "'") -@lru_cache(maxsize=1024) def marker_from_specifier(spec): # type: (STRING_TYPE) -> Marker if not any(spec.startswith(k) for k in Specifier._operators.keys()): diff --git a/pipenv/vendor/vendor.txt b/pipenv/vendor/vendor.txt index 5c8a02a2..fc9e1829 100644 --- a/pipenv/vendor/vendor.txt +++ b/pipenv/vendor/vendor.txt @@ -17,7 +17,7 @@ ptyprocess==0.7.0 pyparsing==3.0.9 python-dotenv==0.19.0 pythonfinder==1.3.1 -requirementslib==2.0.2 +requirementslib==2.0.3 shellingham==1.5.0 six==1.16.0 termcolor==1.1.0