Commit Graph

431 Commits

Author SHA1 Message Date
Tzu-ping Chung e5ec2ed4fa More tests 2018-06-13 01:06:07 +08:00
Tzu-ping Chung 45004214bf Add failing test cases 2018-06-13 00:34:41 +08:00
Dan Ryan 9e04a85b8c I have fixed the test.
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-12 03:38:26 -04:00
Dan Ryan bc8639b181 Add ruamel.ordereddict wheel for cp27mu
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-11 00:31:49 -04:00
Jacob Henner af91eb68bb Add support for PyPI mirrors
Adds support for the --pypi-mirror command line parameter and the
PIPENV_PYPI_MIRROR environment variable for most pipenv operations.
This permits pipenv to function without pypi.org, which is necessary for
users:

    1. behind restrictive networks
    2. facing strict artifact sourcing policies
    3. experiencing poor performance connecting to pypi.org
    4. who've configured a local cache for performance reasons

When specified, the value of this parameter replaces all instances of
pypi.org and pypi.python.org within pipenv operations without modifying
or requring the modification of Pipfiles.

- Resolves #2075
2018-06-07 18:24:18 -04:00
Tzu-ping Chung d48e97e1a8 Respect PATHEXT when looking for Win executable
... as idiomatic in Windows programming.
2018-06-03 15:51:37 +08:00
Andrew Haigh eb839e52b6 Add test of behaviour in issue #2229
requirements.txt files (and by extension pipfreeze) can contain comment
lines, but the stdout of pip freeze is used in a number of places with
the assumption that every line contains a dependency declaration. This
change adds an integration test that could trigger one of these cases
that was the cause of the behaviour seen in issue #2229.
2018-06-01 07:24:34 +08:00
Dan Ryan 60e108cb17 Move requirements tests to requirement library
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-23 22:03:31 -04:00
Dan Ryan b2085cb058 Mark pipenv check as flaky
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-23 21:59:50 -04:00
Dan Ryan eb4423b208 Fix test references to old requirements parser
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-23 21:59:50 -04:00
Dan Ryan 3167285286 Update tests for new requirements format
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-23 21:59:50 -04:00
Dan Ryan 708a0576f6 Fix test import
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-23 18:46:35 -04:00
Dan Ryan 4a2b01e505 Merge branch 'master' into update-piptools 2018-05-23 15:33:53 -04:00
kennethreitz 0bc1dde344 Merge branch 'master' into bugfix/vcs-updates 2018-05-23 15:10:52 -04:00
Jeremy Fleischman 0567c10d68 When formatting a requirement, only lowercase its name.
This fixes https://github.com/pypa/pipenv/issues/2113.

This bug was introduced in
<https://github.com/jazzband/pip-tools/pull/452> as a band-aid fix to
<https://github.com/jazzband/pip-tools/issues/431>. Pipenv then copied
that code in <https://github.com/pypa/pipenv/commit/2553ebcbf7e2574c997a9164234e0adf077ffcac#diff-b56b95ccea8595a0f6f24ea753842976>, and inherited this latent bug.

Maybe the right fix is for pypa/packaging to lowercase the name? There's
a comment here
<https://github.com/pypa/packaging/blob/16.8/packaging/requirements.py#L86>
about normalizing the requirement's name, which might be what this is
referring to.

To test this, I invented a new, very simple python package called
`depends-on-marked-package`. The setup.py for this package is just:

```python
import setuptools

setuptools.setup(
    name="depends-on-marked-package",
    version="0.0.1",
    packages=setuptools.find_packages(),
    install_requires=['pytz; platform_python_implementation=="CPython"'],
)
```

