Steve Piercy
2018-04-12 a794d04bbdad962c944340a10a14a574babe1c7c
Merge pull request #3254 from stevepiercy/1.9-branch

Change "key" to "name" to align with webob change
2 files modified
10 ■■■■ changed files
docs/narr/webob.rst 4 ●●●● patch | view | raw | blame | history
pyramid/interfaces.py 6 ●●●● patch | view | raw | blame | history
docs/narr/webob.rst
@@ -406,13 +406,13 @@
    ``response.text``. ``response.content_type_params`` is a dictionary of all
    the parameters.
``response.set_cookie(key, value, max_age=None, path='/', ...)``
``response.set_cookie(name, value, max_age=None, path='/', ...)``
    Set a cookie.  The keyword arguments control the various cookie parameters.
    The ``max_age`` argument is the length for the cookie to live in seconds
    (you may also use a timedelta object).  The ``Expires`` key will also be
    set based on the value of ``max_age``.
``response.delete_cookie(key, path='/', domain=None)``
``response.delete_cookie(name, path='/', domain=None)``
    Delete a cookie from the client.  This sets ``max_age`` to 0 and the cookie
    value to ``''``.
pyramid/interfaces.py
@@ -180,7 +180,7 @@
        """Gets and sets and deletes the Date header. For more information on
        Date see RFC 2616 section 14.18. Converts using HTTP date.""")
    def delete_cookie(key, path='/', domain=None):
    def delete_cookie(name, path='/', domain=None):
        """ Delete a cookie from the client. Note that path and domain must
        match how the cookie was originally set.  This sets the cookie to the
        empty string, and max_age=0 so that it should expire immediately. """
@@ -244,7 +244,7 @@
        """ Gets and sets and deletes the Server header. For more information
        on Server see RFC216 section 14.38. """)
    def set_cookie(key, value='', max_age=None, path='/', domain=None,
    def set_cookie(name, value='', max_age=None, path='/', domain=None,
                   secure=False, httponly=False, comment=None, expires=None,
                   overwrite=False):
        """ Set (add) a cookie for the response """
@@ -259,7 +259,7 @@
        """ Get/set the unicode value of the body (using the charset of
        the Content-Type)""")
    def unset_cookie(key, strict=True):
    def unset_cookie(name, strict=True):
        """ Unset a cookie with the given name (remove it from the
        response)."""