Skip to content

Commit

Permalink
clean up references to unused werkzeug modules in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bwhmather committed Aug 12, 2015
1 parent 3a8942f commit 7d2e432
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 41 deletions.
4 changes: 2 additions & 2 deletions verktyg/exception_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class ExceptionHandler(ExceptionHandlerFactory, Representation):
`action`
The action to perform if the handler is matched.
Function accepting `(application, request, exception)` and returning
a werkzeug response object.
a verktyg response object.
"""
def __init__(self, exception_class, action, **kwargs):

Expand Down Expand Up @@ -91,7 +91,7 @@ def lookup(self, exception_class,
:return:
A callable object accepting am application object, a request, and
an exception and returning a werkzeug response
an exception and returning a verktyg response
"""
# Use the method resolution order of the exception to rank handlers
for cls in exception_class.mro():
Expand Down
22 changes: 11 additions & 11 deletions verktyg/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -1272,7 +1272,7 @@ def __repr__(self):

def parse_set_header(value, on_update=None):
"""Parse a set-like header and return a
:class:`~werkzeug.datastructures.HeaderSet` object:
:class:`~HeaderSet` object:
>>> hs = parse_set_header('token, "quoted value"')
Expand All @@ -1293,9 +1293,9 @@ def parse_set_header(value, on_update=None):
A set header to be parsed.
:param on_update:
An optional callable that is called every time a value on the
:class:`~werkzeug.datastructures.HeaderSet` object is changed.
:class:`~HeaderSet` object is changed.
:return:
A:class:`~werkzeug.datastructures.HeaderSet`
A:class:`~HeaderSet`
"""
if not value:
return HeaderSet(None, on_update)
Expand Down Expand Up @@ -1537,15 +1537,15 @@ def _set_stale(self, value):

def parse_www_authenticate_header(value, on_update=None):
"""Parse an HTTP WWW-Authenticate header into a
:class:`~werkzeug.datastructures.WWWAuthenticate` object.
:class:`~WWWAuthenticate` object.
:param value:
A WWW-Authenticate header to parse.
:param on_update:
An optional callable that is called every time a value on the
:class:`~werkzeug.datastructures.WWWAuthenticate` object is changed.
:class:`~WWWAuthenticate` object is changed.
:return:
A:class:`~werkzeug.datastructures.WWWAuthenticate` object.
A:class:`~WWWAuthenticate` object.
"""
if not value:
return WWWAuthenticate(on_update=on_update)
Expand Down Expand Up @@ -1588,7 +1588,7 @@ def __repr__(self):

def parse_if_range_header(value):
"""Parses an if-range header which can be an etag or a date. Returns
a :class:`~werkzeug.datastructures.IfRange` object.
a :class:`~IfRange` object.
"""
if not value:
return IfRange()
Expand Down Expand Up @@ -1653,7 +1653,7 @@ def __repr__(self):


def parse_range_header(value, make_inclusive=True):
"""Parses a range header into a :class:`~werkzeug.datastructures.Range`
"""Parses a range header into a :class:`~Range`
object. If the header is missing or malformed `None` is returned.
`ranges` is a list of ``(start, stop)`` tuples where the ranges are
non-inclusive.
Expand Down Expand Up @@ -1770,14 +1770,14 @@ def __repr__(self):

def parse_content_range_header(value, on_update=None):
"""Parses a range header into a
:class:`~werkzeug.datastructures.ContentRange` object or `None` if
:class:`~ContentRange` object or `None` if
parsing is not possible.
:param value:
A content range header to be parsed.
:param on_update:
An optional callable that is called every time a value on the
:class:`~werkzeug.datastructures.ContentRange` object is changed.
:class:`~ContentRange` object is changed.
"""
if value is None:
return None
Expand Down Expand Up @@ -1941,7 +1941,7 @@ def parse_etags(value):
:param value:
The tag header to parse
:return:
An :class:`~werkzeug.datastructures.ETags` object.
An :class:`~ETags` object.
"""
if not value:
return ETags()
Expand Down
44 changes: 22 additions & 22 deletions verktyg/requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,22 +118,22 @@ class Request(BaseRequest, ETagRequestMixin):
max_form_memory_size = None

#: the class to use for `args` and `form`. The default is an
#: :class:`~werkzeug.datastructures.ImmutableMultiDict` which supports
#: :class:`~verktyg.datastructures.ImmutableMultiDict` which supports
#: multiple values per key. alternatively it makes sense to use an
#: :class:`~werkzeug.datastructures.ImmutableOrderedMultiDict` which
#: preserves order or a :class:`~werkzeug.datastructures.ImmutableDict`
#: :class:`~verktyg.datastructures.ImmutableOrderedMultiDict` which
#: preserves order or a :class:`~verktyg.datastructures.ImmutableDict`
#: which is the fastest but only remembers the last key. It is also
#: possible to use mutable structures, but this is not recommended.
parameter_storage_class = ImmutableMultiDict

#: the type to be used for list values from the incoming WSGI environment.
#: By default an :class:`~werkzeug.datastructures.ImmutableList` is used
#: By default an :class:`~verktyg.datastructures.ImmutableList` is used
#: (for example for :attr:`access_list`).
list_storage_class = ImmutableList

#: the type to be used for dict values from the incoming WSGI environment.
#: By default an
#: :class:`~werkzeug.datastructures.ImmutableTypeConversionDict` is used
#: :class:`~verktyg.datastructures.ImmutableTypeConversionDict` is used
#: (for example for :attr:`cookies`).
dict_storage_class = ImmutableTypeConversionDict

Expand Down Expand Up @@ -345,7 +345,7 @@ def stream(self):
@cached_property
def args(self):
"""The parsed URL parameters. By default an
:class:`~werkzeug.datastructures.ImmutableMultiDict`
:class:`~verktyg.datastructures.ImmutableMultiDict`
is returned from this function. This can be changed by setting
:attr:`parameter_storage_class` to a different type. This might
be necessary if the order of the form data is important.
Expand Down Expand Up @@ -391,7 +391,7 @@ def get_data(self, cache=True, as_text=False, parse_form_data=False):
@cached_property
def form(self):
"""The form parameters. By default an
:class:`~werkzeug.datastructures.ImmutableMultiDict`
:class:`~verktyg.datastructures.ImmutableMultiDict`
is returned from this function. This can be changed by setting
:attr:`parameter_storage_class` to a different type. This might
be necessary if the order of the form data is important.
Expand All @@ -411,17 +411,17 @@ def values(self):

@cached_property
def files(self):
""":class:`~werkzeug.datastructures.MultiDict` object containing
""":class:`~verktyg.datastructures.MultiDict` object containing
all uploaded files. Each key in :attr:`files` is the name from the
``<input type="file" name="">``. Each value in :attr:`files` is a
Werkzeug :class:`~werkzeug.datastructures.FileStorage` object.
Werkzeug :class:`~verktyg.http.FileStorage` object.
Note that :attr:`files` will only contain data if the request method
was POST, PUT or PATCH and the ``<form>`` that posted to the request
had ``enctype="multipart/form-data"``. It will be empty otherwise.
See the :class:`~werkzeug.datastructures.MultiDict` /
:class:`~werkzeug.datastructures.FileStorage` documentation for
See the :class:`~verktyg.datastructures.MultiDict` /
:class:`~verktyg.http.FileStorage` documentation for
more details about the used data structure.
"""
self._load_form_data()
Expand All @@ -437,7 +437,7 @@ def cookies(self):
@cached_property
def headers(self):
"""The headers from the WSGI environ as immutable
:class:`~werkzeug.datastructures.EnvironHeaders`.
:class:`~verktyg.wsgi.EnvironHeaders`.
"""
return EnvironHeaders(self.environ)

Expand Down Expand Up @@ -562,21 +562,21 @@ class AcceptMixin(object):

"""A mixin for classes with an :attr:`~BaseRequest.environ` attribute
to get all the HTTP accept headers as
:class:`~werkzeug.datastructures.Accept` objects (or subclasses
:class:`~verktyg.http.Accept` objects (or subclasses
thereof).
"""

@cached_property
def accept_mimetypes(self):
"""List of mimetypes this client supports as
:class:`~werkzeug.datastructures.MIMEAccept` object.
:class:`~verktyg.http.MIMEAccept` object.
"""
return parse_accept_header(self.environ.get('HTTP_ACCEPT'), MIMEAccept)

@cached_property
def accept_charsets(self):
"""List of charsets this client supports as
:class:`~werkzeug.datastructures.CharsetAccept` object.
:class:`~verktyg.http.CharsetAccept` object.
"""
return parse_accept_header(self.environ.get('HTTP_ACCEPT_CHARSET'),
CharsetAccept)
Expand All @@ -592,7 +592,7 @@ def accept_encodings(self):
@cached_property
def accept_languages(self):
"""List of languages this client accepts as
:class:`~werkzeug.datastructures.LanguageAccept` object.
:class:`~verktyg.http.LanguageAccept` object.
"""
return parse_accept_header(self.environ.get('HTTP_ACCEPT_LANGUAGE'),
LanguageAccept)
Expand All @@ -607,7 +607,7 @@ class ETagRequestMixin(object):

@cached_property
def cache_control(self):
"""A :class:`~werkzeug.datastructures.RequestCacheControl` object
"""A :class:`~verktyg.http.RequestCacheControl` object
for the incoming cache control headers.
"""
cache_control = self.environ.get('HTTP_CACHE_CONTROL')
Expand All @@ -618,15 +618,15 @@ def cache_control(self):
def if_match(self):
"""An object containing all the etags in the `If-Match` header.
:rtype: :class:`~werkzeug.datastructures.ETags`
:rtype: :class:`~verktyg.http.ETags`
"""
return parse_etags(self.environ.get('HTTP_IF_MATCH'))

@cached_property
def if_none_match(self):
"""An object containing all the etags in the `If-None-Match` header.
:rtype: :class:`~werkzeug.datastructures.ETags`
:rtype: :class:`~verktyg.http.ETags`
"""
return parse_etags(self.environ.get('HTTP_IF_NONE_MATCH'))

Expand All @@ -644,15 +644,15 @@ def if_unmodified_since(self):
def if_range(self):
"""The parsed `If-Range` header.
:rtype: :class:`~werkzeug.datastructures.IfRange`
:rtype: :class:`~verktyg.http.IfRange`
"""
return parse_if_range_header(self.environ.get('HTTP_IF_RANGE'))

@cached_property
def range(self):
"""The parsed `Range` header.
:rtype: :class:`~werkzeug.datastructures.Range`
:rtype: :class:`~verktyg.http.Range`
"""
return parse_range_header(self.environ.get('HTTP_RANGE'))

Expand All @@ -675,7 +675,7 @@ class AuthorizationMixin(object):

"""Adds an :attr:`authorization` property that represents the parsed
value of the `Authorization` header as
:class:`~werkzeug.datastructures.Authorization` object.
:class:`~verktyg.http.Authorization` object.
"""

@cached_property
Expand Down
11 changes: 5 additions & 6 deletions verktyg/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ def application(environ, start_response):
Response can be any kind of iterable or string. If it's a string it's
considered being an iterable with one item which is the string passed.
Headers can be a list of tuples or a
:class:`~werkzeug.datastructures.Headers` object.
Headers can be a list of tuples or a :class:`~verktyg.http.Headers` object.
Special note for `mimetype` and `content_type`: For most mime types
`mimetype` and `content_type` work the same, the difference affects
Expand All @@ -126,7 +125,7 @@ def application(environ, start_response):
:param response: a string or response iterable.
:param status: a string with a status or an integer with the status code.
:param headers: a list of headers or a
:class:`~werkzeug.datastructures.Headers` object.
:class:`~verktyg.http.Headers` object.
:param mimetype: the mimetype for the request. See notice above.
:param content_type: the content type for the request. See notice above.
:param direct_passthrough: if set to `True` :meth:`iter_encoded` is not
Expand Down Expand Up @@ -479,7 +478,7 @@ def get_wsgi_headers(self, environ):
to zero here for certain status codes.
:param environ: the WSGI environment of the request.
:return: returns a new :class:`~werkzeug.datastructures.Headers`
:return: returns a new :class:`~verktyg.http.Headers`
object.
"""
headers = Headers(self.headers)
Expand Down Expand Up @@ -618,7 +617,7 @@ class ETagResponseMixin(object):
"""Adds extra functionality to a response object for etag and cache
handling. This mixin requires an object with at least a `headers`
object that implements a dict like interface similar to
:class:`~werkzeug.datastructures.Headers`.
:class:`~verktyg.http.Headers`.
If you want the :meth:`freeze` method to automatically add an etag, you
have to mixin this method before the response base class. The default
Expand Down Expand Up @@ -732,7 +731,7 @@ def _set_content_range(self, value):
self.headers['Content-Range'] = value.to_header()
content_range = property(_get_content_range, _set_content_range, doc='''
The `Content-Range` header as
:class:`~werkzeug.datastructures.ContentRange` object. Even if the
:class:`~verktyg.http.ContentRange` object. Even if the
header is not set it wil provide such an object for easier
manipulation.''')
del _get_content_range, _set_content_range
Expand Down

0 comments on commit 7d2e432

Please sign in to comment.