Commit 8e984508 authored by Jim Fulton's avatar Jim Fulton

Bug fixed

- On some systems, using an empty string in a server address of a ZEO
  client led to a socket error. Now, ZEO clients treat '' as an alias
  for 'localhost'.
parent 60a333d0
...@@ -2,6 +2,17 @@ ...@@ -2,6 +2,17 @@
Change History Change History
================ ================
3.10.0b8 (2010-09-30)
=====================
Bugs fixed
----------
- On some systems, using an empty string in a server address of a ZEO
client led to a socket error. Now, ZEO clients treat '' as an alias
for 'localhost'.
3.10.0b7 (2010-09-28) 3.10.0b7 (2010-09-28)
===================== =====================
......
...@@ -1656,6 +1656,19 @@ Make sure we don't lose exension methods on server restart. ...@@ -1656,6 +1656,19 @@ Make sure we don't lose exension methods on server restart.
>>> conn.close() >>> conn.close()
""" """
def can_use_empty_string_for_local_host_on_client():
"""We should be able to spell localhost with ''.
>>> (_, port), _ = start_server()
>>> conn = ZEO.connection(('', port))
>>> conn.root()
{}
>>> conn.root.x = 1
>>> transaction.commit()
>>> conn.close()
"""
slow_test_classes = [ slow_test_classes = [
BlobAdaptedFileStorageTests, BlobWritableCacheTests, BlobAdaptedFileStorageTests, BlobWritableCacheTests,
MappingStorageTests, DemoStorageTests, MappingStorageTests, DemoStorageTests,
......
...@@ -444,7 +444,7 @@ class ConnectThread(threading.Thread): ...@@ -444,7 +444,7 @@ class ConnectThread(threading.Thread):
# reconfiguration can affect failover # reconfiguration can affect failover
if domain == socket.AF_INET: if domain == socket.AF_INET:
for (family, socktype, proto, cannoname, sockaddr for (family, socktype, proto, cannoname, sockaddr
) in socket.getaddrinfo(host, port): ) in socket.getaddrinfo(host or 'localhost', port):
# for IPv6, drop flowinfo, and restrict addresses # for IPv6, drop flowinfo, and restrict addresses
# to [host]:port # to [host]:port
yield family, sockaddr[:2] yield family, sockaddr[:2]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment