Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix direct url dependency resolution #3298

Merged
merged 74 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
ffb46e4
Fix direct url dependency resolution
techalchemy Nov 25, 2018
2798733
Merge branch 'master' into bugfix/3148
techalchemy Nov 25, 2018
bd78dae
WIP continued, some fixes
techalchemy Nov 25, 2018
ed3f206
Update vendored dependency pins
techalchemy Jan 21, 2019
574fe73
Update all vendored dependencies
techalchemy Jan 22, 2019
ea1096d
Update pythonfinder
techalchemy Jan 22, 2019
4a8eead
Remove pyc from pyinstaller and grab final updates from pythonfinder
techalchemy Jan 22, 2019
1601511
Don't depend on kenneth's personal mirror for testing
techalchemy Jan 22, 2019
7ad588d
A few fixes for windows and relative paths
techalchemy Jan 22, 2019
7b25a5c
fix pythonfinder
techalchemy Jan 22, 2019
3289c7b
Update pythonfinder windows implementation
techalchemy Jan 22, 2019
39c3b3a
Fix editable and local setup.py builds
techalchemy Jan 23, 2019
86ca6ff
Fix direct url dependency resolution
techalchemy Nov 25, 2018
da14a88
WIP continued, some fixes
techalchemy Nov 25, 2018
846b67f
Update PEP 508 dependency parsing implementation
techalchemy Jan 24, 2019
23ee483
Add pep517 to environment path
techalchemy Jan 24, 2019
eae3958
Fix pep508 direct URL depedencies
techalchemy Jan 27, 2019
19f2ee6
Update resolver to handle all resolution in venv
Feb 11, 2019
01845e5
Update requirementslib for PEP517 builder
techalchemy Feb 15, 2019
41345a7
requirementslib bugfixes
techalchemy Feb 15, 2019
f5fda09
Direct URL updates and pep517 fixes
techalchemy Feb 15, 2019
ef682bd
Fix tuple bug in resolver
techalchemy Feb 15, 2019
c049976
Pass all packages through to `venv_resolve_deps`
techalchemy Feb 16, 2019
6b1d617
Add pytoml (dependency of pep517)
techalchemy Feb 16, 2019
e392b02
Add additional test packages
techalchemy Feb 17, 2019
222eb50
Fix buggy pep517 implementation
techalchemy Feb 17, 2019
53c4968
Fix name reference
techalchemy Feb 17, 2019
eaf7504
Fix specifier parsing in python 2
techalchemy Feb 17, 2019
a019de0
Restore existing pyinstaller commit
techalchemy Feb 17, 2019
f6e657e
Update lockfile
techalchemy Feb 18, 2019
08a8bbc
Add test extras to setup.py to pin pytest
techalchemy Feb 18, 2019
f8a5102
Install local tests extra for test runners
techalchemy Feb 18, 2019
9a47590
Fix pipenv clean to stop trying to remove python
techalchemy Feb 18, 2019
907aca1
Use set comparisons for removing packages
techalchemy Feb 19, 2019
caf4818
Update azure test runner
techalchemy Feb 19, 2019
c54aa54
Fix uninstall and error formatting
techalchemy Feb 19, 2019
a522430
Update test runner scripts to handle both python versions
techalchemy Feb 19, 2019
5ac228e
Fix test errors and local install for azure
techalchemy Feb 19, 2019
bfdb9ae
Fix installed package discovery
techalchemy Feb 20, 2019
9340ddb
Update tests to rectify issues
techalchemy Feb 20, 2019
a47a26b
Fix failing tests
techalchemy Feb 20, 2019
8041704
Merge branch 'bugfix/3148' of github.com:pypa/pipenv into bugfix/3148
techalchemy Feb 20, 2019
16a249f
Fix installed package discovery on windows
techalchemy Feb 20, 2019
cd2cbd4
Avoid using `which` in cross platform tests
techalchemy Feb 20, 2019
3bc48f0
Fix venv with leading dash test on windows and clean up tests
techalchemy Feb 22, 2019
7f75507
Clean up path checks in environment
techalchemy Feb 22, 2019
3f3e61e
Fix path reformatting for posix python path
techalchemy Feb 22, 2019
565850d
Fix broken imports
techalchemy Feb 22, 2019
018e6fe
Fix pipenv dist discovery
techalchemy Feb 23, 2019
33e456d
Merge branch 'bugfix/3148' of github.com:pypa/pipenv into bugfix/3148
techalchemy Feb 23, 2019
090619a
Fix virtualenv tempdir lifespan
techalchemy Feb 23, 2019
b0ba9a8
Update syntax for context manager virtualenv test class
techalchemy Feb 23, 2019
05d3b5a
Update license download script
techalchemy Feb 25, 2019
bc3d50b
Update vendored vistir
techalchemy Feb 26, 2019
32876ec
Update requirementslib
techalchemy Feb 26, 2019
3f053a3
Fix command dispatching
Feb 27, 2019
4848a1e
Update vistir and requirementslib
techalchemy Mar 1, 2019
199a14a
Incorporate fixes from feature/keep-outdated-peep
techalchemy Mar 2, 2019
be3c771
Cut in new cursor implementation
techalchemy Mar 2, 2019
57b266f
Update requirementslib to include extras in parser
techalchemy Mar 2, 2019
e238c84
Only resolve requirements with markers we can evaluate
techalchemy Mar 3, 2019
de4d659
requirementslib bugfix
techalchemy Mar 3, 2019
374086e
Update requirementslib
techalchemy Mar 4, 2019
7fe11e7
Add new file for requirementslib
techalchemy Mar 4, 2019
a1cb576
vendor orderedmultidict
techalchemy Mar 4, 2019
cebe0ac
Update vnedored dependency list
techalchemy Mar 4, 2019
37916cb
Re-add passa
techalchemy Mar 4, 2019
716dfb4
Update vistir patch
techalchemy Mar 4, 2019
2d1b4bd
Update setup dependencies
techalchemy Mar 4, 2019
dc41e66
Re-run vendoring script
techalchemy Mar 4, 2019
c53e29b
Fix vendoring script in azure pipeline
techalchemy Mar 5, 2019
01444da
Update news files
techalchemy Mar 5, 2019
439a258
One more news file update
techalchemy Mar 5, 2019
b395aca
Add missing news entries
techalchemy Mar 5, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update vendored dependency pins
- Update gitignore entries for mypy config
- Update release task to add version after bumping but before release
- Fixes #3326 (going forward at least)
- Split out patching from vendoring so it can be done as a separate step
  if needed
