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

Handle Completely Non-Present Package on PyPI... #13532

Merged
merged 1 commit into from
Sep 3, 2020
Merged
Changes from all commits
Commits
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
7 changes: 6 additions & 1 deletion eng/tox/sanitize_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ def update_requires(setup_py_path, requires_dict):

def is_required_version_on_pypi(package_name, spec):
client = PyPIClient()
versions = [str(v) for v in client.get_ordered_versions(package_name) if str(v) in spec]
try:
pypi_results = client.get_ordered_versions(package_name)
except:
pypi_results = []

versions = [str(v) for v in pypi_results if str(v) in spec]
return versions


Expand Down