Skip to content

Importlib problems with mpmath #5601

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

Closed
Masterchef365 opened this issue Mar 12, 2025 · 1 comment
Closed

Importlib problems with mpmath #5601

Masterchef365 opened this issue Mar 12, 2025 · 1 comment
Labels
C-bug Something isn't working

Comments

@Masterchef365
Copy link

Summary

Can't import mpmath, throws StopIteration in importlib/metadata/__init__.py.

Expected

Cloned https://github.com/mpmath/mpmath/, and then ran python3 from the root of the repository, import mpmath works as expected.

Actual

Using Rustpython (main, 8484bfa), the same procedure results in:

set value to PackageNotFoundError ignored
Traceback (most recent call last):
  File "/home/duncan/Projects/RustPython/pylib/Lib/importlib/metadata/__init__.py", line 403, in from_name
    return next(cls.discover(name=name))
StopIteration

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/duncan/Downloads/mpmath/mpmath/__init__.py", line 3, in <module>
    __version__ = version(__name__)
  File "/home/duncan/Projects/RustPython/pylib/Lib/importlib/metadata/__init__.py", line 894, in version
    return distribution(distribution_name).version
  File "/home/duncan/Projects/RustPython/pylib/Lib/importlib/metadata/__init__.py", line 867, in distribution
    return Distribution.from_name(distribution_name)
  File "/home/duncan/Projects/RustPython/pylib/Lib/importlib/metadata/__init__.py", line 405, in from_name
    raise PackageNotFoundError(name)
PackageNotFoundError: mpmath
@Masterchef365 Masterchef365 added the C-bug Something isn't working label Mar 12, 2025
@Masterchef365
Copy link
Author

No longer seeing this, I believe it's fixed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant