Commit Graph

68 Commits

Author SHA1 Message Date
Frost Ming ca5d931f1f Update to py36 plus syntax 2021-07-28 10:59:00 +08:00
Frost Ming fac3eaeaa7 Revendor packages and update patches 2021-07-27 09:45:57 +08:00
Frost Ming 306731cbe0 Update test cases according to the latest pip 2021-07-26 16:48:55 +08:00
Frost Ming 7fe01318f1 resolver take the missing dev argument 2020-11-10 17:26:56 +08:00
Frost Ming 466707bd85 Show waring about what happened when a dep is skipped 2020-11-09 12:34:44 +08:00
frostming 8c959096a8 Adapt test cases to prefer the mocked PyPI. 2020-09-01 16:35:37 +08:00
Gordon P. Hemsley 873beae567 #4278: Don't pin wildcard versions in lockfile
Fixes bug introduced by 552d1274ea,
which activated the (unused) changes made much earlier in
a08a2da524.
2020-05-29 00:01:12 -04:00
Dan Ryan befb29ceae Update requirement parser and lockfile generation for vcs dependencies, fix test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 13:36:23 -04:00
Dan Ryan c4f6b7f6f4 use normalized names in lockfile
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 10:53:00 -04:00
Dan Ryan 1f96b8cf7d Fix package name in test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 09:56:55 -04:00
Dan Ryan 1a8111d4bb Clean up tests
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 09:56:55 -04:00
Dan Ryan a0f82865f8 Add tests for VCS pep508 subdependencies
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-19 09:56:55 -04:00
Dan Ryan c7425e7508 Skip tests that build extensions on windows
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-09 10:55:01 -04:00
Dan Ryan 47aa2acc90 Set build_isolation and use_pep517 correctly
- Fix how `use_pep517` and `build_isolation` are read from the
  environment -- introduce a new environment helper to detect
  `<PREFIX>_<SETTING>` and `<PREFIX>_NO_<SETTING>`, check for booleans
  and return appropriately boolean, str, or None types
- Check for `False` values when adding `--no-use-pep517` and
  `--no-build-isolation` during resolution rather than falsey values
- Change environment variable name from `PIP_PYTHON_VERSION` to
  `PIPENV_REQUESTED_PYTHON_VERSION` to avoid causing `pip` to fail due
  to accidentally percieving the `python_version` flag as being set --
  this is an artifact from attempting to resolve outside of the
  virtualenv
- Add `pipenv` to the path of patched `notpip.__main__` to accommodate
  updated import fully qualified module names