This is a simplified version of gevent's setup.py's install_requires upon greenlet.
2018-05-22 23:08:20 -07:00
Dan Ryan 16d6fe13f6 Merge branch 'master' into update-piptools 2018-05-22 22:35:15 -04:00
Dan Ryan fa28edf92c Merge branch 'master' into bugfix/vcs-updates 2018-05-22 22:34:19 -04:00
Dan Ryan 7227c9b2c9 Fix pip compat imports for piptools
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-17 18:51:53 -04:00
Dan Ryan 8abb764ce8 Update pypi urls
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-17 14:43:09 -04:00
Dan Ryan 957fdd8163 Merge branch 'master' into bugfix/vcs-updates 2018-05-17 12:10:02 -04:00
Kyle Altendorf dcbbe91358 Merge branch 'master' into 2138-notpip_looping 2018-05-17 09:12:34 -04:00
Kyle Altendorf 3b7929daa8 Add a few test cases for PackageFinder.get_extras_links() 2018-05-16 23:07:09 -04:00
Dan Ryan f1550d8480 Lock vcs deps to exact commit with dependencies
- Manually obtain and update VCS repository with exact commit
 - Always store exact commit in the lockfile
 - Fixes #2180, #1690, #1611, #2096

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-16 17:37:09 -04:00
pmontens 0479d84e97 Added nested json output form pipdeptree to graph command 2018-05-15 14:10:56 +02:00
Dan Ryan 55e4eb07c7 Expand short paths on windows during testing
- Fixes #2132

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-09 00:40:47 -04:00
Dan Ryan da29453b62 Allow the use of many sources instead of just 2
- Fixes #2130

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-05 23:18:09 -04:00
Dan Ryan f6cff554f4 update tests to remove False key during comparison
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-05 00:43:08 -04:00
Dan Ryan 08f61e7684 Switch to checks for Mapping type and proper bool
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-04 15:55:52 -04:00
Dan Ryan fcfebaf1cc Only use -e for install when editable=True
- Fixes #2121
- Add tests for regressions

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-04 15:55:52 -04:00
Tzu-ping Chung 0984bab787 Do not expand environ in cache on package install
Fix #2100.
2018-05-05 01:04:36 +08:00
Dan Ryan f0c33367fa Parse and include extras from vcs and non-vcs urls
- Include extras when rebuilding urls from pipfiles
- Fixes #1997, #2128

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-03 22:43:30 -04:00
Tzu-ping Chung d21efa08c7 Check lockfile exists on sync, and don't update it
Matching the behaviour mentioned in:
https://github.com/pypa/pipenv/issues/1463#issuecomment-386297896
2018-05-03 19:18:45 -04:00
Kyle Altendorf e4270dc292 Merge remote-tracking branch 'upstream/1847-newlines' into 1847-newlines 2018-05-03 12:20:59 -07:00
Tzu-ping Chung 116ce7191d Better test errors and remove useless newline='' 2018-05-04 02:39:53 +08:00
Dan Ryan d26e16a539 Read in universal newline mode
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-03 12:08:59 -04:00
Dan Ryan a075445367 Updated versions
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-03 11:59:55 -04:00
Kyle Altendorf ab63176851 Add message to newline assertions
Compensating for https://github.com/pytest-dev/pytest/issues/3443
2018-05-03 08:45:44 -07:00
Kyle Altendorf 536d6febc3 Revert "Update newline tests"
This reverts commit 18704a5e21.
2018-05-03 08:38:33 -07:00
Kyle Altendorf 8a25696528 Revert "Update newline check"
This reverts commit 415566f5d6.
2018-05-03 08:38:25 -07:00
Dan Ryan 5718ae8f42 Fix newline tests for windows
- Adjust for proper parameterization

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-03 03:27:45 -04:00
Dan Ryan 415566f5d6 Update newline check
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-02 22:40:38 -04:00
Dan Ryan 18704a5e21 Update newline tests 2018-05-02 20:49:52 -04:00
Kyle Altendorf 0aeee15c29 Merge branch 'master' into 1847-newlines 2018-05-02 09:23:02 -04:00
Tzu-ping Chung 2dc999292e Use the mock PyPI 2018-05-02 17:07:49 +08:00
Tzu-ping Chung 7aff2c1cc7 Merge branch 'master' into always-use-pipfile-for-sources 2018-05-02 16:58:59 +08:00
Tzu-ping Chung 95643e9007 Merge branch 'master' into feature/backport-namedtemporaryfile 2018-05-02 16:46:30 +08:00
Grey Baker 8c0936faf6 Always use sources from Pipfile when doing resolution 2018-05-01 15:14:12 +01:00
Grey Baker 85d4734e12 Add test for lock --keep-outdated behaviour 2018-05-01 11:34:46 +01:00
Dan Ryan 34caffc797 Backport NamedTemporaryFile for io.open support
- Allows atomic locking to use `newline` argument

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-30 23:35:58 -04:00
Kyle Altendorf 6d2e208aae Default to \n, retain consistent \r\n
When writing the Pipfile and Pipfile.lock make an effort to retain
their existing newlines if consistent.  Default to \n (LF) for new
files and files with inconsistent line endings.
2018-04-26 15:50:43 -04:00