Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6a10e02a
Commit
6a10e02a
authored
Aug 08, 2007
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch wsgiref to io.{StringIO,BytesIO}. This shuts up the test failures.
(I'm not sure about it actually working though.)
parent
0269b910
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
Lib/test/test_wsgiref.py
Lib/test/test_wsgiref.py
+3
-3
Lib/wsgiref/simple_server.py
Lib/wsgiref/simple_server.py
+1
-1
Lib/wsgiref/util.py
Lib/wsgiref/util.py
+1
-1
No files found.
Lib/test/test_wsgiref.py
View file @
6a10e02a
...
...
@@ -7,7 +7,7 @@ from wsgiref import util
from
wsgiref.validate
import
validator
from
wsgiref.simple_server
import
WSGIServer
,
WSGIRequestHandler
,
demo_app
from
wsgiref.simple_server
import
make_server
from
StringIO
import
String
IO
from
io
import
StringIO
,
Bytes
IO
from
SocketServer
import
BaseServer
import
re
,
sys
...
...
@@ -47,9 +47,9 @@ def hello_app(environ,start_response):
])
return
[
"Hello, world!"
]
def
run_amock
(
app
=
hello_app
,
data
=
"GET / HTTP/1.0
\
n
\
n
"
):
def
run_amock
(
app
=
hello_app
,
data
=
b
"GET / HTTP/1.0
\
n
\
n
"
):
server
=
make_server
(
""
,
80
,
app
,
MockServer
,
MockHandler
)
inp
,
out
,
err
,
olderr
=
String
IO
(
data
),
StringIO
(),
StringIO
(),
sys
.
stderr
inp
,
out
,
err
,
olderr
=
Bytes
IO
(
data
),
StringIO
(),
StringIO
(),
sys
.
stderr
sys
.
stderr
=
err
try
:
...
...
Lib/wsgiref/simple_server.py
View file @
6a10e02a
...
...
@@ -163,7 +163,7 @@ class WSGIRequestHandler(BaseHTTPRequestHandler):
def
demo_app
(
environ
,
start_response
):
from
StringIO
import
StringIO
from
io
import
StringIO
stdout
=
StringIO
()
print
(
"Hello world!"
,
file
=
stdout
)
print
(
file
=
stdout
)
...
...
Lib/wsgiref/util.py
View file @
6a10e02a
...
...
@@ -149,7 +149,7 @@ def setup_testing_defaults(environ):
environ
.
setdefault
(
'wsgi.multithread'
,
0
)
environ
.
setdefault
(
'wsgi.multiprocess'
,
0
)
from
StringIO
import
StringIO
from
io
import
StringIO
environ
.
setdefault
(
'wsgi.input'
,
StringIO
(
""
))
environ
.
setdefault
(
'wsgi.errors'
,
StringIO
())
environ
.
setdefault
(
'wsgi.url_scheme'
,
guess_scheme
(
environ
))
...
...
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