Commit Graph

59 Commits

Author SHA1 Message Date
Dan Ryan 362a730fac Fix environment comparison code and add tests
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-09 00:41:49 -04:00
Tomas Orsava de5cdf5949 Mark unit tests requiring network connection 2020-05-06 16:26:21 +02:00
Dan Ryan d0181e3ab9 Update patched test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-27 17:48:57 -04:00
Dan Ryan 88fe850482 Fix monkeypatch warnings on python 2.7
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 17:45:13 -04:00
Dan Ryan f90e183064 Fix failing test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:09 -04:00
Dan Ryan e911c9ac71 Use monkeypatch instead of mock for setting dotenv test attributes
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:08 -04:00
Dan Ryan e03878d7c7 Add news entry and fix lockfile
- Drop pytest-tap
- Update azure pipelines config
- Borrow ramdisk configuration from pip
- Fix pyinstaller ref for python 2
- Add 0-minute timeout and add github workflow
- Add skip for pywin32
- Scale down to `-n auto` to reduce race conditions on windows
- Skip pywin32 on python 3.8 as the relevant dependencies aren't
  compatible
- Use default pip exists action = ignore to work around VCS race
  condition
- Create local temp directory to avoid crossing drive letter boundary on
  azure during CI runs
- Monkeypatch click windows console detection to return False in CI

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:06 -04:00
Dan Ryan 6aa9d66549 Update test url for discord link in tests
- Point at ref that actually exists

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:04 -04:00
Sumana Harihareswara 603a20bf45 Update links in documentation
The canonical Pipenv documentation is now at pipenv.pypa.io.
Also, the canonical GitHub repositories for Pipenv and
Requests have changed, and some other communications links
(Twitter, mailing list, "thank you") were no longer
operational. This commit updates those and clarifies that
Pipenv is a project maintained by the PyPA.

Fixes #4137.

Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2020-03-05 20:55:28 -05:00
frostming 7d36f3fbda Reformat codes 2019-09-06 18:06:05 +08:00
Dan Ryan d1c086afbb Merge branch 'master' into master 2019-05-26 17:22:04 -04:00
Dan Ryan dcfce70817 Fix python path discovery if not called python
- Begin a refactor of `delegator.run` invocation to ensure we capture
  and handle failures with our own exception wrappers
- Additoinally capture output and error logging and command information
  when running in verbose mode (should avoid significant repitition in
  the codebase)
- Refactor `which` and `system_which` to fallback to pythonfinder's
implementation
- Abstract `is_python_command` to identify whether we are looking for
  python, this enables us to rely on `pythonfinder.Finder.find_all_python_versions()`
  to ensure we aren't skipping python versions
- Fixes #2783

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:40 -04:00
Dan Ryan 62a45e3323 Merge branch 'master' into bugfix/3502-trusted-host-custom-port 2019-03-06 19:09:01 -05:00
Dan Ryan 912cce2edd Merge branch 'master' into master 2019-03-06 19:00:10 -05:00
Lee Bontecou c05066cfe3 add unittests 2019-02-22 12:21:27 -06:00
Dan Ryan ef682bd58f Fix tuple bug in resolver
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-15 02:04:51 -05:00
Dan Ryan 19f2ee61e9 Update resolver to handle all resolution in venv
- Resolve all VCS and non-piptools-resolveable deps in venv
- Implement pep517 for resolution of non-setuptools builds
- Add full support for the new dependency link format
- Fix breakages from pip 19* rollout and subsequent setuptools breakage

Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-02-11 00:48:35 -05:00
Artemiy 786cc6ef2f add test for counting pre option and fix it's duplicate 2019-01-24 21:29:35 +03:00
Adam Goldschmidt 3b4c592f30 add test to invalid prepare_pip_source_args and change error to be more descriptive. (+1 squashed commit)
Squashed commits:
[b00fb5ba] fixed test getting empty URL in source
2019-01-17 14:10:41 +02:00
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Tzu-ping Chung 6a93e6cf44 Quote arguments with carets for cmd.exe
Carets introduce a difficult situation since they are essentially
"lossy" when parses. Consider this in cmd.exe:

    > echo "foo^bar"
    "foo^bar"
    > echo foo^^bar
    foo^bar

