WIP: Fix NEO ipv6 address usage with WCFS
Hello,
I encountered a problem when reading from the root object of a NEO storage which has been opened by using an ipv6 address:
>>> from wendelin.lib.zodb import dbopen
>>> root = dbopen("neo://cluster-name@[::]:2051")
>>> # "abc" points to a ZBigArray
>>> root["abc"][0]I inserted a dirty print in the first line of wcfs join function:
print(zurl)which returns:
neo://:::2051/cluster-name
while I would expect
neo://[::]:2051/cluster-name
Following the wc code [1] I understood that the conversion of the URL happens in zstor_2zurl. I think zstor_2zurl needs explicit changes to add square brackets for ivp6 hosts.
My initial draft only adjusts the NEO part, maybe we also need to change the ZEO part?
WIP: Adding tests, running tests.
Best, Levin
/cc @kirr
[1] root["abc"][0] leads to __getitem__ which leads to _fileh property which leads to fileh_open, which leads to pywconnOf which finally calls zstor_2zurl.