Commit bc582750 authored by Jason Madden's avatar Jason Madden

Account for some more warnings that Python 3.6 can generate: ImportWarning:...

Account for some more warnings that Python 3.6 can generate: ImportWarning: can't resolve package from __spec__ or __package__, falling back on __name__ and __path__. See https://travis-ci.org/gevent/gevent/jobs/310040846
parent 61399d52
......@@ -73,7 +73,6 @@ def create_connection(address, timeout=_GLOBAL_DEFAULT_TIMEOUT, source_address=N
"""
host, port = address
err = None
# getaddrinfo is documented as returning a list, but our interface
# is pluggable, so be sure it does.
addrs = list(getaddrinfo(host, port, 0 if has_ipv6 else AF_INET, SOCK_STREAM))
......
......@@ -363,11 +363,14 @@ class TestLocalhost(TestCase):
result = (result[0], result[1], ['127.0.0.1'])
return result
add(TestLocalhost, 'localhost')
if not greentest.RUNNING_ON_TRAVIS:
# ares fails here, for some reason, presumably a badly
# configured /etc/hosts
add(TestLocalhost, 'ip6-localhost')
# Beginning Dec 1 2017, ares started returning ip6-localhost
# instead of localhost
add(TestLocalhost, 'localhost')
class TestNonexistent(TestCase):
......@@ -385,7 +388,10 @@ add(Test1234, '1.2.3.4')
class Test127001(TestCase):
pass
add(Test127001, '127.0.0.1')
if not greentest.RUNNING_ON_TRAVIS:
# Beginning Dec 1 2017, ares started returning ip6-localhost
# instead of localhost
add(Test127001, '127.0.0.1')
class TestBroadcast(TestCase):
......
......@@ -307,7 +307,7 @@ class ThreadTests(unittest.TestCase):
del ctypes # pyflakes fix
import subprocess
rc = subprocess.call([sys.executable, "-c", """if 1:
rc = subprocess.call([sys.executable, "-W", "ignore", "-c", """if 1:
%s
import ctypes, sys, time
try:
......@@ -343,7 +343,7 @@ class ThreadTests(unittest.TestCase):
# Issue 1722344
# Raising SystemExit skipped threading._shutdown
import subprocess
p = subprocess.Popen([sys.executable, "-c", """if 1:
p = subprocess.Popen([sys.executable, "-W", "ignore", "-c", """if 1:
%s
import threading
from time import sleep
......@@ -432,7 +432,7 @@ class ThreadJoinOnShutdown(unittest.TestCase):
\n""" % setup_3 + script
import subprocess
p = subprocess.Popen([sys.executable, "-c", script], stdout=subprocess.PIPE)
p = subprocess.Popen([sys.executable, "-W", "ignore", "-c", script], stdout=subprocess.PIPE)
rc = p.wait()
data = p.stdout.read().replace(b'\r', b'')
self.assertEqual(data, b"end of main\nend of thread\n")
......
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