summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2018-04-17 15:34:32 -0400
committerChris McDonough <chrism@plope.com>2018-04-17 15:34:32 -0400
commitf9c30f5009ccbea2d17c4109e838862b41531623 (patch)
tree32cc537b6a367d82f19f865676d2f3d6beb6cdd1
parentbf59bd87ce2d8dc35f9585087623528bb58363a3 (diff)
parenta851d05f76edc6bc6bf65269c20eeba7fe726ade (diff)
downloadpyramid-f9c30f5009ccbea2d17c4109e838862b41531623.tar.gz
pyramid-f9c30f5009ccbea2d17c4109e838862b41531623.tar.bz2
pyramid-f9c30f5009ccbea2d17c4109e838862b41531623.zip
Merge branch 'master' of github.com:Pylons/pyramid
-rw-r--r--docs/narr/webob.rst4
-rw-r--r--pyramid/interfaces.py6
-rw-r--r--pyramid/session.py10
3 files changed, 10 insertions, 10 deletions
diff --git a/docs/narr/webob.rst b/docs/narr/webob.rst
index 406351562..4efe783b0 100644
--- a/docs/narr/webob.rst
+++ b/docs/narr/webob.rst
@@ -406,13 +406,13 @@ Here are some highlights:
``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 ``''``.
diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py
index e9cc007ac..bedfb60b3 100644
--- a/pyramid/interfaces.py
+++ b/pyramid/interfaces.py
@@ -180,7 +180,7 @@ class IResponse(Interface):
"""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 @@ class IResponse(Interface):
""" 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 @@ class IResponse(Interface):
""" 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)."""
diff --git a/pyramid/session.py b/pyramid/session.py
index 33119343b..4a9c8c100 100644
--- a/pyramid/session.py
+++ b/pyramid/session.py
@@ -141,7 +141,7 @@ def BaseCookieSessionFactory(
):
"""
.. versionadded:: 1.5
-
+
Configure a :term:`session factory` which will provide cookie-based
sessions. The return value of this function is a :term:`session factory`,
which may be provided as the ``session_factory`` argument of a
@@ -393,7 +393,7 @@ def UnencryptedCookieSessionFactoryConfig(
compatible with cookies generated using
``UnencryptedCookieSessionFactory``, so existing user session data
will be destroyed if you switch to it.
-
+
Configure a :term:`session factory` which will provide unencrypted
(but signed) cookie-based sessions. The return value of this
function is a :term:`session factory`, which may be provided as
@@ -452,7 +452,7 @@ def UnencryptedCookieSessionFactoryConfig(
class SerializerWrapper(object):
def __init__(self, secret):
self.secret = secret
-
+
def loads(self, bstruct):
return signed_deserialize(bstruct, secret)
@@ -500,7 +500,7 @@ def SignedCookieSessionFactory(
):
"""
.. versionadded:: 1.5
-
+
Configure a :term:`session factory` which will provide signed
cookie-based sessions. The return value of this
function is a :term:`session factory`, which may be provided as
@@ -519,7 +519,7 @@ def SignedCookieSessionFactory(
``secret``
A string which is used to sign the cookie. The secret should be at
least as long as the block size of the selected hash algorithm. For
- ``sha512`` this would mean a 128 bit (64 character) secret. It should
+ ``sha512`` this would mean a 512 bit (64 character) secret. It should
be unique within the set of secret values provided to Pyramid for
its various subsystems (see :ref:`admonishment_against_secret_sharing`).