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
dfcec573
Commit
dfcec573
authored
Jun 19, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix test__all__.py
parent
659c1f65
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
52 additions
and
11 deletions
+52
-11
gevent/_socket3.py
gevent/_socket3.py
+4
-1
gevent/_socketcommon.py
gevent/_socketcommon.py
+11
-1
gevent/_ssl3.py
gevent/_ssl3.py
+3
-1
gevent/subprocess.py
gevent/subprocess.py
+4
-0
gevent/thread.py
gevent/thread.py
+12
-0
gevent/threading.py
gevent/threading.py
+6
-0
greentest/test__all__.py
greentest/test__all__.py
+1
-1
greentest/test__monkey.py
greentest/test__monkey.py
+3
-1
greentest/test_issue112.py
greentest/test_issue112.py
+8
-5
known_failures.py
known_failures.py
+0
-1
No files found.
gevent/_socket3.py
View file @
dfcec573
...
...
@@ -36,6 +36,9 @@ class _wrefsocket(_socket.socket):
__slots__
=
[
"__weakref__"
,]
_closedsocket
=
_wrefsocket
()
_closedsocket
.
close
()
class
socket
(
object
):
def
__init__
(
self
,
family
=
AF_INET
,
type
=
SOCK_STREAM
,
proto
=
0
,
fileno
=
None
):
...
...
@@ -198,7 +201,7 @@ class socket(object):
self
.
hub
.
cancel_wait
(
self
.
_read_event
,
cancel_wait_ex
)
self
.
hub
.
cancel_wait
(
self
.
_write_event
,
cancel_wait_ex
)
_ss
.
close
(
self
.
_sock
)
self
.
_sock
=
None
self
.
_sock
=
_closedsocket
def
close
(
self
):
# This function should not reference any globals. See Python issue #808164.
...
...
gevent/_socketcommon.py
View file @
dfcec573
...
...
@@ -42,7 +42,17 @@ __imports__ = ['error',
'getdefaulttimeout'
,
'setdefaulttimeout'
,
# Windows:
'errorTab'
]
'errorTab'
,
# Python 3
'AddressFamily'
,
'SocketKind'
,
'CMSG_LEN'
,
'CMSG_SPACE'
,
'dup'
,
'if_indextoname'
,
'if_nameindex'
,
'if_nametoindex'
,
'sethostname'
]
import
sys
...
...
gevent/_ssl3.py
View file @
dfcec573
...
...
@@ -22,6 +22,7 @@ __implements__ = ['SSLContext',
'wrap_socket'
,
'get_server_certificate'
]
__imports__
=
[]
for
name
in
dir
(
__ssl__
):
if
name
in
__implements__
:
...
...
@@ -30,10 +31,11 @@ for name in dir(__ssl__):
continue
value
=
getattr
(
__ssl__
,
name
)
globals
()[
name
]
=
value
__imports__
.
append
(
name
)
del
name
,
value
__all__
=
__implements__
+
__imports__
orig_SSLContext
=
__ssl__
.
SSLContext
...
...
gevent/subprocess.py
View file @
dfcec573
...
...
@@ -56,6 +56,10 @@ __extra__ = ['MAXFD',
'INFINITE'
,
'TerminateProcess'
]
if
sys
.
version_info
[:
2
]
>=
(
3
,
3
):
__imports__
+=
[
'DEVNULL'
,
'getstatusoutput'
,
'getoutput'
]
for
name
in
__imports__
[:]:
try
:
...
...
gevent/thread.py
View file @
dfcec573
...
...
@@ -23,6 +23,12 @@ if sys.version_info[0] <= 2:
else
:
import
_thread
as
__thread__
__target__
=
'_thread'
__imports__
+=
[
'RLock'
,
'TIMEOUT_MAX'
,
'allocate'
,
'exit_thread'
,
'interrupt_main'
,
'start_new'
]
error
=
__thread__
.
error
from
gevent.hub
import
getcurrent
,
GreenletExit
from
gevent.greenlet
import
Greenlet
...
...
@@ -63,6 +69,12 @@ if hasattr(__thread__, 'stack_size'):
else
:
__implements__
.
remove
(
'stack_size'
)
for
name
in
__imports__
[:]:
try
:
value
=
getattr
(
__thread__
,
name
)
globals
()[
name
]
=
value
except
AttributeError
:
__imports__
.
remove
(
name
)
__all__
=
__implements__
+
__imports__
__all__
.
remove
(
'_local'
)
...
...
gevent/threading.py
View file @
dfcec573
...
...
@@ -85,3 +85,9 @@ if sys.version_info[:2] >= (3, 4):
raise
NotImplementedError
()
__implements__
.
append
(
'Thread'
)
if
sys
.
version_info
[:
2
]
>=
(
3
,
3
):
__implements__
.
remove
(
'_get_ident'
)
__implements__
.
append
(
'get_ident'
)
get_ident
=
_get_ident
__implements__
.
remove
(
'_sleep'
)
greentest/test__all__.py
View file @
dfcec573
...
...
@@ -11,7 +11,7 @@ MAPPING = {'gevent.local': '_threading_local',
'gevent.socket'
:
'socket'
,
'gevent.select'
:
'select'
,
'gevent.ssl'
:
'ssl'
,
'gevent.thread'
:
'thread'
,
'gevent.thread'
:
'
_thread'
if
six
.
PY3
else
'
thread'
,
'gevent.subprocess'
:
'subprocess'
,
'gevent.os'
:
'os'
,
'gevent.threading'
:
'threading'
}
...
...
greentest/test__monkey.py
View file @
dfcec573
from
gevent
import
monkey
monkey
.
patch_all
()
import
sys
import
time
assert
'built-in'
not
in
repr
(
time
.
sleep
),
repr
(
time
.
sleep
)
...
...
@@ -11,7 +12,8 @@ except ImportError:
import
threading
assert
'built-in'
not
in
repr
(
thread
.
start_new_thread
),
repr
(
thread
.
start_new_thread
)
assert
'built-in'
not
in
repr
(
threading
.
_start_new_thread
),
repr
(
threading
.
_start_new_thread
)
assert
'built-in'
not
in
repr
(
threading
.
_sleep
),
repr
(
threading
.
_sleep
)
if
sys
.
version_info
[
0
]
==
2
:
assert
'built-in'
not
in
repr
(
threading
.
_sleep
),
repr
(
threading
.
_sleep
)
import
socket
from
gevent
import
socket
as
gevent_socket
...
...
greentest/test_issue112.py
View file @
dfcec573
import
threading
import
gevent.monkey
gevent
.
monkey
.
patch_all
()
import
gevent
import
sys
if
sys
.
version_info
[
0
]
==
2
:
import
threading
import
gevent.monkey
gevent
.
monkey
.
patch_all
()
import
gevent
assert
threading
.
_sleep
is
gevent
.
sleep
,
threading
.
_sleep
assert
threading
.
_sleep
is
gevent
.
sleep
,
threading
.
_sleep
known_failures.py
View file @
dfcec573
...
...
@@ -81,7 +81,6 @@ if PYPY:
if
PY3
:
# No idea / TODO
FAILING_TESTS
+=
'''
test__all__.py
test__pywsgi.py
test__makefile_ref.py
FLAKY test__socket_dns.py
...
...
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