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
8128847f
Commit
8128847f
authored
Mar 21, 2019
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Lint.
parent
88433c29
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
25 deletions
+14
-25
src/gevent/_ssl2.py
src/gevent/_ssl2.py
+3
-6
src/gevent/_ssl3.py
src/gevent/_ssl3.py
+4
-7
src/gevent/_sslgte279.py
src/gevent/_sslgte279.py
+3
-5
src/gevent/resolver/__init__.py
src/gevent/resolver/__init__.py
+1
-2
src/gevent/tests/test__pywsgi.py
src/gevent/tests/test__pywsgi.py
+2
-3
src/gevent/tests/test__refcount.py
src/gevent/tests/test__refcount.py
+1
-2
No files found.
src/gevent/_ssl2.py
View file @
8128847f
...
...
@@ -200,8 +200,7 @@ class SSLSocket(socket):
if
self
.
_sslobj
:
raise
ValueError
(
"sendto not allowed on instances of %s"
%
self
.
__class__
)
else
:
return
socket
.
sendto
(
self
,
*
args
)
return
socket
.
sendto
(
self
,
*
args
)
def
recv
(
self
,
buflen
=
1024
,
flags
=
0
):
if
self
.
_sslobj
:
...
...
@@ -245,15 +244,13 @@ class SSLSocket(socket):
if
self
.
_sslobj
:
raise
ValueError
(
"recvfrom not allowed on instances of %s"
%
self
.
__class__
)
else
:
return
socket
.
recvfrom
(
self
,
*
args
)
return
socket
.
recvfrom
(
self
,
*
args
)
def
recvfrom_into
(
self
,
*
args
):
if
self
.
_sslobj
:
raise
ValueError
(
"recvfrom_into not allowed on instances of %s"
%
self
.
__class__
)
else
:
return
socket
.
recvfrom_into
(
self
,
*
args
)
return
socket
.
recvfrom_into
(
self
,
*
args
)
def
pending
(
self
):
if
self
.
_sslobj
:
...
...
src/gevent/_ssl3.py
View file @
8128847f
...
...
@@ -450,10 +450,9 @@ class SSLSocket(socket):
if
self
.
_sslobj
:
raise
ValueError
(
"sendto not allowed on instances of %s"
%
self
.
__class__
)
el
if
addr
is
None
:
if
addr
is
None
:
return
socket
.
sendto
(
self
,
data
,
flags_or_addr
)
else
:
return
socket
.
sendto
(
self
,
data
,
flags_or_addr
,
addr
)
return
socket
.
sendto
(
self
,
data
,
flags_or_addr
,
addr
)
def
sendmsg
(
self
,
*
args
,
**
kwargs
):
# Ensure programs don't send data unencrypted if they try to
...
...
@@ -508,16 +507,14 @@ class SSLSocket(socket):
if
self
.
_sslobj
:
raise
ValueError
(
"recvfrom not allowed on instances of %s"
%
self
.
__class__
)
else
:
return
socket
.
recvfrom
(
self
,
buflen
,
flags
)
return
socket
.
recvfrom
(
self
,
buflen
,
flags
)
def
recvfrom_into
(
self
,
buffer
,
nbytes
=
None
,
flags
=
0
):
self
.
_checkClosed
()
if
self
.
_sslobj
:
raise
ValueError
(
"recvfrom_into not allowed on instances of %s"
%
self
.
__class__
)
else
:
return
socket
.
recvfrom_into
(
self
,
buffer
,
nbytes
,
flags
)
return
socket
.
recvfrom_into
(
self
,
buffer
,
nbytes
,
flags
)
def
recvmsg
(
self
,
*
args
,
**
kwargs
):
raise
NotImplementedError
(
"recvmsg not allowed on instances of %s"
%
...
...
src/gevent/_sslgte279.py
View file @
8128847f
...
...
@@ -420,10 +420,9 @@ class SSLSocket(socket):
if
self
.
_sslobj
:
raise
ValueError
(
"sendto not allowed on instances of %s"
%
self
.
__class__
)
el
if
addr
is
None
:
if
addr
is
None
:
return
socket
.
sendto
(
self
,
data
,
flags_or_addr
)
else
:
return
socket
.
sendto
(
self
,
data
,
flags_or_addr
,
addr
)
return
socket
.
sendto
(
self
,
data
,
flags_or_addr
,
addr
)
def
sendmsg
(
self
,
*
args
,
**
kwargs
):
# Ensure programs don't send data unencrypted if they try to
...
...
@@ -485,8 +484,7 @@ class SSLSocket(socket):
if
self
.
_sslobj
:
raise
ValueError
(
"recvfrom_into not allowed on instances of %s"
%
self
.
__class__
)
else
:
return
socket
.
recvfrom_into
(
self
,
buffer
,
nbytes
,
flags
)
return
socket
.
recvfrom_into
(
self
,
buffer
,
nbytes
,
flags
)
def
recvmsg
(
self
,
*
args
,
**
kwargs
):
raise
NotImplementedError
(
"recvmsg not allowed on instances of %s"
%
...
...
src/gevent/resolver/__init__.py
View file @
8128847f
...
...
@@ -50,8 +50,7 @@ def _lookup_port(port, socktype):
except
error
as
ex
:
if
'not found'
in
str
(
ex
):
raise
gaierror
(
EAI_SERVICE
,
'Servname not supported for ai_socktype'
)
else
:
raise
gaierror
(
str
(
ex
))
raise
gaierror
(
str
(
ex
))
except
UnicodeEncodeError
:
raise
error
(
'Int or String expected'
,
port
)
elif
port
is
None
:
...
...
src/gevent/tests/test__pywsgi.py
View file @
8128847f
...
...
@@ -1464,7 +1464,7 @@ class Handler(pywsgi.WSGIHandler):
def
read_requestline
(
self
):
data
=
self
.
rfile
.
read
(
7
)
if
data
[
0
]
==
b'<'
[
0
]:
if
data
[
0
]
==
b'<'
[
0
]:
# py3: indexing bytes returns ints. sigh.
# Returning nothing stops handle_one_request()
# Note that closing or even deleting self.socket() here
# can lead to the read side throwing Connection Reset By Peer,
...
...
@@ -1475,8 +1475,7 @@ class Handler(pywsgi.WSGIHandler):
else
:
self
.
log_error
(
'Invalid request: %r'
,
data
)
return
None
else
:
return
data
+
self
.
rfile
.
readline
()
return
data
+
self
.
rfile
.
readline
()
class
TestHandlerSubclass
(
TestCase
):
...
...
src/gevent/tests/test__refcount.py
View file @
8128847f
...
...
@@ -75,8 +75,7 @@ def handle_request(s, raise_on_timeout):
except
socket
.
timeout
:
if
raise_on_timeout
:
raise
else
:
return
return
#print('handle_request - accepted')
res
=
conn
.
recv
(
100
)
assert
res
==
b'hello'
,
repr
(
res
)
...
...
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