Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
0971363
Replace pipfile.Pipfile.find with our own
oz123 Sep 7, 2022
79aeff5
Replace pipfile.Pipefile with plette.Pipefile
oz123 Sep 12, 2022
46afcf0
Merge branch 'main' into replace-pipfile-with-plette
oz123 Sep 12, 2022
097e253
Remove patched pipefile and patch
oz123 Sep 12, 2022
1d0ed6c
Remove unused import
oz123 Sep 12, 2022
91bcd85
Remove pipfile module usage project.py
oz123 Sep 12, 2022
d9bd51d
Remove undefined keyword for loading pipenv
oz123 Sep 12, 2022
9e170e1
Remove more usage of pipfile in favor of plette
oz123 Sep 13, 2022
8f4e44d
Fix usage of plette.Pipfile
oz123 Sep 13, 2022
2a6b6c9
Fix failing tests with Plette.Pipfile
oz123 Sep 13, 2022
4709420
Remove test for PipfileParser
oz123 Sep 13, 2022
d1aea86
Fix get_hash method
oz123 Sep 13, 2022
a9a73db
Fix check command
oz123 Sep 13, 2022
db743ea
Disable test that break with plette
oz123 Sep 13, 2022
af06ef0
Fix do_init with the new hash format
oz123 Sep 13, 2022
2805e75
Disable another test which breaks with plette
oz123 Sep 13, 2022
8c21183
Fix broken test with plette.Pipfile
oz123 Sep 13, 2022
1b8f627
Fix test_environment_variable_value_does_not_change_hash
oz123 Sep 13, 2022
b44dfd1
Use context manager when opening Pipfile
oz123 Sep 13, 2022
7ecea16
Fix test_lock_updated_source
oz123 Sep 13, 2022
a2130f7
Fix missing name for source in test_dev_lock_use_default_packages_as_…
oz123 Sep 13, 2022
8bbb4bd
Fix test_lock_updated_source
oz123 Sep 14, 2022
21b6eb7
Yank skipped test - pipenv no longer supports unnamed index
oz123 Sep 15, 2022
129e821
Remove comment - Plette does no expand env vars on disk
oz123 Sep 15, 2022
a23fee6
Remove skipped test - Pipenv no longer lock with incomplete sources
oz123 Sep 15, 2022
3f679ad
Add news about migration to Plette
oz123 Sep 15, 2022
3a57dd0
Merge branch 'main' into replace-pipfile-with-plette
oz123 Sep 15, 2022
9c774f7
Propagate the markers to new requirment in lock file
oz123 Sep 15, 2022
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
17 changes: 17 additions & 0 deletions news/5339.behavior.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Remove usage of pipfile module in favour of Plette.
pipfile is not actively maintained anymore. Plette is actively maintained,
and has stricter checking of the Pipefile and Pipefile.lock. As a result,
Pipefile with unnamed package indecies will fail to lock. If a Pipefile
was hand crafeted, and the source is anonymous an error will be thrown.
The solution is simple, add a name to your index, e.g, replace::

[[source]]
url = "https://pypi.acme.com/simple"
verify_ssl = true

With::

[[source]]
url = "https://pypi.acme.com/simple"
verify_ssl = true
name = acmes_private_index
9 changes: 4 additions & 5 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

from pipenv import environments, exceptions, pep508checker
from pipenv._compat import decode_for_output, fix_utf8
from pipenv.patched import pipfile
from pipenv.patched.pip._internal.build_env import _get_runnable_pip
from pipenv.patched.pip._internal.exceptions import PipError
from pipenv.patched.pip._internal.network.session import PipSession
Expand Down Expand Up @@ -49,7 +48,7 @@
system_which,
)
from pipenv.utils.spinner import create_spinner
from pipenv.vendor import click, vistir
from pipenv.vendor import click, plette, vistir
from pipenv.vendor.requirementslib.models.requirements import Requirement

if MYPY_RUNNING:
Expand Down Expand Up @@ -1029,7 +1028,6 @@ def do_lock(
pypi_mirror=None,
):
"""Executes the freeze functionality."""

cached_lockfile = {}
if not pre:
pre = project.settings.get("allow_prereleases")
Expand Down Expand Up @@ -2782,10 +2780,11 @@ def do_check(
)
sys.exit(1)
# Load the pipfile.
p = pipfile.Pipfile.load(project.pipfile_location)
p = plette.Pipfile.load(open(project.pipfile_location))
p = plette.Lockfile.with_meta_from(p)
failed = False
# Assert each specified requirement.
for marker, specifier in p.data["_meta"]["requires"].items():
for marker, specifier in p._data["_meta"]["requires"].items():
if marker in results:
try:
assert results[marker] == specifier
Expand Down
3 changes: 0 additions & 3 deletions pipenv/patched/pipfile/LICENSE

This file was deleted.

177 changes: 0 additions & 177 deletions pipenv/patched/pipfile/LICENSE.APACHE

This file was deleted.

23 changes: 0 additions & 23 deletions pipenv/patched/pipfile/LICENSE.BSD

This file was deleted.

21 changes: 0 additions & 21 deletions pipenv/patched/pipfile/__about__.py

This file was deleted.

11 changes: 0 additions & 11 deletions pipenv/patched/pipfile/__init__.py

This file was deleted.

Loading