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

Bug fix for skip-lock +additional issue in main branch #6210

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion pipenv/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def handle_exception(exc_type, exception, traceback, hook=sys.excepthook):
sys.excepthook = handle_exception


class PipenvException:
class PipenvException(Exception):
message = "[bold][red]ERROR[/red][/bold]: {}"

def __init__(self, message=None, **kwargs):
Expand Down
12 changes: 3 additions & 9 deletions pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,16 +668,10 @@ def requirements_location(self) -> str | None:

@property
def parsed_pipfile(self) -> tomlkit.toml_document.TOMLDocument | TPipfile:
"""Parse Pipfile into a TOMLFile and cache it

(call clear_pipfile_cache() afterwards if mutating)"""
"""Parse Pipfile into a TOMLFile and cache it"""
contents = self.read_pipfile()
# use full contents to get around str/bytes 2/3 issues
cache_key = (self.pipfile_location, contents)
if cache_key not in _pipfile_cache:
parsed = self._parse_pipfile(contents)
_pipfile_cache[cache_key] = parsed
return _pipfile_cache[cache_key]
parsed = self._parse_pipfile(contents)
return parsed

def read_pipfile(self) -> str:
# Open the pipfile, read it into memory.
Expand Down
1 change: 0 additions & 1 deletion pipenv/utils/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,6 @@ def get_link_from_line(line):
link = create_link(
urlunsplit(parsed_url._replace(scheme=original_scheme)) # type: ignore
)

return link


Expand Down
2 changes: 1 addition & 1 deletion pipenv/utils/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def ensure_virtualenv(project, python=None, site_packages=None, pypi_mirror=None
def cleanup_virtualenv(project, bare=True):
"""Removes the virtualenv directory from the system."""
if not bare:
console.pritn("[red]Environment creation aborted.[/red]")
console.print("[red]Environment creation aborted.[/red]")
try:
# Delete the virtualenv.
shutil.rmtree(project.virtualenv_location)
Expand Down
Loading