Commit Graph

2727 Commits

Author SHA1 Message Date
Dan Ryan 451045ce7d Properly parse urls as Link objects
- Fixes #1121
- Adds a bunch of tests for pipenv.utils.get_requirement()
2018-01-11 16:05:10 -05:00
kennethreitz d8dc25b289 Merge pull request #1244 from pypa/hotfix/handle_drive_parsing_error
Fix ensure_project bug on windows when missing pipfile
2018-01-11 14:15:15 -05:00
kennethreitz f5b482453f Merge pull request #1233 from OddBloke/tmpfile_cleanup
Clean up temporary files created during installation
2018-01-11 14:12:18 -05:00
kennethreitz 8e377dafd2 Merge pull request #1236 from pypa/hotfix/local_files_to_pipfile
More thorough checks before resolving files
2018-01-11 14:11:03 -05:00
kennethreitz 5959b3c256 Merge pull request #1241 from OddBloke/1240
Don't shellquote backup Python executable
2018-01-11 14:10:26 -05:00
kennethreitz 394bf305aa Merge pull request #1242 from pypa/hotfix/ignore_extra_requirements_txt
Skip search for requirements.txt when provided
2018-01-11 14:09:14 -05:00
kennethreitz f6026ecf0a Merge pull request #1268 from mkai/patch-2
pipenv update fails if freeze output contains comments
2018-01-11 14:06:59 -05:00
kennethreitz afb5e6a0aa Merge pull request #1275 from tonybaloney/tox-pipenv
Add a reference to a 3rd party plugin for tox
2018-01-11 14:06:38 -05:00
kennethreitz 08c01cb1ca Merge pull request #1282 from dongweiming/fix-verbose
Fix uninstall package error in verbose mode
2018-01-11 14:06:25 -05:00
Nate Prewitt 8f322b004c Merge pull request #1287 from karec/master
replace netloc by hostname when adding trusted-host arg to pip
2018-01-11 10:21:27 -08:00
emmanuel valette 56c693028d replace netloc by hostname when adding trusted-host arg to pip 2018-01-11 16:44:16 +01:00
Nate Prewitt ec0c99847a Merge pull request #1278 from bbelyeu/fix-link
Fix bad link in pipenv --envs output
2018-01-10 16:44:56 -08:00
kennethreitz 6b79aceffc Update sidebarintro.html 2018-01-10 10:08:31 -05:00
kennethreitz ceccd25373 Update sidebarlogo.html 2018-01-10 10:06:27 -05:00
dongweiming a0e3f0ee17 Fix uninstall package error in verbose mode 2018-01-09 18:29:07 +08:00
Brad Belyeu 55ef58216c 🐛 Fix bad link in pipenv --envs output 2018-01-08 16:20:51 -06:00
Anthony Shaw 0843ec63bc add reference to plugin 2018-01-08 14:35:39 +11:00
kennethreitz 14b7c1ae16 Merge branch 'master' of github.com:kennethreitz/pipenv 2018-01-06 09:02:39 -05:00
kennethreitz 462ffc3e97 3.6.4
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-01-06 09:02:27 -05:00
Nick Coghlan 7847324f93 Link to OWASP Top 10 from docs (#1269)
* Link to OWASP Top 10 from docs
2018-01-04 18:38:56 -08:00
Markus Kaiserswerth f322d93578 pipenv update fails if freeze output contains comments
If the output of ``pip freeze`` contains comments (e. g. a line like ``## !! Could not determine repository location``), then the ``pipenv update`` command fails when it tries to parse the requirements:

``python
(project-cIS5-zzV) bash-3.2$ pipenv update -d
Updating all dependencies from Pipfile…
Traceback (most recent call last):
  File "/.local/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/cli.py", line 2559, in update
    do_purge()
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/cli.py", line 1230, in do_purge
    dep = convert_deps_from_pip(package)
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 624, in convert_deps_from_pip
    req = get_requirement(dep)
  File "/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 311, in get_requirement
    req = [r for r in requirements.parse(dep)][0]
IndexError: list index out of range
``

It tries to make sense of the ``##`` "requirement", which fails.

This commit adds a simple fix to ignore comments in the ``pip freeze`` output.
2018-01-04 12:13:53 +01:00
Nate Prewitt 68d1a29ecd fix bad variable assignment 2018-01-02 22:15:44 -08:00
dragon788 50ad7746ee Fixed broken links to fancy install methods (#1258)
* Fixed broken links to fancy install methods

Outside of the TOC blocks it was referring to install.html instead of /install/ and resulted in broken links.
2018-01-01 18:48:08 -08:00
Nate Prewitt e45b597f8d Merge pull request #1250 from joshfriend/python-3.6.4
Update default python for 3.6.x to 3.6.4
2017-12-26 08:14:18 -08:00
Josh Friend fc6fc16f4a Update default python for 3.6.x 2017-12-26 11:11:19 -05:00
Daniel Watkins c4aa4d2aa2 Explicitly cause dependency resolution failure in the test
This also moves to using projects that are more closely related to this
one as the examples.
2017-12-22 17:23:42 -05:00
Daniel Watkins b0111b5dc9 Make test assertions match the test name more closely
This updates
test_editable_vcs_install_in_pipfile_with_dependency_resolution_doesnt_traceback
to check (a) that dependency resolution was triggered, and (b) that
there was no traceback (rather than just the specific traceback we are
currently seeing).
2017-12-22 17:14:17 -05:00
Daniel Watkins c097d5bd96 Fix tmpfile cleanup for non-blocking pip_install calls
Before this commit, we were cleaning up the tmpfiles before the pip
command had run, meaning we hit errors.
2017-12-22 16:19:18 -05:00
Daniel Watkins ba9c434157 Clean up temporary files created during install
This encapsulates two places that temporary files are created: during
dependency resolution, and for the actual call to pip install.
2017-12-22 16:19:18 -05:00
Daniel Watkins 7025b682ab Don't write editable requirements to a temporary file
We never need to read from the file, so it's unnecessary.
2017-12-22 16:19:18 -05:00
Daniel Watkins 416eb667fd Remove commented line 2017-12-22 16:19:18 -05:00
Daniel Watkins 81ed62f997 Don't create the test tmpdir within the test project
This causes issues with recursion when installing the test project.
2017-12-22 16:19:18 -05:00
Daniel Watkins 0022981fe4 Add PipenvInstance.tmpdir to capture temporary artifacts during testing
This allows tests to assert that files aren't being left in the
temporary directory.
2017-12-22 16:19:18 -05:00
Daniel Watkins 3d7347f8e4 Don't shellquote executable names
Quoting the executable results in a traceback on Linux systems (because
the quotes added by shellquote are considered part of the executable
name), and is unnecessary on Windows systems.

This fixes #1240.
2017-12-22 16:05:34 -05:00
Daniel Watkins f7fd12f461 Add test that reproduces #1240 2017-12-22 16:05:34 -05:00
Dan Ryan 30e4a9745b Update test assertions for proper path casing
- Aligns tests with #1221 on windows
2017-12-22 16:05:02 -05:00
Dan Ryan 309a767513 Fix drive normalization to only parse strings
- Fixes bug with handling non-existant pipfile locations on windows
2017-12-22 15:59:54 -05:00
Dan Ryan 7de107928e Skip search for requirements.txt when provided
- Fixes #1197
2017-12-22 14:21:20 -05:00
Daniel Watkins dab22fd090 Cast exception to string before passing to click.echo
Without this, tests were producing a traceback that isn't seen when
running pipenv from the console.
2017-12-22 13:40:59 -05:00
Dan Ryan 95fc44ac42 Fix parsing of paths for testing installable files 2017-12-22 01:49:09 -05:00
Dan Ryan dd3079210b More thorough checks before resolving files
- Fixes #1225
- Add checks for Wheel files and archive files specifically
- Adopts egg-fragment parsing for local file paths to allow naming of
filesystem paths as well
- Adds these checks both to the get_requirement() function and the
is_installable_file() function
2017-12-21 23:09:38 -05:00
Dan Ryan b5b85cd33b Add docker pin to test to fix resolver error 2017-12-21 20:35:27 -05:00
kennethreitz f2d285ac6b Merge pull request #1221 from uranusjr/windows-drive-casing
Force Windows local drive names to uppercase
2017-12-19 10:56:33 -05:00
kennethreitz c00cf9da12 Update README.rst 2017-12-19 10:54:42 -05:00
kennethreitz 76e5faa1f1 Update install.rst 2017-12-19 10:17:51 -05:00
Tzu-ping Chung 4d24c5db7d Force Windows local drive names to uppercase
Windows generally use upper cased drive names, but allow (without
normalizing) lower cased names in cmd.exe, which results in
inconsistencies when hashing the full path (to get the name of the
project's virtualenv). Python does not provide a good solution[*], so we
need to roll our own.

[*]: Python does have os.path.normcase(), but it always converts the
     whole paths to lowercase. This would break virtually *all* existing
     virtualenvs for Windows users.

UNC host names (which Python also treats as drives), on the other hand,
can actually be either cased. I am not sure if they are case-sensitive,
or should be coerced to what case, so this patch keeps with the existing
behaviour, and does not try to coerce them.
2017-12-19 21:58:11 +08:00
kennethreitz 546b39900d Merge pull request #1097 from techalchemy/bugfix/1002-allow-global-resolving
Pass 'allow_global' to resolve_deps
2017-12-18 11:48:31 -05:00
kennethreitz ac89256438 Merge pull request #1204 from bradsbrown/Fix.src_quoting
Fix: quote src for safer handling
2017-12-18 11:30:07 -05:00
kennethreitz 3496a7a1ae Merge pull request #1178 from idoru/improve-requirements-gen-test-and-factoring
Improve test & code clarity around requirements generation
2017-12-18 11:24:21 -05:00
kennethreitz 616389858d Merge branch 'master' into bugfix/1002-allow-global-resolving 2017-12-18 11:19:21 -05:00