Closed luss closed 2 years ago
I will look into applying this in the near future for version 2.3. Since Multicorn2 is only purporting to work with Python 3.6+, I'll opt to keep-it-simple and not introduce a dependency on six
.
I checked in the suggested fix, but, haven't tested it yet.
it works
Hey my friend,
thanks so much for creating the economy of Postgres extensions.
Im getting an error when using Postgresql 14 and Python 3.10. After my fix it worked. When I load the extension:
I get this error:
call last):
"/usr/lib/python3.10/site-packages/multicorn-2.2-py3.10-linux-x86_64.egg/multicorn/init.py", line 543, in get_class module = import_module(module_name)
"/usr/lib/python3.10/site-packages/multicorn-2.2-py3.10-linux-x86_64.egg/multicorn/init.py", line 523, in import_module import(name)
"/usr/lib/python3.10/site-packages/multicorn-2.2-py3.10-linux-x86_64.egg/multicorn/fsfdw/init.py", line 109, in
from multicorn.fsfdw.structuredfs import StructuredDirectory
"/usr/lib/python3.10/site-packages/multicorn-2.2-py3.10-linux-x86_64.egg/multicorn/fsfdw/structuredfs.py", line 169, in
class Item(collections.Mapping):
multicorn;
The fix (makes multicorn2 incompatible with Python 2): In multicorn2/python/multicorn/fsfdw/structuredfs.py change the import of
collections
tocollections.abc
and the inheritance ofclass Item(collections.Mapping)
to(collections.abc.Mapping)
It would also be possible to do the following fix instead to ensure compatibility with Python 2. That introduces the dependency
six
. But that fix faulted withImportError: cannot import name 'colletions_abc' from 'six.moves' (unknown location)
on my setup.Sorry for not writing a pull request. Github is too extemely annyoing to use as a mammal. I created a new account on Github but it got instantly banned from public. Even my issue is not visible publicly. Maybe you could host repos on git.pgsql.io haha.
<3333333 Best f