Closed Wouter1 closed 3 weeks ago
For the test above I used a venv that was already on my machine.
I found that it works OK if I use a completely empty venv and only install multimethod.
So the issue I reported must be a result of a conflict between multimethod and another installed library
Let me know if you want to dig deeper.
The full pip list was this for my failed test
z$ pip list
Package Version
----------------- -------
beartype 0.18.5
geniusweb 1
logging 1.1.0
markdown-it-py 3.0.0
mdurl 0.1.2
mockito 1.4.0
multimethod 1.10
pip 24.2
pkg_resources 0.0.0
plum-dispatch 2.4.2
psutil 6.0.0
Pygments 2.18.0
PyHamcrest 2.0.4
pyson 1.2.0
pythonlangutil 0.1
rich 13.8.0
setuptools 44.0.0
typing_extensions 4.12.2
unitpy 1.1.0
uri 2.0.0
utilities 1.0.7
I found that plum is the conflicting library. plum is another multi-dispatch library. It uses a different annotation @dispatch instead of @multimethod. After removing that from my venv, multimethod worked OK.
I found that plum is the conflicting library. plum is another multi-dispatch library. It uses a different annotation @dispatch instead of @multimethod. After removing that from my venv, multimethod worked OK.
Besides being installed, plum
must have been on the path. typing
is built-in, but it was finding plum's first.
File "/tmp/PythonVenvs/geniusweb1targz/lib/python3.8/site-packages/multimethod/__init__.py", line 8, in <module>
from typing import Any, Callable, Dict, Iterable, Iterator, Literal, Mapping, Optional, Tuple
File "/tmp/PythonVenvs/geniusweb1targz/lib/python3.8/site-packages/plum/typing.py", line 10, in <module>
import typing_extensions
Describe the bug
Python 3.8.10
I do inside a venv
and then in python, import fails:
To Reproduce
Expected behavior succesfull import