FreeBSD Bugzilla – Attachment 180903 Details for
Bug 217867
[BUG] net/py-eventlet 0.20.1: AttributeError: 'module' object has no attribute 'EAI_NODATA'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed fix
eventlet.diff (text/plain), 3.22 KB, created by
Alexander Nusov
on 2017-03-17 14:00:54 UTC
(
hide
)
Description:
proposed fix
Filename:
MIME Type:
Creator:
Alexander Nusov
Created:
2017-03-17 14:00:54 UTC
Size:
3.22 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 436336) >+++ Makefile (working copy) >@@ -3,6 +3,7 @@ > > PORTNAME= eventlet > PORTVERSION= 0.20.1 >+PORTREVISION= 1 > CATEGORIES= net python > MASTER_SITES= CHEESESHOP > PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} >@@ -17,6 +18,8 @@ > ${PYTHON_PKGNAMEPREFIX}enum34>=1.1.6:devel/py-enum34 > TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}nose>0:devel/py-nose > >+EXTRA_PATCHES= ${FILESDIR}/0001-dns-EAI_NODATA-was-removed-from-RFC3493-and-FreeBSD.patch:-p1 >+ > USES= python > USE_PYTHON= distutils autoplist > >Index: files/0001-dns-EAI_NODATA-was-removed-from-RFC3493-and-FreeBSD.patch >=================================================================== >--- files/0001-dns-EAI_NODATA-was-removed-from-RFC3493-and-FreeBSD.patch (nonexistent) >+++ files/0001-dns-EAI_NODATA-was-removed-from-RFC3493-and-FreeBSD.patch (working copy) >@@ -0,0 +1,46 @@ >+From 4e775e23f312c386929e0c5e9a9c952c1ec80c45 Mon Sep 17 00:00:00 2001 >+From: Sergey Shepelev <temotor@gmail.com> >+Date: Sat, 25 Feb 2017 13:40:13 +0300 >+Subject: [PATCH] dns: EAI_NODATA was removed from RFC3493 and FreeBSD >+ >+If your code depends on EAI_NODATA, run with EVENTLET_DEPRECATED_EAI_NODATA=yes >+during transition to EAI_NONAME. >+Support for EAI_NODATA will be removed in future versions. >+ >+https://github.com/eventlet/eventlet/issues/393 >+--- >+ eventlet/support/greendns.py | 10 ++++++++-- >+ 1 file changed, 8 insertions(+), 2 deletions(-) >+ >+diff --git a/eventlet/support/greendns.py b/eventlet/support/greendns.py >+index ea0924c..2f1b8c3 100644 >+--- a/eventlet/support/greendns.py >++++ b/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): >+@@ -459,7 +465,7 @@ def _getaddrinfo_lookup(host, family, flags): >+ 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: >+-- >+2.11.1 >+ > >Property changes on: files/0001-dns-EAI_NODATA-was-removed-from-RFC3493-and-FreeBSD.patch >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 217867
: 180903
Working