- Update patches to account for updated packages
- Fixes #3432
- Fixes #2757
- Fixes #3305
- Fixes #2914
- Fixes #3439
- Fixes #3422
- Fixes #3378
- Fixes #3376
- Fixes #3315

Signed-off-by: Dan Ryan <dan@danryan.co>
  • Loading branch information
techalchemy committed Jan 21, 2019
commit ed3f206e644bfd9361670729e846c76e9c4f8a77
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,8 @@ venv.bak/

# Custom rules (everything added below won't be overriden by 'Generate .gitignore File' if you use 'Update' option)
.vs/slnx.sqlite

# mypy/typing section
typeshed/
.dmypy.json
mypyhtml/
34 changes: 17 additions & 17 deletions pipenv/vendor/vendor.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,48 @@ blindspin==2.0.1
click==7.0
click-completion==0.5.0
click-didyoumean==0.0.3
colorama==0.3.9
colorama==0.4.1
delegator.py==0.1.1
pexpect==4.6.0
ptyprocess==0.6.0
python-dotenv==0.9.1
python-dotenv==0.10.1
first==2.0.1
iso8601==0.1.12
jinja2==2.10
markupsafe==1.0
parse==1.9.0
pathlib2==2.3.2
pathlib2==2.3.3
scandir==1.9
pipdeptree==0.13.0
pipdeptree==0.13.1
pipreqs==0.4.9
docopt==0.6.2
yarg==0.1.9
pythonfinder==1.1.10
requests==2.20.1
requests==2.21.0
chardet==3.0.4
idna==2.7
urllib3==1.24
certifi==2018.10.15
requirementslib==1.3.3
idna==2.8
urllib3==1.24.1
certifi==2018.11.29
requirementslib==1.4.0
attrs==18.2.0
distlib==0.2.8
packaging==18.0
pyparsing==2.2.2
packaging==19.0
pyparsing==2.3.1
git+https://github.com/sarugaku/plette.git@master#egg=plette
tomlkit==0.5.2
shellingham==1.2.7
six==1.11.0
tomlkit==0.5.3
shellingham==1.2.8
six==1.12.0
semver==2.8.1
shutilwhich==1.1.0
toml==0.10.0
cached-property==1.4.3
vistir==0.2.5
cached-property==1.5.1
vistir==0.3.0
pip-shims==0.3.2
ptyprocess==0.6.0
enum34==1.1.6
yaspin==0.14.0
cerberus==1.2
git+https://github.com/sarugaku/passa.git@master#egg=passa
cursor==1.2.0
resolvelib==0.2.2
backports.functools_lru_cache==1.5
pep517==0.5.0
2 changes: 1 addition & 1 deletion tasks/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def release(ctx, dry_run=False):
log(f'Would commit with message: "Release v{version}"')
else:
ctx.run('towncrier')
ctx.run("git add CHANGELOG.rst news/")
ctx.run("git add CHANGELOG.rst news/ {0}".format(get_version_file(ctx).as_posix()))
ctx.run("git rm CHANGELOG.draft.rst")
ctx.run(f'git commit -m "Release v{version}"')

