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
05d319c4
Commit
05d319c4
authored
Dec 09, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kill trailing whitespace
parent
5e86f916
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
20 additions
and
21 deletions
+20
-21
examples/webchat/templates/index.html
examples/webchat/templates/index.html
+1
-1
examples/webchat/urls.py
examples/webchat/urls.py
+1
-1
gevent/backdoor.py
gevent/backdoor.py
+1
-1
gevent/event.py
gevent/event.py
+1
-1
gevent/http.py
gevent/http.py
+1
-2
gevent/hub.py
gevent/hub.py
+1
-1
gevent/pool.py
gevent/pool.py
+2
-2
gevent/pywsgi.py
gevent/pywsgi.py
+4
-4
greentest/clean_db.py
greentest/clean_db.py
+1
-1
greentest/test__greenlet.py
greentest/test__greenlet.py
+1
-1
greentest/test__http.py
greentest/test__http.py
+4
-4
greentest/test__pool.py
greentest/test__pool.py
+1
-1
greentest/test__socket_ssl.py
greentest/test__socket_ssl.py
+1
-1
No files found.
examples/webchat/templates/index.html
View file @
05d319c4
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<meta
http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
/>
<title>
Chat Demo
</title>
<link
rel=
"stylesheet"
href=
"{{ MEDIA_URL }}chat.css"
type=
"text/css"
/>
</head>
...
...
examples/webchat/urls.py
View file @
05d319c4
...
...
@@ -7,7 +7,7 @@ urlpatterns = patterns('webchat.chat.views',
(
'^a/message/updates$'
,
'message_updates'
))
urlpatterns
+=
patterns
(
'django.views.static'
,
(
r'^%s(?P<path>.*)$'
%
settings
.
MEDIA_URL
.
lstrip
(
'/'
),
(
r'^%s(?P<path>.*)$'
%
settings
.
MEDIA_URL
.
lstrip
(
'/'
),
'serve'
,
{
'document_root'
:
settings
.
MEDIA_ROOT
,
'show_indexes'
:
True
}))
...
...
gevent/backdoor.py
View file @
05d319c4
...
...
@@ -120,7 +120,7 @@ def backdoor((conn, addr), locals=None):
class
_fileobject
(
socket
.
_fileobject
):
def
write
(
self
,
data
):
self
.
_sock
.
sendall
(
data
)
...
...
gevent/event.py
View file @
05d319c4
...
...
@@ -117,7 +117,7 @@ class AsyncResult(object):
Like :class:`Event` it wakes up all the waiters when :meth:`set` or :meth:`set_exception` method
is called. Waiters may receive the passed value or exception by calling :meth:`get`
method instead of :meth:`wait`. An :class:`AsyncResult` instance cannot be reset.
To pass a value call :meth:`set`. Calls to :meth:`get` (those that currently blocking as well as
those made in the future) will return the value:
...
...
gevent/http.py
View file @
05d319c4
...
...
@@ -102,11 +102,10 @@ class HTTPServer(object):
requests
=
self
.
_requests
.
get
(
request
.
connection
.
_obj
)
if
requests
is
not
None
:
requests
.
remove
(
request
)
def
_cb_request
(
self
,
request
):
try
:
spawn
=
self
.
spawn
# we're setting the callback here anyway, because
request
.
connection
.
set_closecb
(
self
)
self
.
_requests
.
setdefault
(
request
.
connection
.
_obj
,
[]).
append
(
request
)
if
spawn
is
None
:
...
...
gevent/hub.py
View file @
05d319c4
...
...
@@ -188,7 +188,7 @@ class Hub(greenlet):
class
DispatchExit
(
Exception
):
def
__init__
(
self
,
code
):
self
.
code
=
code
Exception
.
__init__
(
self
,
code
)
...
...
gevent/pool.py
View file @
05d319c4
...
...
@@ -10,7 +10,7 @@ __all__ = ['GreenletSet', 'Pool']
class
GreenletSet
(
object
):
"""Maintain a set of greenlets that are still running.
Links to each item and removes it upon notification.
"""
greenlet_class
=
Greenlet
...
...
@@ -164,7 +164,7 @@ class GreenletSet(object):
g
.
rawlink
(
q
.
put
)
for
_
in
xrange
(
len
(
greenlets
)):
yield
q
.
get
().
get
()
def
full
(
self
):
return
False
...
...
gevent/pywsgi.py
View file @
05d319c4
...
...
@@ -131,7 +131,7 @@ class Input(object):
class
HttpProtocol
(
BaseHTTPServer
.
BaseHTTPRequestHandler
):
protocol_version
=
'HTTP/1.1'
minimum_chunk_size
=
MINIMUM_CHUNK_SIZE
def
handle_one_request
(
self
):
if
self
.
server
.
max_http_version
:
self
.
protocol_version
=
self
.
server
.
max_http_version
...
...
@@ -381,10 +381,10 @@ class Server(BaseHTTPServer.HTTPServer):
self
.
log
.
write
(
message
+
'
\
n
'
)
def
server
(
sock
,
site
,
log
=
None
,
environ
=
None
,
max_size
=
None
,
max_http_version
=
DEFAULT_MAX_HTTP_VERSION
,
def
server
(
sock
,
site
,
log
=
None
,
environ
=
None
,
max_size
=
None
,
max_http_version
=
DEFAULT_MAX_HTTP_VERSION
,
protocol
=
HttpProtocol
,
minimum_chunk_size
=
None
):
serv
=
Server
(
sock
,
sock
.
getsockname
(),
site
,
log
,
environ
=
None
,
max_http_version
=
max_http_version
,
protocol
=
protocol
,
serv
=
Server
(
sock
,
sock
.
getsockname
(),
site
,
log
,
environ
=
None
,
max_http_version
=
max_http_version
,
protocol
=
protocol
,
minimum_chunk_size
=
minimum_chunk_size
)
if
max_size
is
None
:
max_size
=
DEFAULT_MAX_SIMULTANEOUS_REQUESTS
...
...
greentest/clean_db.py
View file @
05d319c4
...
...
@@ -8,4 +8,4 @@ if __name__=='__main__':
c
.
execute
(
'delete from testresult where changeset glob "*+"'
)
c
.
commit
()
greentest/test__greenlet.py
View file @
05d319c4
...
...
@@ -151,7 +151,7 @@ class TestUnlink(greentest.TestCase):
assert
len
(
p
.
_links
)
==
1
,
p
.
_links
p
.
unlink
(
getcurrent
())
assert
not
p
.
_links
,
p
.
_links
g
=
gevent
.
Greenlet
()
link
(
g
)
assert
len
(
p
.
_links
)
==
1
,
p
.
_links
...
...
greentest/test__http.py
View file @
05d319c4
...
...
@@ -40,7 +40,7 @@ class BoundTestCase(greentest.TestCase):
self
.
check_refused
()
def
print_netstat
(
self
,
comment
=
''
):
cmd
=
'sudo netstat -anp | grep %s'
%
self
.
port
cmd
=
'sudo netstat -anp | grep %s'
%
self
.
port
print
cmd
,
' # %s'
%
comment
os
.
system
(
cmd
)
...
...
@@ -157,14 +157,14 @@ class TestSendReplyLater(BoundTestCase):
# class TestSendReplyStartChunk(BoundTestCase):
# spawn = True
#
#
# def handle(self, r):
# r.send_reply_start(200, 'OK')
# gevent.sleep(0.2)
# print 'handler sending chunk'
# r.send_reply_chunk('hi')
# print 'handler done'
#
#
# def test(self):
# response = urlopen(self.url)
# print 'connected to %s' % self.url
...
...
@@ -179,7 +179,7 @@ class TestSendReplyLater(BoundTestCase):
# print 123
# gevent.sleep(0.5)
# print 1234
#
#
# def test_client_closes(self):
# s = self.connect()
# s.sendall('GET / HTTP/1.0\r\n\r\n')
...
...
greentest/test__pool.py
View file @
05d319c4
...
...
@@ -142,7 +142,7 @@ class PoolBasicTests(greentest.TestCase):
result
=
p
.
apply
(
lambda
a
:
(
'foo'
,
a
),
(
1
,
))
self
.
assertEqual
(
result
,
(
'foo'
,
1
))
#
#
# tests from standard library test/test_multiprocessing.py
class
TimingWrapper
(
object
):
...
...
greentest/test__socket_ssl.py
View file @
05d319c4
...
...
@@ -14,4 +14,4 @@ class AmazonHTTPSTests(unittest.TestCase):
if
__name__
==
"__main__"
:
unittest
.
main
()
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