The two commands produce different results, but are both parsed by the
shell as `foo^bar`, and there's essentially no sensible way to tell what
was actually passed in. This implementation assumes the quoted variation
(the first) since it is easier to implement, and arguably the more common
case.
2018-11-28 19:30:45 +08:00
Dan Ryan f9b97dacc7 Get rid of split file test
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-13 19:07:06 -05:00
frostming 53b073c7ff python 2.7 unicode 2018-11-08 15:20:47 +08:00
frostming 1555200463 Add back some tests 2018-11-08 14:59:59 +08:00
frostming e147dc3ade Drops prettytoml/contoml form vendors 2018-11-08 10:57:20 +08:00
frostming 3eba19d359 Improve toml parsing 2018-11-08 10:22:26 +08:00
Dan Ryan 1cb610981f Merge branch 'master' into non-ascii-toml 2018-11-07 10:16:11 -05:00
Tzu-ping Chung 86a2786954 Quote command if it contains parentheses
The command can be safely quoted in this case since non-quotable commands
(cmd built-in) do not have parentheses.

Note that this change only applies to the command, not arguments.
Parentheses in arguments can be correctly interpreted without quotes, and
the quotes, like spaces, will cause incorrect outputs for echo etc.
2018-11-07 20:42:35 +09:00
frostming 3dcd206068 Fix non-ASCII support for prettytoml 2018-11-06 16:05:13 +08:00
Dan Ryan 4dac167657 Vendor boltons
Signed-off-by: Dan Ryan <dan@danryan.co>

Update vendored dependencies

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix file handle leaks

- Fix #3020
- Fix #3088
- Patch delegator
- Add weakref finalizer for tempfiles

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix spinner handlers on windows

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix spinner output and encoding issue

Signed-off-by: Dan Ryan <dan@danryan.co>

fix encoding

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix unicode output on windows, fix tomlkit imports

Signed-off-by: Dan Ryan <dan@danryan.co>

Unvendor boltons, fix compatibility, update merge functionalities

Signed-off-by: Dan Ryan <dan@danryan.co>

Update pythonfinder, vistir version, requirementslib version

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix vendoring script

Signed-off-by: Dan Ryan <dan@danryan.co>

Silence pip version checks

Signed-off-by: Dan Ryan <dan@danryan.co>

Add debugging to locking

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-10-30 01:07:07 -04:00
Dan Ryan bd7b6004fe Update requirementslib and re-patch piptools
- Fix attempted hashing of `ssh://` urls
- Fix URL parsing and conversions of `git` and `git+ssh` style vcs urls
- Fixes #2653
- Fixes #2446
- Update lockfile
- Vendor typing
- Add typing to setup.py
- Add click completion patch and update vendoring task
- Fix vendoring script
- Vendor enum34
- Update requirementslib and cleanup vcs check functionality
- Move enum and adjust patched click completion
- Update click completion
- Bump requirementslib again
- Move typing to backports, update tests
- Update tomlkit imports and backport typing module

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-08-27 15:59:36 -04:00
Oliver Newman b8da356e33 Fix TemporaryDirectory call 2018-08-23 12:27:27 -04:00
Oliver Newman 0973e5e23a Write tests for load_dot_env 2018-08-23 12:27:27 -04:00
Michael Hoang 0969a9ee67 Properly handle the first source having user/pass 2018-07-31 22:58:54 -04:00
Tzu-ping Chung cd82cdba63 Invert the verbosity flag (lower is less verbose) 2018-07-25 15:28:55 +08:00
Ethan Fulbright 118469db3b Add verbosity int variable, use capsys in test_core
Changed PIPENV_SUPPRESS_NESTED_WARNING to PIPENV_VERBOSITY, an integer
value that defaults to 0 (verbose).
Changed test in test_core.py to use capsys to capture standard
output/error in order to improve compatibility with Python 2.
2018-07-25 15:24:54 +08:00
Haplo 7c681cc139 Add ability to suppress nested venv courtesy notice
Added an environment variable, PIPENV_SUPPRESS_NESTED_WARNING, to be
used to suppress the courtesy notice from warn_in_virtualenv.
Changed wording of the courtesy notice to mention suppression variable.
Fixes #2527.
2018-07-25 15:24:54 +08:00
Tzu-ping Chung 9315887101 Only quote arguments during cmdify if needed 2018-07-11 17:17:08 +08:00
kennethreitz a31f3427a0 fix failing tests 2018-07-03 18:12:04 -04:00
Tzu-ping Chung d382842dd8 Remove unused utility function
All get_converted_relative_path usages are now pushed into
requirementslib.
2018-06-24 15:55:06 +08: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
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 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 16d6fe13f6 Merge branch 'master' into update-piptools 2018-05-22 22:35:15 -04:00
Dan Ryan 8abb764ce8 Update pypi urls
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-05-17 14:43:09 -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 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