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
0f0c0969
Commit
0f0c0969
authored
Mar 10, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup __init__.py
parent
64132014
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
gevent/__init__.py
gevent/__init__.py
+13
-9
No files found.
gevent/__init__.py
View file @
0f0c0969
...
...
@@ -43,13 +43,16 @@ __all__ = ['get_hub',
import
sys
if
sys
.
platform
==
'win32'
:
import
socket
# trigger WSAStartup call
# trigger WSAStartup call
import
socket
# pylint:disable=unused-import
del
socket
from
gevent.hub
import
get_hub
,
iwait
,
wait
,
PYPY
from
gevent.greenlet
import
Greenlet
,
joinall
,
killall
joinall
=
joinall
# export for pylint
spawn
=
Greenlet
.
spawn
spawn_later
=
Greenlet
.
spawn_later
from
gevent.timeout
import
Timeout
,
with_timeout
from
gevent.hub
import
getcurrent
,
GreenletExit
,
spawn_raw
,
sleep
,
idle
,
kill
,
reinit
try
:
...
...
@@ -78,18 +81,18 @@ from gevent import signal as _signal_module
class
_signal_metaclass
(
type
):
def
__getattr__
(
self
,
name
):
def
__getattr__
(
cls
,
name
):
return
getattr
(
_signal_module
,
name
)
def
__setattr__
(
self
,
name
,
value
):
def
__setattr__
(
cls
,
name
,
value
):
# Because we can't know whether to try to go to the module
# or the class, we don't allow setting an attribute after the fact
raise
TypeError
(
"Cannot set attribute"
)
def
__instancecheck__
(
self
,
instance
):
def
__instancecheck__
(
cls
,
instance
):
return
isinstance
(
instance
,
_signal_class
)
def
__dir__
(
self
):
def
__dir__
(
cls
):
return
dir
(
_signal_module
)
...
...
@@ -97,7 +100,7 @@ class signal(object):
__doc__
=
_signal_module
.
__doc__
def
__new__
(
self
,
*
args
,
**
kwargs
):
def
__new__
(
cls
,
*
args
,
**
kwargs
):
return
_signal_class
(
*
args
,
**
kwargs
)
...
...
@@ -116,11 +119,11 @@ del sys
# the following makes hidden imports visible to freezing tools like
# py2exe. see https://github.com/gevent/gevent/issues/181
def
__dependencies_for_freezing
():
from
gevent
import
core
,
resolver_thread
,
resolver_ares
,
socket
,
\
from
gevent
import
core
,
resolver_thread
,
resolver_ares
,
socket
as
_socket
,
\
threadpool
,
thread
,
threading
,
select
,
subprocess
import
pprint
import
traceback
import
signal
import
signal
as
_signal
del
__dependencies_for_freezing
...
...
@@ -131,5 +134,6 @@ if PYPY:
# DistutilsModuleError (on OS X) depending on who first imports and inits
# the hub. See https://github.com/gevent/gevent/issues/619 (There
# is no automated test for this.)
from
gevent.core
import
loop
# XXX: As of 1.1, which prebuilds at install time, this is probably pointless
from
gevent.core
import
loop
# pylint:disable=no-name-in-module
del
loop
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