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
8bddde23
Commit
8bddde23
authored
Aug 06, 2012
by
Geert Jansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving to absolute imports.
This patch prepares for the addition of a "gevent.os" module.
parent
ac04312a
Changes
15
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
31 additions
and
16 deletions
+31
-16
gevent/__init__.py
gevent/__init__.py
+3
-1
gevent/_util.pyx
gevent/_util.pyx
+2
-1
gevent/core.ppyx
gevent/core.ppyx
+2
-1
gevent/fileobject.py
gevent/fileobject.py
+1
-0
gevent/hub.py
gevent/hub.py
+4
-3
gevent/monkey.py
gevent/monkey.py
+1
-0
gevent/queue.py
gevent/queue.py
+3
-2
gevent/resolver_ares.py
gevent/resolver_ares.py
+1
-0
gevent/select.py
gevent/select.py
+2
-1
gevent/socket.py
gevent/socket.py
+3
-1
gevent/ssl.py
gevent/ssl.py
+2
-1
gevent/subprocess.py
gevent/subprocess.py
+2
-1
gevent/thread.py
gevent/thread.py
+3
-3
gevent/threadpool.py
gevent/threadpool.py
+1
-1
gevent/win32util.py
gevent/win32util.py
+1
-0
No files found.
gevent/__init__.py
View file @
8bddde23
...
...
@@ -6,6 +6,8 @@ to provide a high-level synchronous API on top of libev event loop.
See http://www.gevent.org/ for the documentation.
"""
from
__future__
import
absolute_import
version_info
=
(
1
,
0
,
0
,
'dev'
,
None
)
__version__
=
'1.0dev'
...
...
@@ -32,7 +34,7 @@ __all__ = ['get_hub',
import
sys
if
sys
.
platform
==
'win32'
:
__import__
(
'socket'
)
# trigger WSAStartup call
import
socket
# trigger WSAStartup call
del
sys
...
...
gevent/_util.pyx
View file @
8bddde23
from
python
cimport
*
import
os
# Work around lack of absolute_import in Cython.
os
=
__import__
(
'os'
,
level
=
0
)
__all__
=
[
'set_exc_info'
]
...
...
gevent/core.ppyx
View file @
8bddde23
...
...
@@ -3,7 +3,8 @@ cimport cython
cimport libev
from python cimport *
import sys
import os
# Work around lack of absolute_import in Cython
os = __import__('os', level=0)
import traceback
import signal as signalmodule
...
...
gevent/fileobject.py
View file @
8bddde23
from
__future__
import
absolute_import
import
sys
import
os
from
gevent.hub
import
get_hub
...
...
gevent/hub.py
View file @
8bddde23
# Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details.
from
__future__
import
absolute_import
import
sys
import
os
import
traceback
...
...
@@ -44,7 +45,7 @@ def __import_py_magic_greenlet():
pass
try
:
greenlet
=
__import__
(
'greenlet'
).
greenlet
from
greenlet
import
greenlet
except
ImportError
:
greenlet
=
__import_py_magic_greenlet
()
if
greenlet
is
None
:
...
...
@@ -63,9 +64,9 @@ if GreenletExit.__bases__[0] is Exception:
GreenletExit
.
__bases__
=
(
BaseException
,
)
if
sys
.
version_info
[
0
]
<=
2
:
thread
=
__import__
(
'thread'
)
import
thread
else
:
thread
=
__import__
(
'_thread'
)
import
_thread
as
thread
threadlocal
=
thread
.
_local
_threadlocal
=
threadlocal
()
_threadlocal
.
Hub
=
None
...
...
gevent/monkey.py
View file @
8bddde23
...
...
@@ -56,6 +56,7 @@ Monkey patches:
- thread-local storage becomes greenlet-local storage
"""
from
__future__
import
absolute_import
import
sys
__all__
=
[
'patch_all'
,
...
...
gevent/queue.py
View file @
8bddde23
...
...
@@ -20,14 +20,15 @@ means repeatedly calling :meth:`get <Queue.get>` until :meth:`get <Queue.get>` r
2
"""
from
__future__
import
absolute_import
import
sys
import
heapq
import
collections
if
sys
.
version_info
[
0
]
==
2
:
__queue__
=
__import__
(
'Queue'
)
import
Queue
as
__queue__
else
:
__queue__
=
__import__
(
'queue'
)
import
queue
as
__queue__
Full
=
__queue__
.
Full
Empty
=
__queue__
.
Empty
...
...
gevent/resolver_ares.py
View file @
8bddde23
# Copyright (c) 2011 Denis Bilenko. See LICENSE for details.
from
__future__
import
absolute_import
import
os
import
sys
from
_socket
import
getservbyname
,
getaddrinfo
,
gaierror
,
error
...
...
gevent/select.py
View file @
8bddde23
# Copyright (c) 2009-2011 Denis Bilenko. See LICENSE for details.
from
__future__
import
absolute_import
import
sys
from
gevent.timeout
import
Timeout
from
gevent.event
import
Event
...
...
@@ -7,7 +8,7 @@ from gevent.hub import get_hub
__implements__
=
[
'select'
]
__all__
=
[
'error'
]
+
__implements__
__select__
=
__import__
(
'select'
)
import
select
as
__select__
error
=
__select__
.
error
...
...
gevent/socket.py
View file @
8bddde23
...
...
@@ -31,6 +31,8 @@ For convenience, exceptions (like :class:`error <socket.error>` and :class:`time
as well as the constants from :mod:`socket` module are imported into this module.
"""
from
__future__
import
absolute_import
# standard functions and classes that this module re-implements in a gevent-aware way:
__implements__
=
[
'create_connection'
,
'socket'
,
...
...
@@ -111,7 +113,7 @@ except ImportError:
import
_socket
_realsocket
=
_socket
.
socket
__socket__
=
__import__
(
'socket'
)
import
socket
as
__socket__
_fileobject
=
__socket__
.
_fileobject
for
name
in
__imports__
[:]:
...
...
gevent/ssl.py
View file @
8bddde23
...
...
@@ -11,7 +11,8 @@ it requires `ssl package`_ to be installed.
.. _`ssl package`: http://pypi.python.org/pypi/ssl
"""
__ssl__
=
__import__
(
'ssl'
)
from
__future__
import
absolute_import
import
ssl
as
__ssl__
try
:
_ssl
=
__ssl__
.
_ssl
...
...
gevent/subprocess.py
View file @
8bddde23
from
__future__
import
absolute_import
import
sys
import
os
import
errno
...
...
@@ -10,7 +11,7 @@ from gevent.hub import get_hub
from
gevent.fileobject
import
FileObject
from
gevent.greenlet
import
Greenlet
,
joinall
spawn
=
Greenlet
.
spawn
__subprocess__
=
__import__
(
'subprocess'
)
import
subprocess
as
__subprocess__
# Standard functions and classes that this module re-implements in a gevent-aware way.
...
...
gevent/thread.py
View file @
8bddde23
...
...
@@ -6,6 +6,7 @@
used directly. For spawning greenlets in your applications, prefer
:class:`Greenlet` class.
"""
from
__future__
import
absolute_import
import
sys
__implements__
=
[
'allocate_lock'
,
...
...
@@ -18,10 +19,9 @@ __implements__ = ['allocate_lock',
__imports__
=
[
'error'
]
if
sys
.
version_info
[
0
]
<=
2
:
__target__
=
'thread'
import
thread
as
__thread__
else
:
__target__
=
'_thread'
__thread__
=
__import__
(
__target__
)
import
_thread
as
__thread__
error
=
__thread__
.
error
from
gevent.hub
import
getcurrent
,
GreenletExit
from
gevent.greenlet
import
Greenlet
...
...
gevent/threadpool.py
View file @
8bddde23
# Copyright (c) 2012 Denis Bilenko. See LICENSE for details.
from
__future__
import
with_statement
from
__future__
import
with_statement
,
absolute_import
import
sys
import
os
from
gevent.hub
import
get_hub
,
getcurrent
,
sleep
,
integer_types
...
...
gevent/win32util.py
View file @
8bddde23
...
...
@@ -23,6 +23,7 @@
The code is taken from twisted.python.win32 module.
"""
from
__future__
import
absolute_import
import
os
...
...
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