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

Infer top-level names for a package #340

Merged
merged 5 commits into from Aug 26, 2021
Merged

Conversation

jaraco
Copy link
Member

@jaraco jaraco commented Aug 14, 2021

Potential fix for #330.

Copy link
Member

@FFY00 FFY00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good 👍

@jaraco jaraco merged commit 15df009 into main Aug 26, 2021
@jaraco jaraco deleted the feature/top-level-not-setuptools branch August 26, 2021 00:27
def _top_level_inferred(dist):
return {
f.parts[0] if len(f.parts) > 1 else f.with_suffix('').name
for f in dist.files
Copy link

@harupy harupy Aug 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @jaraco, does this line throw when dist.files returns None? In our repo, we observed an issue that seems related to this line:

https://github.com/mlflow/mlflow/runs/3428616955#step:5:7078

  File "/miniconda/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 1016, in packages_distributions
    for pkg in _top_level_declared(dist) or _top_level_inferred(dist):
  File "/miniconda/lib/python3.9/site-packages/importlib_metadata/__init__.py", line 1026, in _top_level_inferred
    return {
TypeError: 'NoneType' object is not iterable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants