Skip to content

Commit

Permalink
Add news fragments and final patch for all fixes
Browse files Browse the repository at this point in the history
- Fixes #2499
- Fixes #2529
- Fixes #2589
- Fixes #2666
- Fixes #2767
- Fixes #2785
- Fixes #2795
- Fixes #2801
- Fixes #2802
- Fixes #2824
- Fixes #2862
- Fixes #2867
- Fixes #2879
- Fixes #2880
- Fixes #2894
- Fixes #2902
- Fixes #2924

Signed-off-by: Dan Ryan <[email protected]>
  • Loading branch information
techalchemy committed Oct 7, 2018
1 parent 71ed413 commit bf64e7b
Show file tree
Hide file tree
Showing 21 changed files with 130 additions and 20 deletions.
1 change: 1 addition & 0 deletions news/2499.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2529.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2589.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2666.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2767.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2785.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2795.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2801.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
19 changes: 19 additions & 0 deletions news/2802.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Updated vendored dependencies:
- ``pip-tools`` (updated and patched to latest w/ ``pip 18.0`` compatibilty)
- ``pip 10.0.1 => 18.0``
- ``click 6.7 => 7.0``
- ``toml 0.9.4 => 0.10.0``
- ``pyparsing 2.2.0 => 2.2.2``
- ``delegator 0.1.0 => 0.1.1``
- ``attrs 18.1.0 => 18.2.0``
- ``distlib 0.2.7 => 0.2.8``
- ``packaging 17.1.0 => 18.0``
- ``passa 0.2.0 => 0.3.1``
- ``pip_shims 0.1.2 => 0.3.1``
- ``plette 0.1.1 => 0.2.2``
- ``pythonfinder 1.0.2 => 1.1.0``
- ``pytoml 0.1.18 => 0.1.19``
- ``requirementslib 1.1.16 => 1.1.17``
- ``shellingham 1.2.4 => 1.2.6``
- ``tomlkit 0.4.2 => 0.4.4``
- ``vistir 0.1.4 => 0.1.6``
1 change: 1 addition & 0 deletions news/2824.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
1 change: 1 addition & 0 deletions news/2862.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
19 changes: 19 additions & 0 deletions news/2867.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Updated vendored dependencies:
- ``pip-tools`` (updated and patched to latest w/ ``pip 18.0`` compatibilty)
- ``pip 10.0.1 => 18.0``
- ``click 6.7 => 7.0``
- ``toml 0.9.4 => 0.10.0``
- ``pyparsing 2.2.0 => 2.2.2``
- ``delegator 0.1.0 => 0.1.1``
- ``attrs 18.1.0 => 18.2.0``
- ``distlib 0.2.7 => 0.2.8``
- ``packaging 17.1.0 => 18.0``
- ``passa 0.2.0 => 0.3.1``
- ``pip_shims 0.1.2 => 0.3.1``
- ``plette 0.1.1 => 0.2.2``
- ``pythonfinder 1.0.2 => 1.1.0``
- ``pytoml 0.1.18 => 0.1.19``
- ``requirementslib 1.1.16 => 1.1.17``
- ``shellingham 1.2.4 => 1.2.6``
- ``tomlkit 0.4.2 => 0.4.4``
- ``vistir 0.1.4 => 0.1.6``
1 change: 1 addition & 0 deletions news/2879.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
19 changes: 19 additions & 0 deletions news/2880.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Updated vendored dependencies:
- ``pip-tools`` (updated and patched to latest w/ ``pip 18.0`` compatibilty)
- ``pip 10.0.1 => 18.0``
- ``click 6.7 => 7.0``
- ``toml 0.9.4 => 0.10.0``
- ``pyparsing 2.2.0 => 2.2.2``
- ``delegator 0.1.0 => 0.1.1``
- ``attrs 18.1.0 => 18.2.0``
- ``distlib 0.2.7 => 0.2.8``
- ``packaging 17.1.0 => 18.0``
- ``passa 0.2.0 => 0.3.1``
- ``pip_shims 0.1.2 => 0.3.1``
- ``plette 0.1.1 => 0.2.2``
- ``pythonfinder 1.0.2 => 1.1.0``
- ``pytoml 0.1.18 => 0.1.19``
- ``requirementslib 1.1.16 => 1.1.17``
- ``shellingham 1.2.4 => 1.2.6``
- ``tomlkit 0.4.2 => 0.4.4``
- ``vistir 0.1.4 => 0.1.6``
1 change: 1 addition & 0 deletions news/2894.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
19 changes: 19 additions & 0 deletions news/2902.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Updated vendored dependencies:
- ``pip-tools`` (updated and patched to latest w/ ``pip 18.0`` compatibilty)
- ``pip 10.0.1 => 18.0``
- ``click 6.7 => 7.0``
- ``toml 0.9.4 => 0.10.0``
- ``pyparsing 2.2.0 => 2.2.2``
- ``delegator 0.1.0 => 0.1.1``
- ``attrs 18.1.0 => 18.2.0``
- ``distlib 0.2.7 => 0.2.8``
- ``packaging 17.1.0 => 18.0``
- ``passa 0.2.0 => 0.3.1``
- ``pip_shims 0.1.2 => 0.3.1``
- ``plette 0.1.1 => 0.2.2``
- ``pythonfinder 1.0.2 => 1.1.0``
- ``pytoml 0.1.18 => 0.1.19``
- ``requirementslib 1.1.16 => 1.1.17``
- ``shellingham 1.2.4 => 1.2.6``
- ``tomlkit 0.4.2 => 0.4.4``
- ``vistir 0.1.4 => 0.1.6``
1 change: 1 addition & 0 deletions news/2924.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed various bugs related to ``pip 18.1`` release which prevented locking, installation, and syncing, and dumping to a ``requirements.txt`` file.
1 change: 1 addition & 0 deletions news/2933.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed non-deterministic resolution issues related to changes to the internal package finder in ``pip 10``.
19 changes: 19 additions & 0 deletions news/2935.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Updated vendored dependencies:
- ``pip-tools`` (updated and patched to latest w/ ``pip 18.0`` compatibilty)
- ``pip 10.0.1 => 18.0``
- ``click 6.7 => 7.0``
- ``toml 0.9.4 => 0.10.0``
- ``pyparsing 2.2.0 => 2.2.2``
- ``delegator 0.1.0 => 0.1.1``
- ``attrs 18.1.0 => 18.2.0``
- ``distlib 0.2.7 => 0.2.8``
- ``packaging 17.1.0 => 18.0``
- ``passa 0.2.0 => 0.3.1``
- ``pip_shims 0.1.2 => 0.3.1``
- ``plette 0.1.1 => 0.2.2``
- ``pythonfinder 1.0.2 => 1.1.0``
- ``pytoml 0.1.18 => 0.1.19``
- ``requirementslib 1.1.16 => 1.1.17``
- ``shellingham 1.2.4 => 1.2.6``
- ``tomlkit 0.4.2 => 0.4.4``
- ``vistir 0.1.4 => 0.1.6``
7 changes: 5 additions & 2 deletions pipenv/patched/piptools/repositories/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def resolve_reqs(self, download_dir, ireq, wheel_cache, setup_requires={}, dist=
'isolated': False,
'wheel_cache': wheel_cache,
'use_user_site': False,
'ignore_compatibility': True
'ignore_compatibility': False
}
resolver = None
preparer = None
Expand All @@ -292,7 +292,10 @@ def resolve_reqs(self, download_dir, ireq, wheel_cache, setup_requires={}, dist=
# reqset.add_requirement(ireq)
resolver = PipResolver(**resolver_kwargs)
resolver.require_hashes = False
results = resolver._resolve_one(reqset, ireq)
try:
results = resolver._resolve_one(reqset, ireq)
except InstallationError:
pass
reqset.cleanup_files()

if ireq.editable and (ireq.source_dir and os.path.exists(ireq.source_dir)):
Expand Down
34 changes: 16 additions & 18 deletions tasks/vendoring/patches/patched/piptools.patch
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ index 08dabe1..480ad1e 100644
else:
return self.repository.find_best_match(ireq, prereleases)
diff --git a/pipenv/patched/piptools/repositories/pypi.py b/pipenv/patched/piptools/repositories/pypi.py
index bf69803..eb20560 100644
index bf69803..163d510 100644
--- a/pipenv/patched/piptools/repositories/pypi.py
+++ b/pipenv/patched/piptools/repositories/pypi.py
@@ -1,7 +1,7 @@
Expand All @@ -100,7 +100,7 @@ index bf69803..eb20560 100644
+from packaging.requirements import Requirement
+from packaging.specifiers import SpecifierSet, Specifier
+from packaging.markers import Op, Value, Variable, Marker
+InstallationError = do_import(("InstallationError", "exceptions.InstallationError", "7.0", "9999"))
+InstallationError = do_import(("exceptions.InstallationError", "7.0", "9999"))
+from notpip._internal.resolve import Resolver as PipResolver
+

Expand Down Expand Up @@ -221,8 +221,7 @@ index bf69803..eb20560 100644
+ def gen(ireq):
+ if self.DEFAULT_INDEX_URL not in self.finder.index_urls:
+ return

- def resolve_reqs(self, download_dir, ireq, wheel_cache):
+
+ url = 'https://pypi.org/pypi/{0}/json'.format(ireq.req.name)
+ releases = self.session.get(url).json()['releases']
+
Expand Down Expand Up @@ -251,7 +250,8 @@ index bf69803..eb20560 100644
+ try:
+ if ireq not in self._json_dep_cache:
+ self._json_dep_cache[ireq] = [g for g in gen(ireq)]
+

- def resolve_reqs(self, download_dir, ireq, wheel_cache):
+ return set(self._json_dep_cache[ireq])
+ except Exception:
+ return set()
Expand Down Expand Up @@ -296,13 +296,7 @@ index bf69803..eb20560 100644
else:
# pip >= 10
preparer_kwargs = {
@@ -153,19 +264,20 @@ class PyPIRepository(BaseRepository):
'download_dir': download_dir,
'wheel_download_dir': self._wheel_download_dir,
'progress_bar': 'off',
'build_isolation': False
}
resolver_kwargs = {
@@ -159,13 +270,14 @@ class PyPIRepository(BaseRepository):
'finder': self.finder,
'session': self.session,
'upgrade_strategy': "to-satisfy-only",
Expand All @@ -320,15 +314,19 @@ index bf69803..eb20560 100644
}
resolver = None
preparer = None
@@ -177,15 +289,98 @@ class PyPIRepository(BaseRepository):
@@ -177,15 +289,101 @@ class PyPIRepository(BaseRepository):
resolver_kwargs['preparer'] = preparer
reqset = RequirementSet()
ireq.is_direct = True
- reqset.add_requirement(ireq)
+ # reqset.add_requirement(ireq)
resolver = PipResolver(**resolver_kwargs)
resolver.require_hashes = False
results = resolver._resolve_one(reqset, ireq)
- results = resolver._resolve_one(reqset, ireq)
+ try:
+ results = resolver._resolve_one(reqset, ireq)
+ except InstallationError:
+ pass
reqset.cleanup_files()

- return set(results)
Expand Down Expand Up @@ -422,15 +420,15 @@ index bf69803..eb20560 100644
"""
Given a pinned or an editable InstallRequirement, returns a set of
dependencies (also InstallRequirements, but not necessarily pinned).
@@ -200,6 +395,7 @@ class PyPIRepository(BaseRepository):
@@ -200,6 +398,7 @@ class PyPIRepository(BaseRepository):
# If a download_dir is passed, pip will unnecessarely
# archive the entire source directory
download_dir = None
+
elif ireq.link and not ireq.link.is_artifact:
# No download_dir for VCS sources. This also works around pip
# using git-checkout-index, which gets rid of the .git dir.
@@ -214,7 +410,8 @@ class PyPIRepository(BaseRepository):
@@ -214,7 +413,8 @@ class PyPIRepository(BaseRepository):
wheel_cache = WheelCache(CACHE_DIR, self.pip_options.format_control)
prev_tracker = os.environ.get('PIP_REQ_TRACKER')
try:
Expand All @@ -440,7 +438,7 @@ index bf69803..eb20560 100644
finally:
if 'PIP_REQ_TRACKER' in os.environ:
if prev_tracker:
@@ -236,6 +433,10 @@ class PyPIRepository(BaseRepository):
@@ -236,6 +436,10 @@ class PyPIRepository(BaseRepository):
if ireq.editable:
return set()

Expand All @@ -451,7 +449,7 @@ index bf69803..eb20560 100644
if not is_pinned_requirement(ireq):
raise TypeError(
"Expected pinned requirement, got {}".format(ireq))
@@ -243,24 +444,22 @@ class PyPIRepository(BaseRepository):
@@ -243,24 +447,22 @@ class PyPIRepository(BaseRepository):
# We need to get all of the candidates that match our current version
# pin, these will represent all of the files that could possibly
# satisfy this constraint.
Expand Down

0 comments on commit bf64e7b

Please sign in to comment.