[docs] [issue36345] Deprecate Tools/scripts/serve.py in favour of python -m http.server -d

Berker Peksag report at bugs.python.org
Tue Apr 30 16:41:36 EDT 2019


Berker Peksag <berker.peksag at gmail.com> added the comment:

Please revert 360e1e4c519cfc139de707bcdd1e6c871eec79ee. It's not a good example to put into the documentation.

It uses different naming convention. It would only confuse users relatively new to the wsgiref module and WSGI protocol.

FileWrapper was supposed to support __getitem__ and __iter__ protocols for compatibility with older Python versions, but its __getiem__ implementation is buggy and is already deprecated. It has no use case in modern Python code.

It has zero exception handling and will return a cryptic traceback if mimetype cannot detect type of the file.

The examples in the wsgiref documentation already cover most of the cases. There is no need to add more similar ones.

----------
nosy: +berker.peksag

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36345>
_______________________________________


More information about the docs mailing list