svn commit: r437242 - in head/net/py-eventlet: . files
Carlo Strub
cs at FreeBSD.org
Wed Mar 29 21:09:11 UTC 2017
Author: cs
Date: Wed Mar 29 21:07:54 2017
New Revision: 437242
URL: https://svnweb.freebsd.org/changeset/ports/437242
Log:
Fix attribute error
PR: 217867
Submitted by: Alexander Nusov <alexander.nusov at nfvexpress.com>
Added:
head/net/py-eventlet/files/
head/net/py-eventlet/files/patch-eventlet_support_greendns.py (contents, props changed)
Modified:
head/net/py-eventlet/Makefile
Modified: head/net/py-eventlet/Makefile
==============================================================================
--- head/net/py-eventlet/Makefile Wed Mar 29 21:07:22 2017 (r437241)
+++ head/net/py-eventlet/Makefile Wed Mar 29 21:07:54 2017 (r437242)
@@ -3,6 +3,7 @@
PORTNAME= eventlet
PORTVERSION= 0.20.1
+PORTREVISION= 1
CATEGORIES= net python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
Added: head/net/py-eventlet/files/patch-eventlet_support_greendns.py
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/py-eventlet/files/patch-eventlet_support_greendns.py Wed Mar 29 21:07:54 2017 (r437242)
@@ -0,0 +1,27 @@
+--- eventlet/support/greendns.py.orig 2017-03-29 21:00:19 UTC
++++ eventlet/support/greendns.py
+@@ -79,8 +79,14 @@ DNS_QUERY_TIMEOUT = 10.0
+ HOSTS_TTL = 10.0
+
+ EAI_EAGAIN_ERROR = socket.gaierror(socket.EAI_AGAIN, 'Lookup timed out')
+-EAI_NODATA_ERROR = socket.gaierror(socket.EAI_NODATA, 'No address associated with hostname')
+ EAI_NONAME_ERROR = socket.gaierror(socket.EAI_NONAME, 'Name or service not known')
++# EAI_NODATA was removed from RFC3493, it's now replaced with EAI_NONAME
++# socket.EAI_NODATA is not defined on FreeBSD, probably on some other platforms too.
++# https://lists.freebsd.org/pipermail/freebsd-ports/2003-October/005757.html
++EAI_NODATA_ERROR = EAI_NONAME_ERROR
++if (os.environ.get('EVENTLET_DEPRECATED_EAI_NODATA', '').lower() in ('1', 'y', 'yes')
++ and hasattr(socket, 'EAI_NODATA')):
++ EAI_NODATA_ERROR = socket.gaierror(socket.EAI_NODATA, 'No address associated with hostname')
+
+
+ def is_ipv4_addr(host):
+@@ -448,7 +454,7 @@ def _getaddrinfo_lookup(host, family, fl
+ try:
+ answer = resolve(host, qfamily, False)
+ except socket.gaierror as e:
+- if e.errno not in (socket.EAI_AGAIN, socket.EAI_NODATA):
++ if e.errno not in (socket.EAI_AGAIN, EAI_NONAME_ERROR.errno, EAI_NODATA_ERROR.errno):
+ raise
+ err = e
+ else:
More information about the svn-ports-all
mailing list