You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My original issue is pypa/pipenv#5709.
It caused in vendered pythonfinder in phpenv. So, I add this issue.
Problem: The following code causes RecursionError: maximum recursion depth exceeded in my MSYS environment on Windows.
from pythonfinder import Finder
f = Finder()
# p = f.find_all_python_versions()
p = f.find_python_version(3)
print("My python:", p)
I expect a result.
My python: D:/DiskD/develop/msys64/mingw64/bin/python3.exe
Error output is here
Traceback (most recent call last):
File "D:\DiskD\develop\turutcrane\pythonfinder\src\test.py", line 7, in <module>
p = f.find_python_version(3)
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/pythonfinder.py", line 174, in find_python_version
return self.system_path.find_python_version(
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/models/path.py", line 471, in find_python_version
ver = next(iter(self.get_pythons(sub_finder)), None)
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/models/path.py", line 405, in get_pythons
pythons = [entry for entry in self._get_all_pythons(finder)]
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/models/path.py", line 405, in <listcomp>
pythons = [entry for entry in self._get_all_pythons(finder)]
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/models/path.py", line 397, in _get_all_pythons
for python in self._filter_paths(finder):
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/models/path.py", line 390, in _filter_paths
python_versions = finder(path)
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/models/path.py", line 449, in sub_finder
return obj.find_python_version(major, minor, patch, pre, dev, arch, name)
File "D:/DiskD\develop\turutcrane\pythonfinder\src/pythonfinder/models/mixins.py", line 304, in find_python_version
results = sorted(matching_pythons, key=lambda r: (r[1], r[0]), reverse=True)
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 909, in __eq__
return self.dict() == other.dict()
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 449, in dict
return dict(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 868, in _iter
v = self._get_value(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 761, in _get_value
return {
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 762, in <dictcomp>
k_: cls._get_value(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 743, in _get_value
v_dict = v.dict(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 449, in dict
return dict(
... loop ...
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 743, in _get_value
v_dict = v.dict(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 449, in dict
return dict(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 868, in _iter
v = self._get_value(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 761, in _get_value
return {
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 762, in <dictcomp>
k_: cls._get_value(
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 741, in _get_value
if isinstance(v, BaseModel):
File "D:/DiskD/develop/msys64/home/turu/py-usersite/lib/python3.10-mingw_x86_64/site-packages/pydantic/main.py", line 304, in __instancecheck__
return hasattr(instance, '__fields__') and super().__instancecheck__(instance)
File "D:/DiskD/develop/msys64/mingw64/lib/python3.10/abc.py", line 119, in __instancecheck__
return _abc_instancecheck(cls, instance)
RecursionError: maximum recursion depth exceeded in comparison
src/pythonfinder/models/mixins.py", line 304, in find_python_version
results = sorted(matching_pythons, key=lambda r: (r[1], r[0]), reverse=True)
calls eq in /pydantic/main.py, then start infinite call.
The text was updated successfully, but these errors were encountered:
My original issue is pypa/pipenv#5709.
It caused in vendered pythonfinder in phpenv. So, I add this issue.
Problem: The following code causes RecursionError: maximum recursion depth exceeded in my MSYS environment on Windows.
I expect a result.
Error output is here
calls eq in /pydantic/main.py, then start infinite call.
The text was updated successfully, but these errors were encountered: