[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-07 Thread R. David Murray

Changes by R. David Murray :


--
resolution:  -> not a bug

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann

Nils Lindemann added the comment:

ok

--
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann

Nils Lindemann added the comment:

I am not sure if the py package i found on PyPi is what you meant, but if you 
mean the py launcher (the py.exe in the windows dir), yes, i have that.

My system was indeed misconfigured as you correctly guessed, i had the .py 
filetype pointing to a Python version 3.5. I have now uninstalled everything, 
manually cleaned up the registry, reinstalled Python 3.6 and now everything 
works. Sorry, my mistake.

--
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread R. David Murray

R. David Murray added the comment:

It gets installed along with python3, I believe.  If you google for 'python py' 
you should see the pypi package version in the top hits.

--
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann

Nils Lindemann added the comment:

What would that be? If i google 'py helper command' i get no good results.

--
resolution: not a bug -> 
status: closed -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread R. David Murray

R. David Murray added the comment:

If you just type 'server.py' it will use whichever interpreter is associated 
with .py files, which might not be python3.  You may want to learn about the 
'py' helper command.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann

Nils Lindemann added the comment:

I just found out that the example works in idle and if i do in a console:

python server.py

but not if i do just:

server.py

What is the secret behind this?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann

Nils Lindemann added the comment:

I tried a few online python 3 interpreters.

These give the same exception:

http://www.learnpython.org/en/Hello%2C_World%21
http://rextester.com/l/python3_online_compiler
http://ideone.com/pIMilt
http://www.tutorialspoint.com/execute_python3_online.php

And this one worked:

https://repl.it/languages/python3

the example i tried was:

from wsgiref.simple_server import make_server, demo_app
with make_server('', 8000, demo_app) as httpd:
print("Serving HTTP on port 8000...")
httpd.serve_forever()

My Python installation is a default x64 installation. No changes were made 
during installation, except installation path, which has no spaces in it. I 
have no third part modules installed which could interfer. I have also a Python 
2.7 installed but it is not on my path.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread R. David Murray

R. David Murray added the comment:

Either that or you aren't really running the make_server from 
wsgiref.simple_server.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread R. David Murray

R. David Murray added the comment:

something is wrong in your setup then.  I suspect you have a mismatch between 
the python version you think you are running the one you are actually running, 
and/or which library code it is accessing.

--
nosy: +r.david.murray

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30580] WSGI examples raise AttributeError: __exit__

2017-06-06 Thread Nils Lindemann

New submission from Nils Lindemann:

All examples on

https://docs.python.org/3/library/wsgiref.html

raise this exception:

Traceback (most recent call last):
  File "C:\Code\test\server.py", line 110, in 
with make_server('', 8000, simple_app) as httpd:
AttributeError: __exit__

Tested with

Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit 
(AMD64)] on win32

--
messages: 295253
nosy: Nils-Hero
priority: normal
severity: normal
status: open
title: WSGI examples raise AttributeError: __exit__
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com