Commit 0a45f740 authored by Jason Madden's avatar Jason Madden

Fix false detection in test__all__.

parent 5c5d2bc6
......@@ -198,9 +198,12 @@ jobs:
# We only need to do this on one version, and it should be Python 3, because
# pylint has stopped updating for Python 2.
- stage: test
# We need pylint, since above we're not installing a requirements file
# We need pylint, since above we're not installing a
# requirements file. Code added to _ssl3.SSLContext for Python
# 3.8 triggers an infinite recursion bug in pylint 2.3.1/astroid 2.2.5
# unless we disable inference.
install: pip install pylint
script: python -m pylint --rcfile=.pylintrc gevent
script: python -m pylint --limit-inference-results=1 --rcfile=.pylintrc gevent
env: TRAVIS_PYTHON_VERSION=3.7
name: lint37
......
......@@ -70,24 +70,6 @@ if PY3 and not sys.platform.startswith('win32'):
__implements__.append("_posixsubprocess")
_posixsubprocess = None
if PY38:
# Using os.posix_spawn() to start subprocesses
# bypasses our child watchers on certain operating systems,
# and with certain library versions. Possibly the right
# fix is to monkey-patch os.posix_spawn like we do os.fork?
# These have no effect, they're just here to match the stdlib.
# TODO: When available, given a monkey patch on them, I think
# we ought to be able to use them if the stdlib has identified them
# as suitable.
__implements__.extend([
'_use_posix_spawn',
'_USE_POSIX_SPAWN'
])
def _use_posix_spawn():
return False
_USE_POSIX_SPAWN = False
# Some symbols we define that we expect to export;
# useful for static analysis
......@@ -183,6 +165,33 @@ if PY37:
'CREATE_BREAKAWAY_FROM_JOB'
])
if PY38:
# Using os.posix_spawn() to start subprocesses
# bypasses our child watchers on certain operating systems,
# and with certain library versions. Possibly the right
# fix is to monkey-patch os.posix_spawn like we do os.fork?
# These have no effect, they're just here to match the stdlib.
# TODO: When available, given a monkey patch on them, I think
# we ought to be able to use them if the stdlib has identified them
# as suitable.
__implements__.extend([
'_use_posix_spawn',
])
def _use_posix_spawn():
return False
_USE_POSIX_SPAWN = False
if __subprocess__._USE_POSIX_SPAWN:
__implements__.extend([
'_USE_POSIX_SPAWN',
])
else:
__imports__.extend([
'_USE_POSIX_SPAWN',
])
actually_imported = copy_globals(__subprocess__, globals(),
only_names=__imports__,
ignore_missing_names=True)
......
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