Skip to content

Commit

Permalink
Fix failing pyup API key
Browse files Browse the repository at this point in the history
- Update vendored safety package
- Swap to blank pyup API key by default (but allow custom key)
- Slightly improve safety revendoring
- Fixes #4188

Signed-off-by: Dan Ryan <[email protected]>
  • Loading branch information
techalchemy committed Apr 17, 2020
1 parent 5c01c68 commit b4b5691
Show file tree
Hide file tree
Showing 15 changed files with 322 additions and 880 deletions.
1 change: 1 addition & 0 deletions news/4188.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed an issue with ``pipenv check`` failing due to an invalid API key from ``pyup.io``.
7 changes: 4 additions & 3 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2644,9 +2644,10 @@ def do_check(
err=True,
)
else:
ignored = ""
key = "--key={0}".format(PIPENV_PYUP_API_KEY)
cmd = _cmd + [safety_path, "check", "--json", key]
ignored = []
cmd = _cmd + [safety_path, "check", "--json"]
if PIPENV_PYUP_API_KEY:
cmd = cmd + ["--key={0}".format(PIPENV_PYUP_API_KEY)]
if ignored:
for cve in ignored:
cmd += cve
Expand Down
2 changes: 1 addition & 1 deletion pipenv/environments.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def _is_env_truthy(name):
"""

PIPENV_PYUP_API_KEY = os.environ.get(
"PIPENV_PYUP_API_KEY", "1ab8d58f-5122e025-83674263-bc1e79e0"
"PIPENV_PYUP_API_KEY", None
)

# Internal, support running in a different Python from sys.executable.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

MIT License

Copyright (c) 2016, pyup.io
Expand Down
Binary file modified pipenv/patched/safety.zip
Binary file not shown.
5 changes: 0 additions & 5 deletions pipenv/patched/safety/__init__.py

This file was deleted.

8 changes: 0 additions & 8 deletions pipenv/patched/safety/__main__.py

This file was deleted.

131 changes: 0 additions & 131 deletions pipenv/patched/safety/cli.py

This file was deleted.

20 changes: 0 additions & 20 deletions pipenv/patched/safety/constants.py

This file was deleted.

10 changes: 0 additions & 10 deletions pipenv/patched/safety/errors.py

This file was deleted.

Loading

0 comments on commit b4b5691

Please sign in to comment.