Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
d045dd23
Commit
d045dd23
authored
Nov 09, 2018
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some optional imports on windows.
parent
cb62504e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
src/gevent/testing/modules.py
src/gevent/testing/modules.py
+10
-4
No files found.
src/gevent/testing/modules.py
View file @
d045dd23
...
...
@@ -28,7 +28,12 @@ import gevent
from
.
import
sysinfo
OPTIONAL_MODULES
=
[
'resolver_ares'
]
OPTIONAL_MODULES
=
[
'gevent.resolver_ares'
,
'gevent.resolver.ares'
,
'gevent.libev'
,
'gevent.libev.watcher'
,
]
def
walk_modules
(
basedir
=
None
,
modpath
=
None
,
include_so
=
False
,
recursive
=
False
):
...
...
@@ -62,14 +67,15 @@ def walk_modules(basedir=None, modpath=None, include_so=False, recursive=False):
if
x
in
[
'__init__'
,
'core'
,
'ares'
,
'_util'
,
'_semaphore'
,
'corecffi'
,
'_corecffi'
,
'_corecffi_build'
]:
continue
if
x
in
OPTIONAL_MODULES
:
modname
=
modpath
+
x
if
modname
in
OPTIONAL_MODULES
:
try
:
with
warnings
.
catch_warnings
():
warnings
.
simplefilter
(
'ignore'
,
DeprecationWarning
)
importlib
.
import_module
(
mod
path
+
x
)
importlib
.
import_module
(
mod
name
)
except
ImportError
:
continue
yield
path
,
mod
path
+
x
yield
path
,
mod
name
elif
include_so
and
fn
.
endswith
(
sysinfo
.
SHARED_OBJECT_EXTENSION
):
if
'.pypy-'
in
fn
:
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment