[Python-modules-commits] [python-webob] 01/03: Import python-webob_1.6.0.orig.tar.gz
Barry Warsaw
barry at moszumanska.debian.org
Wed Apr 13 19:50:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
barry pushed a commit to branch master
in repository python-webob.
commit 718a2b94dfb55bcc946164444d7c48e3dd578d56
Author: Barry Warsaw <barry at python.org>
Date: Wed Apr 13 15:43:04 2016 -0400
Import python-webob_1.6.0.orig.tar.gz
---
.travis.yml | 27 +++++---
CHANGES.txt | 157 ++++++++++---------------------------------
HISTORY.txt | 131 ++++++++++++++++++++++++++++++++++++
MANIFEST.in | 6 --
PKG-INFO | 161 ++++++++++-----------------------------------
WebOb.egg-info/PKG-INFO | 161 ++++++++++-----------------------------------
WebOb.egg-info/SOURCES.txt | 3 +-
contributing.md | 111 +++++++++++++++++++++++++++++++
docs/do-it-yourself.txt | 10 +--
docs/index.txt | 7 +-
docs/whatsnew-1.5.txt | 20 ------
docs/whatsnew-1.6.txt | 67 +++++++++++++++++++
setup.cfg | 2 +-
setup.py | 8 +--
tests/test_acceptparse.py | 64 +++++++++++++++++-
tests/test_descriptors.py | 8 +++
tests/test_exc.py | 98 +++++++++++++++++++++++++++
tests/test_request.py | 27 ++++----
tests/test_response.py | 16 +++++
tox.ini | 16 ++---
webob/acceptparse.py | 85 ++++++++++++++----------
webob/descriptors.py | 3 +
webob/exc.py | 37 ++++++++++-
webob/request.py | 28 +-------
webob/response.py | 27 +++++---
25 files changed, 762 insertions(+), 518 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 4e29e7a..951ff57 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,15 +2,24 @@
language: python
sudo: false
-env:
- - TOXENV=py26
- - TOXENV=py27
- - TOXENV=py32
- - TOXENV=py33
- - TOXENV=py34
- - TOXENV=pypy
- - TOXENV=pypy3
- - TOXENV=py2-cover,py3-cover,coverage
+matrix:
+ include:
+ - python: 2.6
+ env: TOXENV=py26
+ - python: 2.7
+ env: TOXENV=py27
+ - python: 3.3
+ env: TOXENV=py33
+ - python: 3.4
+ env: TOXENV=py34
+ - python: 3.5
+ env: TOXENV=py35
+ - python: pypy
+ env: TOXENV=pypy
+ - python: pypy3
+ env: TOXENV=pypy3
+ - python: 3.5
+ env: TOXENV=py2-cover,py3-cover,coverage
install:
- travis_retry pip install tox
diff --git a/CHANGES.txt b/CHANGES.txt
index c28924f..1284c34 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,139 +1,50 @@
-1.5.1 (2015-10-30)
+1.6.0 (2016-03-15)
------------------
-Bug Fixes
-~~~~~~~~~
+Compatibility
+~~~~~~~~~~~~~
-- The exceptions HTTPNotAcceptable, HTTPUnsupportedMediaType and
- HTTPNotImplemented will now correctly use the sub-classed template rather
- than the default error template. See https://github.com/Pylons/webob/issues/221
+- Python 3.2 is no longer supported by WebOb
-- Response's from_file now correctly deals with a status line that contains an
- HTTP version identifier. HTTP/1.1 200 OK is now correctly parsed, whereas
- before this would raise an error upon setting the Response.status in
- from_file. See https://github.com/Pylons/webob/issues/121
+Bugfix
+~~~~~~
-1.5.0 (2015-10-11)
-------------------
-
-Bug Fixes
-~~~~~~~~~
-
-- The cookie API functions will now make sure that `max_age` is an integer or
- an string that can convert to an integer. Previously passing in
- max_age='test' would have silently done the wrong thing.
-
-1.5.0b0 (2015-09-06)
---------------------
+- Request.decode attempted to read from the an already consumed stream, it has
+ now been redirected to another stream to read from. See
+ https://github.com/Pylons/webob/pull/183
-Bug Fixes
-~~~~~~~~~
-
-- Unbreak req.POST when the request method is PATCH. Instead of returning
- something cmpletely unrelated we return NoVar. See:
- https://github.com/Pylons/webob/pull/215
+- The application/json media type does not allow for a charset as discovery of
+ the encoding is done at the JSON layer. Upon initialization of a Response
+ WebOb will no longer add a charset if the content-type is set to JSON. See
+ https://github.com/Pylons/webob/pull/197 and
+ https://github.com/Pylons/pyramid/issues/1611
Features
~~~~~~~~
-- HTTP Status Code 308 is now supported as a Permanent Redirect. See
- https://github.com/Pylons/webob/pull/207
-
-1.5.0a1 (2015-07-30)
---------------------
-
-Backwards Incompatibilities
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-- ``Response.set_cookie`` renamed the only required parameter from "key" to
- "name". The code will now still accept "key" as a keyword argument, and will
- issue a DeprecationWarning until WebOb 1.7.
-
-- The ``status`` attribute of a ``Response`` object no longer takes a string
- like ``None None`` and allows that to be set as the status. It now has to at
- least match the pattern of ``<integer status code> <explenation of status
- code>``. Invalid status strings will now raise a ``ValueError``.
-
-1.5.0a0 (2015-07-25)
---------------------
-
-Backwards Incompatibilities
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-- ``Morsel`` will no longer accept a cookie value that does not meet RFC6265's
- cookie-octet specification. Upon calling ``Morsel.serialize`` a warning will
- be issued, in the future this will raise a ``ValueError``, please update your
- cookie handling code. See https://github.com/Pylons/webob/pull/172
-
- The cookie-octet specification in RFC6265 states the following characters are
- valid in a cookie value:
-
- =============== =======================================
- Hex Range Actual Characters
- =============== =======================================
- ``[0x21 ]`` ``!``
- ``[0x25-0x2B]`` ``#$%&'()*+``
- ``[0x2D-0x3A]`` ``-./0123456789:``
- ``[0x3C-0x5B]`` ``<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[``
- ``[0x5D-0x7E]`` ``]^_`abcdefghijklmnopqrstuvwxyz{|}~``
- =============== =======================================
+- Lazily HTML escapes environment keys in HTTP Exceptions so that those keys in
+ the environ that are not used in the output of the page don't raise an
+ exception due to inability to be properly escaped. See
+ https://github.com/Pylons/webob/pull/139
- RFC6265 suggests using base 64 to serialize data before storing data in a
- cookie.
+- MIMEAccept now accepts comparisons against wildcards, this allows one to
+ match on just the media type or sub-type, without having to explicitly match
+ on both the media type and sub-type at the same time. See
+ https://github.com/Pylons/webob/pull/185
- Cookies that meet the RFC6265 standard will no longer be quoted, as this is
- unnecessary. This is a no-op as far as browsers and cookie storage is
- concerned.
+- Add the ability to return a JSON body from an exception. Using the Accept
+ information in the request, the exceptions will now automatically return a
+ JSON version of the exception instead of just HTML or text. See
+ https://github.com/Pylons/webob/pull/230 and
+ https://github.com/Pylons/webob/issues/209
-- ``Response.set_cookie`` now uses the internal ``make_cookie`` API, which will
- issue warnings if cookies are set with invalid bytes. See
- https://github.com/Pylons/webob/pull/172
-
-Features
+Security
~~~~~~~~
-- Add support for some new caching headers, stale-while-revalidate and
- stale-if-error that can be used by reverse proxies to cache stale responses
- temporarily if the backend disappears. From RFC5861. See
- https://github.com/Pylons/webob/pull/189
-
-Bug Fixes
-~~~~~~~~~
-
-- Response.status now uses duck-typing for integers, and has also learned to
- raise a ValueError if the status isn't an integer followed by a space, and
- then the reason. See https://github.com/Pylons/webob/pull/191
-
-- Fixed a bug in ``webob.multidict.GetDict`` which resulted in the
- QUERY_STRING not being updated when changes were made to query
- params using ``Request.GET.extend()``.
-
-- Read the body of a request if we think it might have a body. This fixes PATCH
- to support bodies. See https://github.com/Pylons/webob/pull/184
-
-- Response.from_file returns HTTP headers as latin1 rather than UTF-8, this
- fixes the usage on Google AppEngine. See
- https://github.com/Pylons/webob/issues/99 and
- https://github.com/Pylons/webob/pull/150
-
-- Fix a bug in parsing the auth parameters that contained bad white space. This
- makes the parsing fall in line with what's required in RFC7235. See
- https://github.com/Pylons/webob/issues/158
-
-- Use '\r\n' line endings in ``Response.__str__``. See:
- https://github.com/Pylons/webob/pull/146
-
-Documentation Changes
-~~~~~~~~~~~~~~~~~~~~~
-
-- ``response.set_cookie`` now has proper documentation for ``max_age`` and
- ``expires``. The code has also been refactored to use ``cookies.make_cookie``
- instead of duplicating the code. This fixes
- https://github.com/Pylons/webob/issues/166 and
- https://github.com/Pylons/webob/issues/171
-
-- Documentation didn't match the actual code for the wsgify function signature.
- See https://github.com/Pylons/webob/pull/167
+- exc._HTTPMove and any subclasses will now raise a ValueError if the location
+ field contains a line feed or carriage return. These values may lead to
+ possible HTTP Response Splitting. The header_getter descriptor has also been
+ modified to no longer accept headers with a line feed or carriage return.
+ See: https://github.com/Pylons/webob/pull/229 and
+ https://github.com/Pylons/webob/issues/217
-- Remove the WebDAV only from certain HTTP Exceptions, these exceptions may
- also be used by REST services for example.
diff --git a/HISTORY.txt b/HISTORY.txt
index a024188..59bd54e 100644
--- a/HISTORY.txt
+++ b/HISTORY.txt
@@ -1,3 +1,134 @@
+1.5.1 (2015-10-30)
+------------------
+
+Bug Fixes
+~~~~~~~~~
+
+- The exceptions HTTPNotAcceptable, HTTPUnsupportedMediaType and
+ HTTPNotImplemented will now correctly use the sub-classed template rather
+ than the default error template. See https://github.com/Pylons/webob/issues/221
+
+- Response's from_file now correctly deals with a status line that contains an
+ HTTP version identifier. HTTP/1.1 200 OK is now correctly parsed, whereas
+ before this would raise an error upon setting the Response.status in
+ from_file. See https://github.com/Pylons/webob/issues/121
+
+1.5.0 (2015-10-11)
+------------------
+
+Bug Fixes
+~~~~~~~~~
+
+- The cookie API functions will now make sure that `max_age` is an integer or
+ an string that can convert to an integer. Previously passing in
+ max_age='test' would have silently done the wrong thing.
+
+Features
+~~~~~~~~
+
+- Unbreak req.POST when the request method is PATCH. Instead of returning
+ something cmpletely unrelated we return NoVar. See:
+ https://github.com/Pylons/webob/pull/215
+
+- HTTP Status Code 308 is now supported as a Permanent Redirect. See
+ https://github.com/Pylons/webob/pull/207
+
+Backwards Incompatibilities
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``Response.set_cookie`` renamed the only required parameter from "key" to
+ "name". The code will now still accept "key" as a keyword argument, and will
+ issue a DeprecationWarning until WebOb 1.7.
+
+- The ``status`` attribute of a ``Response`` object no longer takes a string
+ like ``None None`` and allows that to be set as the status. It now has to at
+ least match the pattern of ``<integer status code> <explenation of status
+ code>``. Invalid status strings will now raise a ``ValueError``.
+
+1.5.0a0 (2015-07-25)
+--------------------
+
+Backwards Incompatibilities
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``Morsel`` will no longer accept a cookie value that does not meet RFC6265's
+ cookie-octet specification. Upon calling ``Morsel.serialize`` a warning will
+ be issued, in the future this will raise a ``ValueError``, please update your
+ cookie handling code. See https://github.com/Pylons/webob/pull/172
+
+ The cookie-octet specification in RFC6265 states the following characters are
+ valid in a cookie value:
+
+ =============== =======================================
+ Hex Range Actual Characters
+ =============== =======================================
+ ``[0x21 ]`` ``!``
+ ``[0x25-0x2B]`` ``#$%&'()*+``
+ ``[0x2D-0x3A]`` ``-./0123456789:``
+ ``[0x3C-0x5B]`` ``<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[``
+ ``[0x5D-0x7E]`` ``]^_`abcdefghijklmnopqrstuvwxyz{|}~``
+ =============== =======================================
+
+ RFC6265 suggests using base 64 to serialize data before storing data in a
+ cookie.
+
+ Cookies that meet the RFC6265 standard will no longer be quoted, as this is
+ unnecessary. This is a no-op as far as browsers and cookie storage is
+ concerned.
+
+- ``Response.set_cookie`` now uses the internal ``make_cookie`` API, which will
+ issue warnings if cookies are set with invalid bytes. See
+ https://github.com/Pylons/webob/pull/172
+
+Features
+~~~~~~~~
+
+- Add support for some new caching headers, stale-while-revalidate and
+ stale-if-error that can be used by reverse proxies to cache stale responses
+ temporarily if the backend disappears. From RFC5861. See
+ https://github.com/Pylons/webob/pull/189
+
+Bug Fixes
+~~~~~~~~~
+
+- Response.status now uses duck-typing for integers, and has also learned to
+ raise a ValueError if the status isn't an integer followed by a space, and
+ then the reason. See https://github.com/Pylons/webob/pull/191
+
+- Fixed a bug in ``webob.multidict.GetDict`` which resulted in the
+ QUERY_STRING not being updated when changes were made to query
+ params using ``Request.GET.extend()``.
+
+- Read the body of a request if we think it might have a body. This fixes PATCH
+ to support bodies. See https://github.com/Pylons/webob/pull/184
+
+- Response.from_file returns HTTP headers as latin1 rather than UTF-8, this
+ fixes the usage on Google AppEngine. See
+ https://github.com/Pylons/webob/issues/99 and
+ https://github.com/Pylons/webob/pull/150
+
+- Fix a bug in parsing the auth parameters that contained bad white space. This
+ makes the parsing fall in line with what's required in RFC7235. See
+ https://github.com/Pylons/webob/issues/158
+
+- Use '\r\n' line endings in ``Response.__str__``. See:
+ https://github.com/Pylons/webob/pull/146
+
+Documentation Changes
+~~~~~~~~~~~~~~~~~~~~~
+
+- ``response.set_cookie`` now has proper documentation for ``max_age`` and
+ ``expires``. The code has also been refactored to use ``cookies.make_cookie``
+ instead of duplicating the code. This fixes
+ https://github.com/Pylons/webob/issues/166 and
+ https://github.com/Pylons/webob/issues/171
+
+- Documentation didn't match the actual code for the wsgify function signature.
+ See https://github.com/Pylons/webob/pull/167
+
+- Remove the WebDAV only from certain HTTP Exceptions, these exceptions may
+ also be used by REST services for example.
+
1.4 (2014-05-14)
----------------
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index f6b5d87..0000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,6 +0,0 @@
-recursive-include tests *
-recursive-exclude tests *.pyc
-recursive-exclude tests *.pyo
-recursive-include docs *
-recursive-exclude docs *.pyc
-recursive-exclude docs *.pyo
diff --git a/PKG-INFO b/PKG-INFO
index 044541a..d13a066 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: WebOb
-Version: 1.5.1
+Version: 1.6.0
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Pylons Project
@@ -45,145 +45,56 @@ Description: WebOb
- 1.5.1 (2015-10-30)
+ 1.6.0 (2016-03-15)
------------------
- Bug Fixes
- ~~~~~~~~~
+ Compatibility
+ ~~~~~~~~~~~~~
- - The exceptions HTTPNotAcceptable, HTTPUnsupportedMediaType and
- HTTPNotImplemented will now correctly use the sub-classed template rather
- than the default error template. See https://github.com/Pylons/webob/issues/221
+ - Python 3.2 is no longer supported by WebOb
- - Response's from_file now correctly deals with a status line that contains an
- HTTP version identifier. HTTP/1.1 200 OK is now correctly parsed, whereas
- before this would raise an error upon setting the Response.status in
- from_file. See https://github.com/Pylons/webob/issues/121
+ Bugfix
+ ~~~~~~
- 1.5.0 (2015-10-11)
- ------------------
-
- Bug Fixes
- ~~~~~~~~~
-
- - The cookie API functions will now make sure that `max_age` is an integer or
- an string that can convert to an integer. Previously passing in
- max_age='test' would have silently done the wrong thing.
-
- 1.5.0b0 (2015-09-06)
- --------------------
+ - Request.decode attempted to read from the an already consumed stream, it has
+ now been redirected to another stream to read from. See
+ https://github.com/Pylons/webob/pull/183
- Bug Fixes
- ~~~~~~~~~
-
- - Unbreak req.POST when the request method is PATCH. Instead of returning
- something cmpletely unrelated we return NoVar. See:
- https://github.com/Pylons/webob/pull/215
+ - The application/json media type does not allow for a charset as discovery of
+ the encoding is done at the JSON layer. Upon initialization of a Response
+ WebOb will no longer add a charset if the content-type is set to JSON. See
+ https://github.com/Pylons/webob/pull/197 and
+ https://github.com/Pylons/pyramid/issues/1611
Features
~~~~~~~~
- - HTTP Status Code 308 is now supported as a Permanent Redirect. See
- https://github.com/Pylons/webob/pull/207
-
- 1.5.0a1 (2015-07-30)
- --------------------
-
- Backwards Incompatibilities
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- - ``Response.set_cookie`` renamed the only required parameter from "key" to
- "name". The code will now still accept "key" as a keyword argument, and will
- issue a DeprecationWarning until WebOb 1.7.
-
- - The ``status`` attribute of a ``Response`` object no longer takes a string
- like ``None None`` and allows that to be set as the status. It now has to at
- least match the pattern of ``<integer status code> <explenation of status
- code>``. Invalid status strings will now raise a ``ValueError``.
-
- 1.5.0a0 (2015-07-25)
- --------------------
-
- Backwards Incompatibilities
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- - ``Morsel`` will no longer accept a cookie value that does not meet RFC6265's
- cookie-octet specification. Upon calling ``Morsel.serialize`` a warning will
- be issued, in the future this will raise a ``ValueError``, please update your
- cookie handling code. See https://github.com/Pylons/webob/pull/172
-
- The cookie-octet specification in RFC6265 states the following characters are
- valid in a cookie value:
-
- =============== =======================================
- Hex Range Actual Characters
- =============== =======================================
- ``[0x21 ]`` ``!``
- ``[0x25-0x2B]`` ``#$%&'()*+``
- ``[0x2D-0x3A]`` ``-./0123456789:``
- ``[0x3C-0x5B]`` ``<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[``
- ``[0x5D-0x7E]`` ``]^_`abcdefghijklmnopqrstuvwxyz{|}~``
- =============== =======================================
+ - Lazily HTML escapes environment keys in HTTP Exceptions so that those keys in
+ the environ that are not used in the output of the page don't raise an
+ exception due to inability to be properly escaped. See
+ https://github.com/Pylons/webob/pull/139
- RFC6265 suggests using base 64 to serialize data before storing data in a
- cookie.
+ - MIMEAccept now accepts comparisons against wildcards, this allows one to
+ match on just the media type or sub-type, without having to explicitly match
+ on both the media type and sub-type at the same time. See
+ https://github.com/Pylons/webob/pull/185
- Cookies that meet the RFC6265 standard will no longer be quoted, as this is
- unnecessary. This is a no-op as far as browsers and cookie storage is
- concerned.
+ - Add the ability to return a JSON body from an exception. Using the Accept
+ information in the request, the exceptions will now automatically return a
+ JSON version of the exception instead of just HTML or text. See
+ https://github.com/Pylons/webob/pull/230 and
+ https://github.com/Pylons/webob/issues/209
- - ``Response.set_cookie`` now uses the internal ``make_cookie`` API, which will
- issue warnings if cookies are set with invalid bytes. See
- https://github.com/Pylons/webob/pull/172
-
- Features
+ Security
~~~~~~~~
- - Add support for some new caching headers, stale-while-revalidate and
- stale-if-error that can be used by reverse proxies to cache stale responses
- temporarily if the backend disappears. From RFC5861. See
- https://github.com/Pylons/webob/pull/189
-
- Bug Fixes
- ~~~~~~~~~
-
- - Response.status now uses duck-typing for integers, and has also learned to
- raise a ValueError if the status isn't an integer followed by a space, and
- then the reason. See https://github.com/Pylons/webob/pull/191
-
- - Fixed a bug in ``webob.multidict.GetDict`` which resulted in the
- QUERY_STRING not being updated when changes were made to query
- params using ``Request.GET.extend()``.
-
- - Read the body of a request if we think it might have a body. This fixes PATCH
- to support bodies. See https://github.com/Pylons/webob/pull/184
-
- - Response.from_file returns HTTP headers as latin1 rather than UTF-8, this
- fixes the usage on Google AppEngine. See
- https://github.com/Pylons/webob/issues/99 and
- https://github.com/Pylons/webob/pull/150
-
- - Fix a bug in parsing the auth parameters that contained bad white space. This
- makes the parsing fall in line with what's required in RFC7235. See
- https://github.com/Pylons/webob/issues/158
-
- - Use '\r\n' line endings in ``Response.__str__``. See:
- https://github.com/Pylons/webob/pull/146
-
- Documentation Changes
- ~~~~~~~~~~~~~~~~~~~~~
-
- - ``response.set_cookie`` now has proper documentation for ``max_age`` and
- ``expires``. The code has also been refactored to use ``cookies.make_cookie``
- instead of duplicating the code. This fixes
- https://github.com/Pylons/webob/issues/166 and
- https://github.com/Pylons/webob/issues/171
-
- - Documentation didn't match the actual code for the wsgify function signature.
- See https://github.com/Pylons/webob/pull/167
+ - exc._HTTPMove and any subclasses will now raise a ValueError if the location
+ field contains a line feed or carriage return. These values may lead to
+ possible HTTP Response Splitting. The header_getter descriptor has also been
+ modified to no longer accept headers with a line feed or carriage return.
+ See: https://github.com/Pylons/webob/pull/229 and
+ https://github.com/Pylons/webob/issues/217
- - Remove the WebDAV only from certain HTTP Exceptions, these exceptions may
- also be used by REST services for example.
Keywords: wsgi request web http
Platform: UNKNOWN
@@ -195,8 +106,8 @@ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
diff --git a/WebOb.egg-info/PKG-INFO b/WebOb.egg-info/PKG-INFO
index 044541a..d13a066 100644
--- a/WebOb.egg-info/PKG-INFO
+++ b/WebOb.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: WebOb
-Version: 1.5.1
+Version: 1.6.0
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Pylons Project
@@ -45,145 +45,56 @@ Description: WebOb
- 1.5.1 (2015-10-30)
+ 1.6.0 (2016-03-15)
------------------
- Bug Fixes
- ~~~~~~~~~
+ Compatibility
+ ~~~~~~~~~~~~~
- - The exceptions HTTPNotAcceptable, HTTPUnsupportedMediaType and
- HTTPNotImplemented will now correctly use the sub-classed template rather
- than the default error template. See https://github.com/Pylons/webob/issues/221
+ - Python 3.2 is no longer supported by WebOb
- - Response's from_file now correctly deals with a status line that contains an
- HTTP version identifier. HTTP/1.1 200 OK is now correctly parsed, whereas
- before this would raise an error upon setting the Response.status in
- from_file. See https://github.com/Pylons/webob/issues/121
+ Bugfix
+ ~~~~~~
- 1.5.0 (2015-10-11)
- ------------------
-
- Bug Fixes
- ~~~~~~~~~
-
- - The cookie API functions will now make sure that `max_age` is an integer or
- an string that can convert to an integer. Previously passing in
- max_age='test' would have silently done the wrong thing.
-
- 1.5.0b0 (2015-09-06)
- --------------------
+ - Request.decode attempted to read from the an already consumed stream, it has
+ now been redirected to another stream to read from. See
+ https://github.com/Pylons/webob/pull/183
- Bug Fixes
- ~~~~~~~~~
-
- - Unbreak req.POST when the request method is PATCH. Instead of returning
- something cmpletely unrelated we return NoVar. See:
- https://github.com/Pylons/webob/pull/215
+ - The application/json media type does not allow for a charset as discovery of
+ the encoding is done at the JSON layer. Upon initialization of a Response
+ WebOb will no longer add a charset if the content-type is set to JSON. See
+ https://github.com/Pylons/webob/pull/197 and
+ https://github.com/Pylons/pyramid/issues/1611
Features
~~~~~~~~
- - HTTP Status Code 308 is now supported as a Permanent Redirect. See
- https://github.com/Pylons/webob/pull/207
-
- 1.5.0a1 (2015-07-30)
- --------------------
-
- Backwards Incompatibilities
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- - ``Response.set_cookie`` renamed the only required parameter from "key" to
- "name". The code will now still accept "key" as a keyword argument, and will
- issue a DeprecationWarning until WebOb 1.7.
-
- - The ``status`` attribute of a ``Response`` object no longer takes a string
- like ``None None`` and allows that to be set as the status. It now has to at
- least match the pattern of ``<integer status code> <explenation of status
- code>``. Invalid status strings will now raise a ``ValueError``.
-
- 1.5.0a0 (2015-07-25)
- --------------------
-
- Backwards Incompatibilities
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- - ``Morsel`` will no longer accept a cookie value that does not meet RFC6265's
- cookie-octet specification. Upon calling ``Morsel.serialize`` a warning will
- be issued, in the future this will raise a ``ValueError``, please update your
- cookie handling code. See https://github.com/Pylons/webob/pull/172
-
- The cookie-octet specification in RFC6265 states the following characters are
- valid in a cookie value:
-
- =============== =======================================
- Hex Range Actual Characters
- =============== =======================================
- ``[0x21 ]`` ``!``
- ``[0x25-0x2B]`` ``#$%&'()*+``
- ``[0x2D-0x3A]`` ``-./0123456789:``
- ``[0x3C-0x5B]`` ``<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[``
- ``[0x5D-0x7E]`` ``]^_`abcdefghijklmnopqrstuvwxyz{|}~``
- =============== =======================================
+ - Lazily HTML escapes environment keys in HTTP Exceptions so that those keys in
+ the environ that are not used in the output of the page don't raise an
+ exception due to inability to be properly escaped. See
+ https://github.com/Pylons/webob/pull/139
- RFC6265 suggests using base 64 to serialize data before storing data in a
- cookie.
+ - MIMEAccept now accepts comparisons against wildcards, this allows one to
+ match on just the media type or sub-type, without having to explicitly match
+ on both the media type and sub-type at the same time. See
+ https://github.com/Pylons/webob/pull/185
- Cookies that meet the RFC6265 standard will no longer be quoted, as this is
- unnecessary. This is a no-op as far as browsers and cookie storage is
- concerned.
+ - Add the ability to return a JSON body from an exception. Using the Accept
+ information in the request, the exceptions will now automatically return a
+ JSON version of the exception instead of just HTML or text. See
+ https://github.com/Pylons/webob/pull/230 and
+ https://github.com/Pylons/webob/issues/209
- - ``Response.set_cookie`` now uses the internal ``make_cookie`` API, which will
- issue warnings if cookies are set with invalid bytes. See
- https://github.com/Pylons/webob/pull/172
-
- Features
+ Security
~~~~~~~~
- - Add support for some new caching headers, stale-while-revalidate and
- stale-if-error that can be used by reverse proxies to cache stale responses
- temporarily if the backend disappears. From RFC5861. See
- https://github.com/Pylons/webob/pull/189
-
- Bug Fixes
- ~~~~~~~~~
-
- - Response.status now uses duck-typing for integers, and has also learned to
- raise a ValueError if the status isn't an integer followed by a space, and
- then the reason. See https://github.com/Pylons/webob/pull/191
-
- - Fixed a bug in ``webob.multidict.GetDict`` which resulted in the
- QUERY_STRING not being updated when changes were made to query
- params using ``Request.GET.extend()``.
-
- - Read the body of a request if we think it might have a body. This fixes PATCH
- to support bodies. See https://github.com/Pylons/webob/pull/184
-
- - Response.from_file returns HTTP headers as latin1 rather than UTF-8, this
- fixes the usage on Google AppEngine. See
- https://github.com/Pylons/webob/issues/99 and
- https://github.com/Pylons/webob/pull/150
-
- - Fix a bug in parsing the auth parameters that contained bad white space. This
- makes the parsing fall in line with what's required in RFC7235. See
- https://github.com/Pylons/webob/issues/158
-
- - Use '\r\n' line endings in ``Response.__str__``. See:
- https://github.com/Pylons/webob/pull/146
-
- Documentation Changes
- ~~~~~~~~~~~~~~~~~~~~~
-
- - ``response.set_cookie`` now has proper documentation for ``max_age`` and
- ``expires``. The code has also been refactored to use ``cookies.make_cookie``
- instead of duplicating the code. This fixes
- https://github.com/Pylons/webob/issues/166 and
- https://github.com/Pylons/webob/issues/171
-
- - Documentation didn't match the actual code for the wsgify function signature.
- See https://github.com/Pylons/webob/pull/167
+ - exc._HTTPMove and any subclasses will now raise a ValueError if the location
+ field contains a line feed or carriage return. These values may lead to
+ possible HTTP Response Splitting. The header_getter descriptor has also been
+ modified to no longer accept headers with a line feed or carriage return.
+ See: https://github.com/Pylons/webob/pull/229 and
+ https://github.com/Pylons/webob/issues/217
- - Remove the WebDAV only from certain HTTP Exceptions, these exceptions may
- also be used by REST services for example.
Keywords: wsgi request web http
Platform: UNKNOWN
@@ -195,8 +106,8 @@ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
diff --git a/WebOb.egg-info/SOURCES.txt b/WebOb.egg-info/SOURCES.txt
index 23fd380..734ecec 100644
--- a/WebOb.egg-info/SOURCES.txt
+++ b/WebOb.egg-info/SOURCES.txt
@@ -2,8 +2,8 @@
.travis.yml
CHANGES.txt
HISTORY.txt
-MANIFEST.in
README.rst
+contributing.md
rtd.txt
setup.cfg
setup.py
@@ -28,6 +28,7 @@ docs/jsonrpc-example.txt
docs/license.txt
docs/reference.txt
docs/whatsnew-1.5.txt
+docs/whatsnew-1.6.txt
docs/wiki-example.txt
docs/_static/.empty
docs/api/client.txt
diff --git a/contributing.md b/contributing.md
new file mode 100644
index 0000000..ad0ae99
--- /dev/null
+++ b/contributing.md
@@ -0,0 +1,111 @@
+Contributing
+============
+
+All projects under the Pylons Projects, including this one, follow the
+guidelines established at [How to
+Contribute](http://www.pylonsproject.org/community/how-to-contribute) and
+[Coding Style and
+Standards](http://docs.pylonsproject.org/en/latest/community/codestyle.html).
+
+You can contribute to this project in several ways.
+
+* [File an Issue on GitHub](https://github.com/Pylons/webob/issues)
+* Fork this project and create a branch with your suggested change. When ready,
+ submit a pull request for consideration. [GitHub
+ Flow](https://guides.github.com/introduction/flow/index.html) describes the
+ workflow process and why it's a good practice.
+* Join the IRC channel #pyramid on irc.freenode.net.
+
+
+Git Branches
+------------
+Git branches and their purpose and status at the time of this writing are
+listed below.
+
+* [master](https://github.com/Pylons/webob/) - The branch on which further
+development takes place. The default branch on GitHub.
+* [1.5-branch](https://github.com/Pylons/webob/tree/1.5-branch) - The branch
+classified as "stable" or "latest". Actively maintained.
+* [1.4-branch](https://github.com/Pylons/webob/tree/1.4-branch) - The oldest
+actively maintained and stable branch.
+
+Older branches are not actively maintained. In general, two stable branches and
+one or two development branches are actively maintained.
+
+
+Running Tests
+-------------
+
+*Note:* This section needs better instructions.
+
+Run `tox` from within your checkout. This will run the tests across all
+supported systems and attempt to build the docs.
+
+To run the tests for Python 2.x only:
+
+ $ tox py2-cover
+
+To build the docs for Python 3.x only:
+
+ $ tox py3-docs
+
+See the `tox.ini` file for details.
+
+
+Building documentation for a Pylons Project project
+---------------------------------------------------
+
+*Note:* These instructions might not work for Windows users. Suggestions to
+improve the process for Windows users are welcome by submitting an issue or a
+pull request.
+
+1. Fork the repo on GitHub by clicking the [Fork] button.
+2. Clone your fork into a workspace on your local machine.
+
+ git clone git at github.com:<username>/webob.git
+
+3. Add a git remote "upstream" for the cloned fork.
+
+ git remote add upstream git at github.com:Pylons/webob.git
+
+4. Set an environment variable to your virtual environment.
+
+ # Mac and Linux
+ $ export VENV=~/hack-on-webob/env
+
+ # Windows
+ set VENV=c:\hack-on-webob\env
+
+5. Try to build the docs in your workspace.
+
+ # Mac and Linux
+ $ make clean html SPHINXBUILD=$VENV/bin/sphinx-build
+
+ # Windows
+ c:\> make clean html SPHINXBUILD=%VENV%\bin\sphinx-build
+
+ If successful, then you can make changes to the documentation. You can
+ load the built documentation in the `/_build/html/` directory in a web
+ browser.
+
+6. From this point forward, follow the typical [git
+ workflow](https://help.github.com/articles/what-is-a-good-git-workflow/).
+ Start by pulling from the upstream to get the most current changes.
+
+ git pull upstream master
+
+7. Make a branch, make changes to the docs, and rebuild them as indicated in
+ step 5. To speed up the build process, you can omit `clean` from the above
+ command to rebuild only those pages that depend on the files you have
+ changed.
+
+8. Once you are satisfied with your changes and the documentation builds
+ successfully without errors or warnings, then git commit and push them to
+ your "origin" repository on GitHub.
+
+ git commit -m "commit message"
+ git push -u origin --all # first time only, subsequent can be just 'git push'.
+
+9. Create a [pull request](https://help.github.com/articles/using-pull-requests/).
+
+10. Repeat the process starting from Step 6.
\ No newline at end of file
diff --git a/docs/do-it-yourself.txt b/docs/do-it-yourself.txt
index 381051c..3b65c7d 100644
--- a/docs/do-it-yourself.txt
+++ b/docs/do-it-yourself.txt
@@ -324,7 +324,7 @@ Now we'll show a basic application. Just a hello world application for now. No
... return 'Hello %s!' % req.params['name']
... elif req.method == 'GET':
... return '''<form method="POST">
- ... You're name: <input type="text" name="name">
+ ... Your name: <input type="text" name="name">
... <input type="submit">
... </form>'''
>>> hello_world = Router()
@@ -342,7 +342,7 @@ Now let's test that application:
Content-Length: 131
<BLANKLINE>
<form method="POST">
- You're name: <input type="text" name="name">
+ Your name: <input type="text" name="name">
<input type="submit">
</form>
>>> req.method = 'POST'
@@ -421,7 +421,7 @@ Here's the hello world:
... self.request = req
... def get(self):
... return '''<form method="POST">
- ... You're name: <input type="text" name="name">
+ ... Your name: <input type="text" name="name">
... <input type="submit">
... </form>'''
... def post(self):
@@ -442,7 +442,7 @@ We'll run the same test as before:
Content-Length: 131
<BLANKLINE>
<form method="POST">
- You're name: <input type="text" name="name">
+ Your name: <input type="text" name="name">
<input type="submit">
</form>
>>> req.method = 'POST'
@@ -462,7 +462,7 @@ You can use hard-coded links in your HTML, but this can have problems. Relative
The base URL using SCRIPT_NAME is ``req.application_url``. So, if we have access to the request we can make a URL. But what if we don't have access?
-We can use thread-local variables to make it easy for any function to get access to the currect request. A "thread-local" variable is a variable whose value is tracked separately for each thread, so if there are multiple requests in different threads, their requests won't clobber each other.
+We can use thread-local variables to make it easy for any function to get access to the current request. A "thread-local" variable is a variable whose value is tracked separately for each thread, so if there are multiple requests in different threads, their requests won't clobber each other.
The basic means of using a thread-local variable is ``threading.local()``. This creates a blank object that can have thread-local attributes assigned to it. I find the best way to get *at* a thread-local value is with a function, as this makes it clear that you are fetching the object, as opposed to getting at some global object.
diff --git a/docs/index.txt b/docs/index.txt
index d96240b..aafec55 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -1,3 +1,5 @@
+.. _index:
+
... 909 lines suppressed ...
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-webob.git
More information about the Python-modules-commits
mailing list