- Update `pip` and `piptools` patches
- Add test packages for each of two known failure modes: outdated
  `setuptools` with a missing `build-backend` (which `pip` forces to
  `build_meta:__legacy__` & which doesn't exist before `40.8`), and
  `import Cython` statements in `setup.py` in packages with properly
  defined `pyproject.toml` `build-backend` lines.
- Fixes #4231
- Replaces, includes, and closes #4242

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>

Add integration tests for #4231

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-08 21:43:32 -04:00
Dan Ryan c30155ff45 Fix recursive PEP 508 VCS resolution
- Recursively resolve PEP 508 URLs in subdependencies
  - Fix `piptools` cache storage of VCS dependencies as results
- Avoid saving VCS dependency versions to `Pipfile.lock`
- Fixes #3396
- Fixes #4217

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-05 23:44:34 -04:00
TennyZhuang db9f296ebe update test 2020-04-24 23:28:49 +08: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
Sumana Harihareswara 805f438108 Fix spelling in comment
Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2020-03-06 15:51:31 -05: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 9c3ee2a72b Get rid of devpi
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:55:47 -04:00
Dan Ryan 5ac676711a Fix editable VCS dependency resolution
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:06:43 -04:00
Dan Ryan 83868c8f1a Cut over to devpi for tests and improve logging
- Verbose logs will now write gracefully to the terminal even while the
  spinner is running (i.e. during locking)
- This PR also cuts over to Devpi for a backing cache rather than a
  hacked httpbin instance
- Inclues a refactor of `pip_install` to deduplicate logic
- Attempts to switch back to relying on native editable installs in pip
  as the current implementation is broken on master (i.e. nothing is
  installed in the virtualenv)
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 01:26:49 -04:00
Dan Ryan b5643760e3 Fix test comparisons
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-04 02:08:05 -04:00
Dan Ryan 1525f88676 Don't use tablib for keep_outdated test due to osx failure
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-04 01:39:03 -04:00
Dan Ryan 359906c669 Update tests to resolve some transient resolution issues
Signed-off-by: Dan Ryan <dan@danryan.co>

probably need to sync submodules for this to work

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

Update to new version of artifacts

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

Fix windows failure

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

Update azure-pipelines.yml for Azure Pipelines

Update lockfile test for windows

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

Fix scandir test

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

Update azure test steps

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

Fix virtualenv test

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

Fix python discovery when nothing is supplied

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

Fix cli ensure_project call

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

Fix run in virtualenv test

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

Show why virtualenv test failed if it did

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

Fix python interpreter discovery

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

scale down lock test modifications and increase error logging

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

Fix spinner bugs on windows and python discovery

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

Fix pythonfinder search algorithm to dodge false paths on win

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

use pipenv directly

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-03 22:01:07 -04:00
Dan Ryan f0e3bbaa79 parent 8ae44bc90b
author Dan Ryan <dan@danryan.co> 1554074378 -0400
committer Dan Ryan <dan@danryan.co> 1558982736 -0400
gpgsig -----BEGIN PGP SIGNATURE-----

 iQIzBAABCgAdFiEEb6jpcpb+5zzDideCsyDQTvvOpJUFAlzsMFAACgkQsyDQTvvO
 pJWZmRAAtge5wdprlLnKdWUYK5USZb7Uk3zJHi9UIvnO7nKP6UA/L2D/5nxZitvx
 pZI7cGG+8sLp2yZNtQZdW6LNM1jmRXgzdMLYQh/5zo5gbj6KLOw7erh0FU3L3uM6
 wNBNM135Eqt7b+4a4C5TEK2UjwRxBHAsF+3ZzUy+UJQqgQEKxFVxW4gC4yxpfMtL
 jipE8ludwuOIM88ZJapmLpv2R6adQTxWZedTlmczdsy2/WKGHTCCpWs96PBbntdI
 pVBmoXfMhgZi+IuGR3iBYU0qS97vjJ8Te9tQZAaB9JGSqv3hHDWo1ht/rrG2RXzp
 3i0Cf2vG4035EUh56VYE9FCC9m6Vu3U9iIR34BZG9K5+lDP7pmJmjT+GymEgMP0N
 GoP3LYUO+dJjMjaUEMsC6QIi6DAots3uk4lxIw3wcA4Im/N/i5xafsRj1Eu3UdBL
 wBDKMz/FQjH+tD+mnvTlzaxD5vdhhCdBu1gK59rjNMlzg8hz6EF61QbHCaQHd4UI
 VOGIa8ThLlLI3addxzq/McceAc+OsLJ9hm06jkjvvoIuKrHyE3DybdbYQC7uEwyw
 2AvVuMDCPcciYQnkJhNTKmGvPcUDYD7cF91GKcUJKdPdyzDCeFEo5SUTKnLV4Cj2
 VD2sdVUk4jnmYfE4pCFvHKYooxQDMKQk/VCKl1c9QHL9/ijCx+o=
 =b+H1
 -----END PGP SIGNATURE-----

Ensure resolver doesn't compare editable specifiers

- Don't compare versions of editable dependencies when updating using
  `--keep-outdated` -- editable dependencies will now be updated to
  the latest version
- Ensure we don't drop markers from the lockfile when versions are not
  updated
- Fixes #3656
- Fixes #3659

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

Add future import for print function

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

Handle all possible markers in lockfiles

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

Fix json import

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

point to correct reference for lockfile

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

Fix marker merging errors

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

Prevent automatically setting `editable=True`

- Fixes #3647

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

Add new feature toggle for VCS dependency resolution

- Fixes #3577

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

Fix syntax error

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

Use string for environment

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

Fix class name resolution for py27

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

Write json files as unicode

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

Fix resolution with env var

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-27 17:44:41 -04:00
Dan Ryan 210495992b Fix marker formatting in keep outdated test
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-15 21:36:06 -04:00
Dan Ryan 102b682284 Fix keep_outdated markers
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-15 21:27:51 -04:00
Dan Ryan e16608c03f sort pytest markers by length
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-18 00:45:40 -04:00
Dan Ryan 6552e8dc8b Add tests for --keep-outdated
- Test that the lockfile doesn't get updated if satisfying constraints
  are pinned already in the lockfile
- Test that pipfile pins are respected
- Test that dependencies in the lockfile with markers that don't apply
  to the current system stay in the lockfile

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-10 04:18:10 -04:00
Dan Ryan 1fcafb8363 Re-integrate changes from keep_outdated
- Lost numerous changes in the rebase, this brings them back
- Should work for both sets of fixes now

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-17 23:01:57 -05:00
Frost Ming 9dab05d64e Update the index names in lock file 2019-01-17 12:04:05 +08:00
Frost Ming ba9f5057b8 Populate source when getting lockfile 2019-01-09 10:07:26 +08:00
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Dan Ryan a08a2da524 Don't give child deps of vcs deps auto-precedence
- Stop preferring resolution of VCS dependencies in all cases
- Resolve vcs dependencies together with non-vcs dependencies
- Clarify blocking and no-deps logic
- Add artifacts and tests
- Add vendoring task for artifacts
- Clean up release tasks
- Fixes #3296

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-24 17:10:45 -05:00
Dan Ryan 2b1ea9ee8a Add test
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-23 18:06:12 -05:00
Dan Ryan 1c7bb3afd9 Fix test for warnings
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-21 22:58:54 -05:00
Dan Ryan 18f8c0a403 Write warnings to stderr during resolution
- Fixes #3273

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-21 13:09:46 -05:00
frostming 905c8c062a Derive missing values of source from existing fields
Signed-off-by: frostming <mianghong@gmail.com>
2018-11-17 15:50:19 +08:00
jxltom 9ff61c777b Add tests for locking editable packages with ref 2018-10-30 10:54:04 -04: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
jxltom 91a63e07e2 Add test on locking package with extras 2018-10-21 12:53:33 +08:00
jxltom 6525e31e51 Add test on locking editable package with markers 2018-10-08 13:20:54 +08:00
Louie Lu 79349dd8f1 Addressed uranusjr comments 2018-07-30 12:22:52 +08:00
Louie Lu 553ed8258c Add JSONDecodeError handling for get_lockfile_hash
Now will return None when facing JSONDecodeError when loading the lockfile.

do_init will remove the old lockfile and replace it.
2018-07-30 12:22:52 +08:00
Jacob Hayes 1ceccb9bdf Fix extras check in test 2018-07-11 23:32:43 -05:00
Jacob Hayes 6de915ab79 [#2504] Replace security extra with socks in test 2018-07-11 08:19:42 -05:00
Jacob Hayes f0a1413c70 [#2504] Add test for VCS dep with extras 2018-07-10 20:58:35 -05:00
Dan Ryan f60d702259 Skip test
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-06-27 17:04:28 -04:00