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
2240f483
Commit
2240f483
authored
May 31, 2015
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PEP8 cleanup.
parent
955dbc61
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
14 additions
and
8 deletions
+14
-8
.pep8
.pep8
+1
-1
gevent/_socket2.py
gevent/_socket2.py
+1
-0
gevent/baseserver.py
gevent/baseserver.py
+1
-0
gevent/corecffi.py
gevent/corecffi.py
+2
-0
gevent/threading.py
gevent/threading.py
+1
-1
greentest/test___example_servers.py
greentest/test___example_servers.py
+1
-0
greentest/test__ares_host_result.py
greentest/test__ares_host_result.py
+1
-2
greentest/test__greenlet.py
greentest/test__greenlet.py
+2
-0
greentest/test__pywsgi.py
greentest/test__pywsgi.py
+0
-1
greentest/test__refcount.py
greentest/test__refcount.py
+1
-0
greentest/test__server.py
greentest/test__server.py
+1
-0
greentest/test__socket_dns.py
greentest/test__socket_dns.py
+2
-3
No files found.
.pep8
View file @
2240f483
[pep8]
[pep8]
ignore=E702,E265,E402,E731,E266,E261
ignore=E702,E265,E402,E731,E266,E261
,W503
max_line_length=160
max_line_length=160
exclude=.tox,.git,build,2.6,2.7,2.7pypy,3.3,test_support.py,test_queue.py,patched_tests_setup.py,test_threading_2.py,lock_tests.py,_sslgte279.py
exclude=.tox,.git,build,2.6,2.7,2.7pypy,3.3,test_support.py,test_queue.py,patched_tests_setup.py,test_threading_2.py,lock_tests.py,_sslgte279.py
gevent/_socket2.py
View file @
2240f483
...
@@ -398,6 +398,7 @@ else:
...
@@ -398,6 +398,7 @@ else:
if
hasattr
(
__socket__
,
'ssl'
):
if
hasattr
(
__socket__
,
'ssl'
):
from
gevent.hub
import
PYGTE279
from
gevent.hub
import
PYGTE279
def
ssl
(
sock
,
keyfile
=
None
,
certfile
=
None
):
def
ssl
(
sock
,
keyfile
=
None
,
certfile
=
None
):
# deprecated in 2.7.9 but still present
# deprecated in 2.7.9 but still present
if
PYGTE279
:
if
PYGTE279
:
...
...
gevent/baseserver.py
View file @
2240f483
...
@@ -127,6 +127,7 @@ class BaseServer(object):
...
@@ -127,6 +127,7 @@ class BaseServer(object):
def
do_handle
(
self
,
*
args
):
def
do_handle
(
self
,
*
args
):
spawn
=
self
.
_spawn
spawn
=
self
.
_spawn
handle
=
self
.
_handle
handle
=
self
.
_handle
def
_close_when_done
(
*
args
):
def
_close_when_done
(
*
args
):
try
:
try
:
return
handle
(
*
args
)
return
handle
(
*
args
)
...
...
gevent/corecffi.py
View file @
2240f483
...
@@ -1058,6 +1058,7 @@ class child(watcher):
...
@@ -1058,6 +1058,7 @@ class child(watcher):
def
rstatus
(
self
,
value
):
def
rstatus
(
self
,
value
):
self
.
_watcher
.
rstatus
=
value
self
.
_watcher
.
rstatus
=
value
class
stat
(
watcher
):
class
stat
(
watcher
):
_watcher_start
=
libev
.
ev_stat_start
_watcher_start
=
libev
.
ev_stat_start
_watcher_stop
=
libev
.
ev_stat_stop
_watcher_stop
=
libev
.
ev_stat_stop
...
@@ -1106,6 +1107,7 @@ class stat(watcher):
...
@@ -1106,6 +1107,7 @@ class stat(watcher):
def
interval
(
self
):
def
interval
(
self
):
return
self
.
_watcher
.
interval
return
self
.
_watcher
.
interval
def
_syserr_cb
(
msg
):
def
_syserr_cb
(
msg
):
try
:
try
:
msg
=
ffi
.
string
(
msg
)
msg
=
ffi
.
string
(
msg
)
...
...
gevent/threading.py
View file @
2240f483
...
@@ -41,7 +41,7 @@ if PYPY:
...
@@ -41,7 +41,7 @@ if PYPY:
# otherwise we get a new DummyThread, which cannot be joined.
# otherwise we get a new DummyThread, which cannot be joined.
# Fixes tests in test_threading_2
# Fixes tests in test_threading_2
if
_get_ident
()
not
in
__threading__
.
_active
and
len
(
__threading__
.
_active
)
==
1
:
if
_get_ident
()
not
in
__threading__
.
_active
and
len
(
__threading__
.
_active
)
==
1
:
k
,
v
=
__threading__
.
_active
.
items
()[
0
]
k
,
v
=
__threading__
.
_active
.
items
()[
0
]
del
__threading__
.
_active
[
k
]
del
__threading__
.
_active
[
k
]
__threading__
.
_active
[
_get_ident
()]
=
v
__threading__
.
_active
[
_get_ident
()]
=
v
...
...
greentest/test___example_servers.py
View file @
2240f483
...
@@ -10,6 +10,7 @@ import util
...
@@ -10,6 +10,7 @@ import util
import
ssl
import
ssl
class
Test_wsgiserver
(
util
.
TestServer
):
class
Test_wsgiserver
(
util
.
TestServer
):
server
=
'wsgiserver.py'
server
=
'wsgiserver.py'
URL
=
'http://127.0.0.1:8088'
URL
=
'http://127.0.0.1:8088'
...
...
greentest/test__ares_host_result.py
View file @
2240f483
...
@@ -10,7 +10,6 @@ except ImportError as ex:
...
@@ -10,7 +10,6 @@ except ImportError as ex:
sys
.
exit
(
0
)
sys
.
exit
(
0
)
class
TestPickle
(
greentest
.
TestCase
):
class
TestPickle
(
greentest
.
TestCase
):
# Issue 104: ares.ares_host_result unpickleable
# Issue 104: ares.ares_host_result unpickleable
...
@@ -24,7 +23,7 @@ class TestPickle(greentest.TestCase):
...
@@ -24,7 +23,7 @@ class TestPickle(greentest.TestCase):
for
i
in
range
(
0
,
pickle
.
HIGHEST_PROTOCOL
):
for
i
in
range
(
0
,
pickle
.
HIGHEST_PROTOCOL
):
def
make_test
(
j
):
def
make_test
(
j
):
return
lambda
self
:
self
.
_test
(
j
)
return
lambda
self
:
self
.
_test
(
j
)
setattr
(
TestPickle
,
'test'
+
str
(
i
),
make_test
(
i
)
)
setattr
(
TestPickle
,
'test'
+
str
(
i
),
make_test
(
i
))
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
...
...
greentest/test__greenlet.py
View file @
2240f483
...
@@ -266,6 +266,7 @@ class TestStuff(greentest.TestCase):
...
@@ -266,6 +266,7 @@ class TestStuff(greentest.TestCase):
self
.
assertEqual
(
e
.
get
(),
1
)
self
.
assertEqual
(
e
.
get
(),
1
)
def
test_wait_error
(
self
):
def
test_wait_error
(
self
):
def
x
():
def
x
():
sleep
(
DELAY
)
sleep
(
DELAY
)
return
1
return
1
...
@@ -293,6 +294,7 @@ class TestStuff(greentest.TestCase):
...
@@ -293,6 +294,7 @@ class TestStuff(greentest.TestCase):
# works.
# works.
def
raises_but_ignored
():
def
raises_but_ignored
():
raise
ExpectedError
(
"count"
)
raise
ExpectedError
(
"count"
)
def
sleep_forever
():
def
sleep_forever
():
while
True
:
while
True
:
sleep
(
0.1
)
sleep
(
0.1
)
...
...
greentest/test__pywsgi.py
View file @
2240f483
...
@@ -1000,7 +1000,6 @@ class ChunkedInputTests(TestCase):
...
@@ -1000,7 +1000,6 @@ class ChunkedInputTests(TestCase):
self
.
assert_error
(
IOError
,
'unexpected end of file while parsing chunked data'
)
self
.
assert_error
(
IOError
,
'unexpected end of file while parsing chunked data'
)
class
Expect100ContinueTests
(
TestCase
):
class
Expect100ContinueTests
(
TestCase
):
validator
=
None
validator
=
None
...
...
greentest/test__refcount.py
View file @
2240f483
...
@@ -25,6 +25,7 @@ are not leaked by the hub.
...
@@ -25,6 +25,7 @@ are not leaked by the hub.
from
__future__
import
print_function
from
__future__
import
print_function
from
_socket
import
socket
from
_socket
import
socket
class
Socket
(
socket
):
class
Socket
(
socket
):
"Something we can have a weakref to"
"Something we can have a weakref to"
...
...
greentest/test__server.py
View file @
2240f483
...
@@ -33,6 +33,7 @@ class SimpleStreamServer(StreamServer):
...
@@ -33,6 +33,7 @@ class SimpleStreamServer(StreamServer):
finally
:
finally
:
fd
.
close
()
fd
.
close
()
class
Settings
:
class
Settings
:
ServerClass
=
StreamServer
ServerClass
=
StreamServer
ServerSubClass
=
SimpleStreamServer
ServerSubClass
=
SimpleStreamServer
...
...
greentest/test__socket_dns.py
View file @
2240f483
...
@@ -105,7 +105,7 @@ def compare_relaxed(a, b):
...
@@ -105,7 +105,7 @@ def compare_relaxed(a, b):
a_segments
=
a
.
count
(
':'
)
a_segments
=
a
.
count
(
':'
)
b_segments
=
b
.
count
(
':'
)
b_segments
=
b
.
count
(
':'
)
if
a_segments
and
b_segments
:
if
a_segments
and
b_segments
:
if
a_segments
==
b_segments
and
a_segments
in
(
4
,
5
,
6
,
7
):
if
a_segments
==
b_segments
and
a_segments
in
(
4
,
5
,
6
,
7
):
return
True
return
True
if
a
.
rstrip
(
':'
).
startswith
(
b
.
rstrip
(
':'
))
or
b
.
rstrip
(
':'
).
startswith
(
a
.
rstrip
(
':'
)):
if
a
.
rstrip
(
':'
).
startswith
(
b
.
rstrip
(
':'
))
or
b
.
rstrip
(
':'
).
startswith
(
a
.
rstrip
(
':'
)):
return
True
return
True
...
@@ -245,8 +245,7 @@ class TestCase(greentest.TestCase):
...
@@ -245,8 +245,7 @@ class TestCase(greentest.TestCase):
# because it calls assertSequenceEqual, which highlights the exact
# because it calls assertSequenceEqual, which highlights the exact
# difference in the tuple
# difference in the tuple
msg = format_call(func, args)
msg = format_call(func, args)
self.assertEqual((msg,gevent_result), (msg,real_result))
self.assertEqual((msg, gevent_result), (msg, real_result))
class TestTypeError(TestCase):
class TestTypeError(TestCase):
...
...
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