Expand Down
31 changes: 22 additions & 9 deletions tasks/vendoring/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,26 @@ def post_install_cleanup(ctx, vendor_dir):
remove_all(vendor_dir.glob('toml.py'))


@invoke.task
def apply_patches(ctx, patched=False, pre=False):
if patched:
vendor_dir = _get_patched_dir(ctx)
else:
vendor_dir = _get_vendor_dir(ctx)
log("Applying pre-patches...")
patch_dir = Path(__file__).parent / 'patches' / vendor_dir.name
if pre:
if not patched:
pass
for patch in patch_dir.glob('*.patch'):
if not patch.name.startswith('_post'):
apply_patch(ctx, patch)
else:
patches = patch_dir.glob('*.patch' if not patched else '_post*.patch')
for patch in patches:
apply_patch(ctx, patch)


def vendor(ctx, vendor_dir, package=None, rewrite=True):
log('Reinstalling vendored libraries')
is_patched = vendor_dir.name == 'patched'
Expand All @@ -359,12 +379,8 @@ def vendor(ctx, vendor_dir, package=None, rewrite=True):

# Apply pre-patches
log("Applying pre-patches...")
patch_dir = Path(__file__).parent / 'patches' / vendor_dir.name
if is_patched:
for patch in patch_dir.glob('*.patch'):
if not patch.name.startswith('_post'):
apply_patch(ctx, patch)

apply_patches(ctx, patched=is_patched, pre=True)
log("Removing scandir library files...")
remove_all(vendor_dir.glob('*.so'))
drop_dir(vendor_dir / 'setuptools')
Expand All @@ -385,10 +401,7 @@ def vendor(ctx, vendor_dir, package=None, rewrite=True):
rewrite_file_imports(item, vendored_libs, vendor_dir)
write_backport_imports(ctx, vendor_dir)
if not package:
log('Applying post-patches...')
patches = patch_dir.glob('*.patch' if not is_patched else '_post*.patch')
for patch in patches:
apply_patch(ctx, patch)
apply_patches(ctx, patched=is_patched, pre=False)
if is_patched:
piptools_vendor = vendor_dir / 'piptools' / '_vendored'
if piptools_vendor.exists():
Expand Down
18 changes: 0 additions & 18 deletions tasks/vendoring/patches/vendor/dotenv-windows-unicode.patch

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index 7820aa5..2082fc8 100644
from ordereddict import OrderedDict

-try:
- from pipenv.patched.notpip._internal import get_installed_distributions
- from pipenv.patched.notpip._internal.utils.misc import get_installed_distributions
- from pipenv.patched.notpip._internal.operations.freeze import FrozenRequirement
-except ImportError:
- from pipenv.patched.notpip import get_installed_distributions, FrozenRequirement
Expand All @@ -17,3 +17,4 @@ index 7820aa5..2082fc8 100644

import pkg_resources
# inline:

4 changes: 3 additions & 1 deletion tasks/vendoring/patches/vendor/tomlkit-fix.patch
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ diff --git a/pipenv/vendor/tomlkit/container.py b/pipenv/vendor/tomlkit/containe
index cb8af1d5..9b5db5cb 100644
--- a/pipenv/vendor/tomlkit/container.py
+++ b/pipenv/vendor/tomlkit/container.py
@@ -1,13 +1,5 @@
@@ -1,15 +1,7 @@
from __future__ import unicode_literals

import copy

-from typing import Any
-from typing import Dict
Expand Down
8 changes: 4 additions & 4 deletions tasks/vendoring/patches/vendor/vistir-imports.patch
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ diff --git a/pipenv/vendor/vistir/compat.py b/pipenv/vendor/vistir/compat.py
index 9ae33fdc..ec3b65cb 100644
--- a/pipenv/vendor/vistir/compat.py
+++ b/pipenv/vendor/vistir/compat.py
@@ -31,11 +31,11 @@ if sys.version_info >= (3, 5):
@@ -43,11 +43,11 @@ if sys.version_info >= (3, 5):
from functools import lru_cache
else:
from pathlib2 import Path
Expand All @@ -29,12 +29,12 @@ index 9ae33fdc..ec3b65cb 100644
NamedTemporaryFile = _NamedTemporaryFile
else:
from tempfile import NamedTemporaryFile
@@ -44,7 +44,7 @@ else:
@@ -56,7 +56,7 @@ else:
try:
from weakref import finalize
except ImportError:
- from backports.weakref import finalize
+ from pipenv.vendor.backports.weakref import finalize
- from backports.weakref import finalize # type: ignore
+ from pipenv.vendor.backports.weakref import finalize # type: ignore

try:
from functools import partialmethod