-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Update vendor libraries #4302
Update vendor libraries #4302
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- Updated vendored dependencies: | ||
|
||
- **pythonfinder**: ``1.2.2`` => ``1.2.4`` | ||
- **requirementslib**: ``1.5.9`` => ``1.5.10`` |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,6 @@ | |
Sequence, | ||
dedup, | ||
ensure_path, | ||
expand_paths, | ||
filter_pythons, | ||
is_in_path, | ||
normalize_path, | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -469,21 +469,18 @@ def iter_metadata(path, pkg_name=None, metadata_type="egg-info"): | |
# type: (AnyStr, Optional[AnyStr], AnyStr) -> Generator | ||
if pkg_name is not None: | ||
pkg_variants = get_name_variants(pkg_name) | ||
non_matching_dirs = [] | ||
with contextlib.closing(ScandirCloser(path)) as path_iterator: | ||
for entry in path_iterator: | ||
if entry.is_dir(): | ||
entry_name, ext = os.path.splitext(entry.name) | ||
if ext.endswith(metadata_type): | ||
if pkg_name is None or entry_name.lower() in pkg_variants: | ||
yield entry | ||
elif not entry.name.endswith(metadata_type): | ||
non_matching_dirs.append(entry) | ||
for entry in non_matching_dirs: | ||
for dir_entry in iter_metadata( | ||
entry.path, pkg_name=pkg_name, metadata_type=metadata_type | ||
): | ||
yield dir_entry | ||
dirs_to_search = [path] | ||
while dirs_to_search: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. glad to get this merged, so much nesting though! |
||
p = dirs_to_search.pop(0) | ||
with contextlib.closing(ScandirCloser(p)) as path_iterator: | ||
for entry in path_iterator: | ||
if entry.is_dir(): | ||
entry_name, ext = os.path.splitext(entry.name) | ||
if ext.endswith(metadata_type): | ||
if pkg_name is None or entry_name.lower() in pkg_variants: | ||
yield entry | ||
elif not entry.name.endswith(metadata_type): | ||
dirs_to_search.append(entry.path) | ||
|
||
|
||
def find_egginfo(target, pkg_name=None): | ||
|
@@ -729,14 +726,16 @@ def unmap_binops(self): | |
self.binOps_map[binop] = ast_unparse(binop, analyzer=self) | ||
|
||
def match_assignment_str(self, match): | ||
return next( | ||
iter(k for k in self.assignments if getattr(k, "id", "") == match), None | ||
) | ||
matches = [k for k in self.assignments if getattr(k, "id", "") == match] | ||
if matches: | ||
return matches[-1] | ||
return None | ||
|
||
def match_assignment_name(self, match): | ||
return next( | ||
iter(k for k in self.assignments if getattr(k, "id", "") == match.id), None | ||
) | ||
matches = [k for k in self.assignments if getattr(k, "id", "") == match.id] | ||
if matches: | ||
return matches[-1] | ||
return None | ||
|
||
def generic_unparse(self, item): | ||
if any(isinstance(item, k) for k in AST_BINOP_MAP.keys()): | ||
|
@@ -771,7 +770,7 @@ def unparse_Subscript(self, item): | |
if isinstance(item.slice, ast.Index): | ||
try: | ||
unparsed = unparsed[self.unparse(item.slice.value)] | ||
except KeyError: | ||
except (KeyError, TypeError): | ||
# not everything can be looked up before runtime | ||
unparsed = item | ||
return unparsed | ||
|
@@ -838,7 +837,7 @@ def unparse_Compare(self, item): | |
if isinstance(item.left, ast.Attribute) or isinstance(item.left, ast.Str): | ||
import importlib | ||
|
||
left = unparse(item.left) | ||
left = self.unparse(item.left) | ||
if "." in left: | ||
name, _, val = left.rpartition(".") | ||
left = getattr(importlib.import_module(name), val, left) | ||
|
@@ -1002,7 +1001,7 @@ def ast_unparse(item, initial_mapping=False, analyzer=None, recurse=True): # no | |
if isinstance(item.slice, ast.Index): | ||
try: | ||
unparsed = unparsed[unparse(item.slice.value)] | ||
except KeyError: | ||
except (KeyError, TypeError): | ||
# not everything can be looked up before runtime | ||
unparsed = item | ||
elif any(isinstance(item, k) for k in AST_BINOP_MAP.keys()): | ||
|
@@ -1848,7 +1847,7 @@ def from_ireq(cls, ireq, subdir=None, finder=None, session=None): | |
is_vcs = True if vcs else is_artifact_or_vcs | ||
if is_file and not is_vcs and path is not None and os.path.isdir(path): | ||
target = os.path.join(kwargs["src_dir"], os.path.basename(path)) | ||
shutil.copytree(path, target) | ||
shutil.copytree(path, target, symlinks=True) | ||
ireq.source_dir = target | ||
if not (ireq.editable and is_file and is_vcs): | ||
if ireq.is_wheel: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,18 +20,18 @@ pipdeptree==0.13.2 | |
pipreqs==0.4.10 | ||
docopt==0.6.2 | ||
yarg==0.1.9 | ||
pythonfinder==1.2.2 | ||
pythonfinder==1.2.4 | ||
requests==2.23.0 | ||
chardet==3.0.4 | ||
idna==2.9 | ||
urllib3==1.25.9 | ||
certifi==2020.4.5.1 | ||
requirementslib==1.5.9 | ||
requirementslib==1.5.10 | ||
attrs==19.3.0 | ||
distlib==0.3.0 | ||
packaging==20.3 | ||
pyparsing==2.4.7 | ||
git+https://github.com/sarugaku/plette.git@master#egg=plette | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the release in sync with master now? that's nice to know anyhow |
||
plette==0.2.3 | ||
tomlkit==0.5.11 | ||
shellingham==1.3.2 | ||
six==1.14.0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this from the last release? I think I forgot to update
pythonfinder
!