Skip to content

Commit

Permalink
Fix doc warnings and errors. Includes a import fix to handle py2. (#1030
Browse files Browse the repository at this point in the history
)

* Fix doc warnings and errors. Includes a import fix to handle py2.

* Really fix one last doc warning.

* Backout the change to iter(iterator).next. In some light testing with Python 3.5.2 I could not trigger any errors using LintMiddleware so the code may be suitable for 2 and 3.
  • Loading branch information
romeojulietthotel authored and untitaker committed Nov 8, 2016
1 parent 3d37d17 commit 109dad4
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -210,5 +210,5 @@
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
'http://docs.python.org/dev': None,
'http://www.sqlalchemy.org/docs/05': None
'http://docs.sqlalchemy.org/en/latest/': None
}
2 changes: 2 additions & 0 deletions docs/contrib/lint.rst
Expand Up @@ -2,6 +2,8 @@
Lint Validation Middleware
==========================

.. currentmodule:: werkzeug.contrib.lint

.. automodule:: werkzeug.contrib.lint

.. autoclass:: LintMiddleware
5 changes: 3 additions & 2 deletions docs/debug.rst
Expand Up @@ -81,8 +81,9 @@ Pasting Errors
==============

If you click on the `Traceback` title, the traceback switches over to a text
based one. The text based one can be pasted to `gist.github.com`_ with one
based one. The text based one can be pasted to `gist.github.com <https://gist.github.com>`_ with one
click.


.. _paste.pocoo.org: https://gist.github.com/
.. _paste.pocoo.org: https://gist.github.com

6 changes: 5 additions & 1 deletion werkzeug/contrib/lint.py
Expand Up @@ -19,7 +19,11 @@
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from urlparse import urlparse
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse

from warnings import warn

from werkzeug.datastructures import Headers
Expand Down
5 changes: 3 additions & 2 deletions werkzeug/wsgi.py
Expand Up @@ -902,6 +902,9 @@ def make_line_iter(stream, limit=None, buffer_size=10 * 1024,
.. versionadded:: 0.9
added support for iterators as input stream.
.. versionadded:: 0.11.10
added support for the `cap_at_buffer` parameter.
:param stream: the stream or iterate to iterate over.
:param limit: the limit in bytes for the stream. (Usually
content length. Not necessary if the `stream`
Expand All @@ -911,8 +914,6 @@ def make_line_iter(stream, limit=None, buffer_size=10 * 1024,
than the buffer size. Internally this is implemented
that the buffer size might be exhausted by a factor
of two however.
.. versionadded:: 0.11.10
added support for the `cap_at_buffer` parameter.
"""
_iter = _make_chunk_iter(stream, limit, buffer_size)

Expand Down

0 comments on commit 109dad4

Please sign in to comment.