[Python-modules-commits] [python-webob] 01/06: Import python-webob_1.7.0.orig.tar.gz
Piotr Ożarowski
piotr at moszumanska.debian.org
Tue Dec 27 23:11:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
piotr pushed a commit to branch master
in repository python-webob.
commit a27a91a5b4549cd1949e67d7b056ce4fd1739e48
Author: Piotr Ożarowski <piotr at debian.org>
Date: Wed Dec 28 00:01:09 2016 +0100
Import python-webob_1.7.0.orig.tar.gz
---
.gitignore | 23 +-
.travis.yml | 11 +-
CHANGES.txt | 146 +--
HISTORY.txt | 51 ++
PKG-INFO | 144 +--
README.rst | 4 +-
WebOb.egg-info/PKG-INFO | 144 +--
WebOb.egg-info/SOURCES.txt | 3 +-
WebOb.egg-info/requires.txt | 3 +-
appveyor.yml | 23 +
docs/api/response.txt | 2 +
docs/conf.py | 2 +
docs/differences.txt | 5 +-
docs/index.txt | 116 ++-
docs/reference.txt | 4 +-
docs/whatsnew-1.6.txt | 18 +-
docs/whatsnew-1.7.txt | 223 +++++
setup.cfg | 2 +-
setup.py | 9 +-
tests/test_acceptparse.py | 21 +-
tests/test_byterange.py | 62 +-
tests/test_cachecontrol.py | 87 +-
tests/test_client_functional.py | 8 +-
tests/test_compat.py | 128 +++
tests/test_cookies.py | 381 ++++----
tests/test_cookies_bw.py | 19 +-
tests/test_datetime_utils.py | 88 +-
tests/test_dec.py | 17 +-
tests/test_descriptors.py | 281 +++---
tests/test_etag.py | 98 +-
tests/test_etag_nose.py | 32 +-
tests/test_exc.py | 181 ++--
tests/test_headers.py | 66 +-
tests/test_in_wsgiref.py | 19 +-
tests/test_misc.py | 73 +-
tests/test_request.py | 1886 ++++++++++++++++++++-------------------
tests/test_request_nose.py | 69 +-
tests/test_response.py | 857 +++++++++++-------
tests/test_static.py | 6 +-
tests/test_transcode.py | 42 +-
tox.ini | 28 +-
toxfast.ini | 10 -
webob/byterange.py | 2 +-
webob/compat.py | 33 +-
webob/dec.py | 12 +-
webob/descriptors.py | 5 +-
webob/exc.py | 29 +-
webob/headers.py | 11 +-
webob/request.py | 321 ++++---
webob/response.py | 548 +++++++++---
webob/util.py | 4 +-
51 files changed, 3725 insertions(+), 2632 deletions(-)
diff --git a/.gitignore b/.gitignore
index 09c1882..83acee6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,30 +1,17 @@
*$py.class
-*,cover
*.egg
*.pyc
*.pyo
*.swp
-*_coverage/**
-*_fixt.py
*~
.*.swp
-.coverage
-.coverage.*
.tox/
-Session.vim
-TEST*
-WebOb.egg-info
__pycache__/
-_website/
build/
-coverage-*.xml
-coverage.xml
-coverage.xml
dist/
-docs/_build/*
env*/
-glob:_coverage
-nosetests-*.xml
-nosetests.xml
-nosetests.xml
-testenv
+.coverage
+.cache/
+WebOb.egg-info/
+pytest*.xml
+coverage*.xml
diff --git a/.travis.yml b/.travis.yml
index 951ff57..7037c57 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -4,8 +4,6 @@ sudo: false
matrix:
include:
- - python: 2.6
- env: TOXENV=py26
- python: 2.7
env: TOXENV=py27
- python: 3.3
@@ -14,12 +12,17 @@ matrix:
env: TOXENV=py34
- python: 3.5
env: TOXENV=py35
+ - python: 3.6-dev
+ env: TOXENV=py36
+ - python: nightly
+ env: TOXENV=py37
- python: pypy
env: TOXENV=pypy
- - python: pypy3
- env: TOXENV=pypy3
- python: 3.5
env: TOXENV=py2-cover,py3-cover,coverage
+ allow_failures:
+ - env: TOXENV=py36
+ - env: TOXENV=py37
install:
- travis_retry pip install tox
diff --git a/CHANGES.txt b/CHANGES.txt
index 0b3ace5..beb7bee 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,74 +1,106 @@
-1.6.2 (2016-10-14)
+1.7.0 (2016-12-22)
------------------
+Compatibility
+~~~~~~~~~~~~~
+
+- WebOb is no longer supported on Python 2.6 and PyPy3 (due to pip no longer
+ supporting Python 3.2 even on PyPy)
+
+Backwards Incompatibility
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+- ``Response.content_type`` removes all existing Content-Type parameters, and
+ if the new Content-Type is "texty" it adds a new charset (unless already
+ provided) using the ``default_charset``. See
+ https://github.com/Pylons/webob/pull/301
+
+- ``Response.set_cookie`` no longer accepts a key argument. This was deprecated
+ in WebOb 1.5 and as mentioned in the deprecation, is being removed in 1.7
+
+- ``Response.__init__`` will no longer set the default Content-Type, nor
+ Content-Length on Responses that don't have a body. This allows WebOb to
+ return proper responses for things like `Response(status='204 No Content')`.
+
+- ``Response.text`` will no longer raise if the Content-Type does not have a
+ charset, it will fall back to using the new ``default_body_encoding`. To get
+ the old behaviour back please sub-class ``Response`` and set
+ ``default_body_encoding`` to ``None``. See
+ https://github.com/Pylons/webob/pull/287
+
+- WebOb no longer supports Chunked Encoding, this means that if you are using
+ WebOb and need Chunked Encoding you will be required to have a proxy that
+ unchunks the request for you. Please read
+ https://github.com/Pylons/webob/issues/279 for more background.
+
+Feature
+~~~~~~~
+
+- ``Response`` has a new ``default_body_encoding`` which may be used to allow
+ getting/setting ``Response.text`` when a Content-Type has no charset. See
+ https://github.com/Pylons/webob/pull/287
+
+- ``webob.Request`` with any HTTP method is now allowed to have a body. This
+ allows DELETE to have a request body for passing extra information. See
+ https://github.com/Pylons/webob/pull/283 and
+ https://github.com/Pylons/webob/pull/274
+
+- Add ``tell()`` to ``ResponseBodyFile`` so that it may be used for example for
+ zipfile support. See https://github.com/Pylons/webob/pull/117
+
+- Allow the return from ``wsgify.middleware`` to be used as a decorator. See
+ https://github.com/Pylons/webob/pull/228
+
Bugfix
~~~~~~
+- Fixup ``cgi.FieldStorage`` on Python 3.x to work-around issue reported in
+ Python bug report 27777 and 24764. This is currently applied for Python
+ versions less than 3.7. See https://github.com/Pylons/webob/pull/294 and
+ https://github.com/Pylons/webob/pull/300
+
+- ``Response.set_cookie`` now accepts ``datetime`` objects for the ``expires``
+ kwarg and will correctly convert them to UTC with no tzinfo for use in
+ calculating the ``max_age``. See https://github.com/Pylons/webob/issues/254
+ and https://github.com/Pylons/webob/pull/292
+
+- Fixes ``request.PATH_SAFE`` to contain all of the path safe characters
+ according to RFC3986. See https://github.com/Pylons/webob/pull/291
+
- WebOb's exceptions will lazily read underlying variables when inserted into
templates to avoid expensive computations/crashes when inserting into the
template. This had a bad performance regression on Py27 because of the way
the lazified class was created and returned. See
https://github.com/Pylons/webob/pull/284
-1.6.1 (2016-05-20)
-------------------
-
-Bugfix
-~~~~~~
+- ``wsgify.__call__`` raised a ``TypeError`` with an unhelpful message, it will
+ now return the ``repr`` for the wrapped function:
+ https://github.com/Pylons/webob/issues/119
-- Response.from_file now parses the status line correctly when the status line
- contains an HTTP with version, as well as a status text that contains
- multiple white spaces (e.g 404 Not Found). See
- https://github.com/Pylons/webob/issues/250
+- ``Response.json``'s ``json.dumps``/``json.loads`` are now always UTF-8. It no
+ longer tries to use the charset.
+- The ``Response.__init__`` will by default no longer set the Content-Type to
+ the default if a ``headerlist`` is provided. This fixes issues whereby
+ ``Request.get_response()`` would return a Response that didn't match the
+ actual response. See https://github.com/Pylons/webob/pull/261 and
+ https://github.com/Pylons/webob/issues/205
-1.6.0 (2016-03-15)
-------------------
+- Cleans up the remainder of the issues with the updated WebOb exceptions that
+ were taught to return JSON in version 1.6. See
+ https://github.com/Pylons/webob/issues/237 and
+ https://github.com/Pylons/webob/issues/236
-Compatibility
-~~~~~~~~~~~~~
-
-- Python 3.2 is no longer supported by WebOb
-
-Bugfix
-~~~~~~
+- ``Response.from_file`` now parses the status line correctly when the status
+ line contains an HTTP with version, as well as a status text that contains
+ multiple white spaces (e.g HTTP/1.1 404 Not Found). See
+ https://github.com/Pylons/webob/issues/250
-- 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
-
-- 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
-~~~~~~~~
-
-- 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
-
-- 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
-
-- 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
-
-Security
-~~~~~~~~
-
-- 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
+- ``Response`` now has a new property named ``has_body`` that may be used to
+ interrogate the ``Response`` to find out if ``Response.body`` is or isn't
+ set.
+ This is used in the exception handling code so that if you use a WebOb HTTP
+ Exception and pass a generator to ``app_iter`` WebOb won't attempt to read
+ the whole thing and instead allows it to be returned to the WSGI server. See
+ https://github.com/Pylons/webob/pull/259
diff --git a/HISTORY.txt b/HISTORY.txt
index 59bd54e..a5313b7 100644
--- a/HISTORY.txt
+++ b/HISTORY.txt
@@ -1,3 +1,54 @@
+1.6.0 (2016-03-15)
+------------------
+
+Compatibility
+~~~~~~~~~~~~~
+
+- Python 3.2 is no longer supported by WebOb
+
+Bugfix
+~~~~~~
+
+- 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
+
+- 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
+~~~~~~~~
+
+- 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
+
+- 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
+
+- 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
+
+Security
+~~~~~~~~
+
+- 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
+
+
1.5.1 (2015-10-30)
------------------
diff --git a/PKG-INFO b/PKG-INFO
index 6784294..a3c08f6 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: WebOb
-Version: 1.6.2
+Version: 1.7.0
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Pylons Project
@@ -28,14 +28,14 @@ Description: WebOb
Support and Documentation
-------------------------
- See the `WebOb Documentation website <http://webob.readthedocs.org/>`_ to view
+ See the `WebOb Documentation website <https://webob.readthedocs.io/>`_ to view
documentation, report bugs, and obtain support.
License
-------
WebOb is offered under the `MIT-license
- <http://webob.readthedocs.org/en/latest/license.html>`_.
+ <https://webob.readthedocs.io/en/latest/license.html>`_.
Authors
-------
@@ -45,80 +45,112 @@ Description: WebOb
- 1.6.2 (2016-10-14)
+ 1.7.0 (2016-12-22)
------------------
- Bugfix
- ~~~~~~
+ Compatibility
+ ~~~~~~~~~~~~~
- - WebOb's exceptions will lazily read underlying variables when inserted into
- templates to avoid expensive computations/crashes when inserting into the
- template. This had a bad performance regression on Py27 because of the way
- the lazified class was created and returned. See
- https://github.com/Pylons/webob/pull/284
+ - WebOb is no longer supported on Python 2.6 and PyPy3 (due to pip no longer
+ supporting Python 3.2 even on PyPy)
- 1.6.1 (2016-05-20)
- ------------------
+ Backwards Incompatibility
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
- Bugfix
- ~~~~~~
+ - ``Response.content_type`` removes all existing Content-Type parameters, and
+ if the new Content-Type is "texty" it adds a new charset (unless already
+ provided) using the ``default_charset``. See
+ https://github.com/Pylons/webob/pull/301
- - Response.from_file now parses the status line correctly when the status line
- contains an HTTP with version, as well as a status text that contains
- multiple white spaces (e.g 404 Not Found). See
- https://github.com/Pylons/webob/issues/250
+ - ``Response.set_cookie`` no longer accepts a key argument. This was deprecated
+ in WebOb 1.5 and as mentioned in the deprecation, is being removed in 1.7
+ - ``Response.__init__`` will no longer set the default Content-Type, nor
+ Content-Length on Responses that don't have a body. This allows WebOb to
+ return proper responses for things like `Response(status='204 No Content')`.
- 1.6.0 (2016-03-15)
- ------------------
+ - ``Response.text`` will no longer raise if the Content-Type does not have a
+ charset, it will fall back to using the new ``default_body_encoding`. To get
+ the old behaviour back please sub-class ``Response`` and set
+ ``default_body_encoding`` to ``None``. See
+ https://github.com/Pylons/webob/pull/287
- Compatibility
- ~~~~~~~~~~~~~
+ - WebOb no longer supports Chunked Encoding, this means that if you are using
+ WebOb and need Chunked Encoding you will be required to have a proxy that
+ unchunks the request for you. Please read
+ https://github.com/Pylons/webob/issues/279 for more background.
+
+ Feature
+ ~~~~~~~
+
+ - ``Response`` has a new ``default_body_encoding`` which may be used to allow
+ getting/setting ``Response.text`` when a Content-Type has no charset. See
+ https://github.com/Pylons/webob/pull/287
- - Python 3.2 is no longer supported by WebOb
+ - ``webob.Request`` with any HTTP method is now allowed to have a body. This
+ allows DELETE to have a request body for passing extra information. See
+ https://github.com/Pylons/webob/pull/283 and
+ https://github.com/Pylons/webob/pull/274
+
+ - Add ``tell()`` to ``ResponseBodyFile`` so that it may be used for example for
+ zipfile support. See https://github.com/Pylons/webob/pull/117
+
+ - Allow the return from ``wsgify.middleware`` to be used as a decorator. See
+ https://github.com/Pylons/webob/pull/228
Bugfix
~~~~~~
- - 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
+ - Fixup ``cgi.FieldStorage`` on Python 3.x to work-around issue reported in
+ Python bug report 27777 and 24764. This is currently applied for Python
+ versions less than 3.7. See https://github.com/Pylons/webob/pull/294 and
+ https://github.com/Pylons/webob/pull/300
+
+ - ``Response.set_cookie`` now accepts ``datetime`` objects for the ``expires``
+ kwarg and will correctly convert them to UTC with no tzinfo for use in
+ calculating the ``max_age``. See https://github.com/Pylons/webob/issues/254
+ and https://github.com/Pylons/webob/pull/292
- - 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
+ - Fixes ``request.PATH_SAFE`` to contain all of the path safe characters
+ according to RFC3986. See https://github.com/Pylons/webob/pull/291
- Features
- ~~~~~~~~
+ - WebOb's exceptions will lazily read underlying variables when inserted into
+ templates to avoid expensive computations/crashes when inserting into the
+ template. This had a bad performance regression on Py27 because of the way
+ the lazified class was created and returned. See
+ https://github.com/Pylons/webob/pull/284
+
+ - ``wsgify.__call__`` raised a ``TypeError`` with an unhelpful message, it will
+ now return the ``repr`` for the wrapped function:
+ https://github.com/Pylons/webob/issues/119
- - 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
+ - ``Response.json``'s ``json.dumps``/``json.loads`` are now always UTF-8. It no
+ longer tries to use the charset.
- - 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
+ - The ``Response.__init__`` will by default no longer set the Content-Type to
+ the default if a ``headerlist`` is provided. This fixes issues whereby
+ ``Request.get_response()`` would return a Response that didn't match the
+ actual response. See https://github.com/Pylons/webob/pull/261 and
+ https://github.com/Pylons/webob/issues/205
- - 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
+ - Cleans up the remainder of the issues with the updated WebOb exceptions that
+ were taught to return JSON in version 1.6. See
+ https://github.com/Pylons/webob/issues/237 and
+ https://github.com/Pylons/webob/issues/236
- Security
- ~~~~~~~~
+ - ``Response.from_file`` now parses the status line correctly when the status
+ line contains an HTTP with version, as well as a status text that contains
+ multiple white spaces (e.g HTTP/1.1 404 Not Found). See
+ https://github.com/Pylons/webob/issues/250
- - 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
+ - ``Response`` now has a new property named ``has_body`` that may be used to
+ interrogate the ``Response`` to find out if ``Response.body`` is or isn't
+ set.
+ This is used in the exception handling code so that if you use a WebOb HTTP
+ Exception and pass a generator to ``app_iter`` WebOb won't attempt to read
+ the whole thing and instead allows it to be returned to the WSGI server. See
+ https://github.com/Pylons/webob/pull/259
Keywords: wsgi request web http
Platform: UNKNOWN
@@ -128,10 +160,10 @@ Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
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.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
diff --git a/README.rst b/README.rst
index bdca2b8..1b3d83e 100644
--- a/README.rst
+++ b/README.rst
@@ -20,14 +20,14 @@ parse HTTP responses.
Support and Documentation
-------------------------
-See the `WebOb Documentation website <http://webob.readthedocs.org/>`_ to view
+See the `WebOb Documentation website <https://webob.readthedocs.io/>`_ to view
documentation, report bugs, and obtain support.
License
-------
WebOb is offered under the `MIT-license
-<http://webob.readthedocs.org/en/latest/license.html>`_.
+<https://webob.readthedocs.io/en/latest/license.html>`_.
Authors
-------
diff --git a/WebOb.egg-info/PKG-INFO b/WebOb.egg-info/PKG-INFO
index 6784294..a3c08f6 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.6.2
+Version: 1.7.0
Summary: WSGI request and response object
Home-page: http://webob.org/
Author: Pylons Project
@@ -28,14 +28,14 @@ Description: WebOb
Support and Documentation
-------------------------
- See the `WebOb Documentation website <http://webob.readthedocs.org/>`_ to view
+ See the `WebOb Documentation website <https://webob.readthedocs.io/>`_ to view
documentation, report bugs, and obtain support.
License
-------
WebOb is offered under the `MIT-license
- <http://webob.readthedocs.org/en/latest/license.html>`_.
+ <https://webob.readthedocs.io/en/latest/license.html>`_.
Authors
-------
@@ -45,80 +45,112 @@ Description: WebOb
- 1.6.2 (2016-10-14)
+ 1.7.0 (2016-12-22)
------------------
- Bugfix
- ~~~~~~
+ Compatibility
+ ~~~~~~~~~~~~~
- - WebOb's exceptions will lazily read underlying variables when inserted into
- templates to avoid expensive computations/crashes when inserting into the
- template. This had a bad performance regression on Py27 because of the way
- the lazified class was created and returned. See
- https://github.com/Pylons/webob/pull/284
+ - WebOb is no longer supported on Python 2.6 and PyPy3 (due to pip no longer
+ supporting Python 3.2 even on PyPy)
- 1.6.1 (2016-05-20)
- ------------------
+ Backwards Incompatibility
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
- Bugfix
- ~~~~~~
+ - ``Response.content_type`` removes all existing Content-Type parameters, and
+ if the new Content-Type is "texty" it adds a new charset (unless already
+ provided) using the ``default_charset``. See
+ https://github.com/Pylons/webob/pull/301
- - Response.from_file now parses the status line correctly when the status line
- contains an HTTP with version, as well as a status text that contains
- multiple white spaces (e.g 404 Not Found). See
- https://github.com/Pylons/webob/issues/250
+ - ``Response.set_cookie`` no longer accepts a key argument. This was deprecated
+ in WebOb 1.5 and as mentioned in the deprecation, is being removed in 1.7
+ - ``Response.__init__`` will no longer set the default Content-Type, nor
+ Content-Length on Responses that don't have a body. This allows WebOb to
+ return proper responses for things like `Response(status='204 No Content')`.
- 1.6.0 (2016-03-15)
- ------------------
+ - ``Response.text`` will no longer raise if the Content-Type does not have a
+ charset, it will fall back to using the new ``default_body_encoding`. To get
+ the old behaviour back please sub-class ``Response`` and set
+ ``default_body_encoding`` to ``None``. See
+ https://github.com/Pylons/webob/pull/287
- Compatibility
- ~~~~~~~~~~~~~
+ - WebOb no longer supports Chunked Encoding, this means that if you are using
+ WebOb and need Chunked Encoding you will be required to have a proxy that
+ unchunks the request for you. Please read
+ https://github.com/Pylons/webob/issues/279 for more background.
+
+ Feature
+ ~~~~~~~
+
+ - ``Response`` has a new ``default_body_encoding`` which may be used to allow
+ getting/setting ``Response.text`` when a Content-Type has no charset. See
+ https://github.com/Pylons/webob/pull/287
- - Python 3.2 is no longer supported by WebOb
+ - ``webob.Request`` with any HTTP method is now allowed to have a body. This
+ allows DELETE to have a request body for passing extra information. See
+ https://github.com/Pylons/webob/pull/283 and
+ https://github.com/Pylons/webob/pull/274
+
+ - Add ``tell()`` to ``ResponseBodyFile`` so that it may be used for example for
+ zipfile support. See https://github.com/Pylons/webob/pull/117
+
+ - Allow the return from ``wsgify.middleware`` to be used as a decorator. See
+ https://github.com/Pylons/webob/pull/228
Bugfix
~~~~~~
- - 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
+ - Fixup ``cgi.FieldStorage`` on Python 3.x to work-around issue reported in
+ Python bug report 27777 and 24764. This is currently applied for Python
+ versions less than 3.7. See https://github.com/Pylons/webob/pull/294 and
+ https://github.com/Pylons/webob/pull/300
+
+ - ``Response.set_cookie`` now accepts ``datetime`` objects for the ``expires``
+ kwarg and will correctly convert them to UTC with no tzinfo for use in
+ calculating the ``max_age``. See https://github.com/Pylons/webob/issues/254
+ and https://github.com/Pylons/webob/pull/292
- - 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
+ - Fixes ``request.PATH_SAFE`` to contain all of the path safe characters
+ according to RFC3986. See https://github.com/Pylons/webob/pull/291
- Features
- ~~~~~~~~
+ - WebOb's exceptions will lazily read underlying variables when inserted into
+ templates to avoid expensive computations/crashes when inserting into the
+ template. This had a bad performance regression on Py27 because of the way
+ the lazified class was created and returned. See
+ https://github.com/Pylons/webob/pull/284
+
+ - ``wsgify.__call__`` raised a ``TypeError`` with an unhelpful message, it will
+ now return the ``repr`` for the wrapped function:
+ https://github.com/Pylons/webob/issues/119
- - 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
+ - ``Response.json``'s ``json.dumps``/``json.loads`` are now always UTF-8. It no
+ longer tries to use the charset.
- - 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
+ - The ``Response.__init__`` will by default no longer set the Content-Type to
+ the default if a ``headerlist`` is provided. This fixes issues whereby
+ ``Request.get_response()`` would return a Response that didn't match the
+ actual response. See https://github.com/Pylons/webob/pull/261 and
+ https://github.com/Pylons/webob/issues/205
- - 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
+ - Cleans up the remainder of the issues with the updated WebOb exceptions that
+ were taught to return JSON in version 1.6. See
+ https://github.com/Pylons/webob/issues/237 and
+ https://github.com/Pylons/webob/issues/236
- Security
- ~~~~~~~~
+ - ``Response.from_file`` now parses the status line correctly when the status
+ line contains an HTTP with version, as well as a status text that contains
+ multiple white spaces (e.g HTTP/1.1 404 Not Found). See
+ https://github.com/Pylons/webob/issues/250
- - 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
+ - ``Response`` now has a new property named ``has_body`` that may be used to
+ interrogate the ``Response`` to find out if ``Response.body`` is or isn't
+ set.
+ This is used in the exception handling code so that if you use a WebOb HTTP
+ Exception and pass a generator to ``app_iter`` WebOb won't attempt to read
+ the whole thing and instead allows it to be returned to the WSGI server. See
+ https://github.com/Pylons/webob/pull/259
Keywords: wsgi request web http
Platform: UNKNOWN
@@ -128,10 +160,10 @@ Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
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.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
+Classifier: Programming Language :: Python :: 3.6
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 734ecec..009c7b8 100644
--- a/WebOb.egg-info/SOURCES.txt
+++ b/WebOb.egg-info/SOURCES.txt
@@ -3,12 +3,12 @@
CHANGES.txt
HISTORY.txt
README.rst
+appveyor.yml
contributing.md
rtd.txt
setup.cfg
setup.py
tox.ini
-toxfast.ini
WebOb.egg-info/PKG-INFO
WebOb.egg-info/SOURCES.txt
WebOb.egg-info/dependency_links.txt
@@ -29,6 +29,7 @@ docs/license.txt
docs/reference.txt
docs/whatsnew-1.5.txt
docs/whatsnew-1.6.txt
+docs/whatsnew-1.7.txt
docs/wiki-example.txt
docs/_static/.empty
docs/api/client.txt
diff --git a/WebOb.egg-info/requires.txt b/WebOb.egg-info/requires.txt
index dba0337..08f26e4 100644
--- a/WebOb.egg-info/requires.txt
+++ b/WebOb.egg-info/requires.txt
@@ -4,5 +4,6 @@ Sphinx >= 1.3.1
pylons-sphinx-themes
[testing]
-nose
+pytest
coverage
+pytest-cov
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..bc7aa9b
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,23 @@
+environment:
+ matrix:
+ - PYTHON: "C:\\Python35"
+ TOXENV: "py35"
+ - PYTHON: "C:\\Python27"
+ TOXENV: "py27"
+ - PYTHON: "C:\\Python27-x64"
+ TOXENV: "py27"
+ - PYTHON: "C:\\Python35-x64"
+ TOXENV: "py35"
+
+cache:
+ - '%LOCALAPPDATA%\pip\Cache'
+
+version: '{branch}.{build}'
+
+install:
+ - "%PYTHON%\\python.exe -m pip install tox"
+
+build: off
+
+test_script:
+ - "%PYTHON%\\Scripts\\tox.exe"
diff --git a/docs/api/response.txt b/docs/api/response.txt
index 61e7631..654a809 100644
--- a/docs/api/response.txt
+++ b/docs/api/response.txt
@@ -7,5 +7,7 @@ Response
.. automodule:: webob.response
.. autoclass:: webob.response.Response
:members:
+.. autoclass:: webob.response.ResponseBodyFile
+ :members:
.. autoclass:: webob.response.AppIterRange
:members:
diff --git a/docs/conf.py b/docs/conf.py
index 321769e..bfc7d1a 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -56,6 +56,8 @@ html_static_path = ['_static']
htmlhelp_basename = 'WebObdoc'
+html_use_smartypants = False
+
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
diff --git a/docs/differences.txt b/docs/differences.txt
index fdc6817..fd2ce39 100644
--- a/docs/differences.txt
+++ b/docs/differences.txt
@@ -61,6 +61,9 @@ Response
``flush()`` and ``tell()``:
Not available.
+``tell()``:
+ Available in ``res.body_file.tell()``.
+
There are also many extra methods and attributes on WebOb Response
objects.
@@ -162,7 +165,7 @@ dictionary-like:
``has_header(header)``:
Use ``header in res.headers``
-``flush()``, ``tell()``:
+``flush()``:
Not available
``content``:
diff --git a/docs/index.txt b/docs/index.txt
index aafec55..356bc7e 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -44,8 +44,8 @@ request (including the path and query string), a file-like object for
the request body, and a variety of custom keys. You can always access
the environ with ``req.environ``.
-Some of the most important/interesting attributes of a request
-object:
+Some of the most important and interesting attributes of a request object are
+the following:
``req.method``:
The request method, e.g., ``'GET'``, ``'POST'``
@@ -74,25 +74,24 @@ object:
A simple dictionary of all the cookies.
``req.headers``:
- A dictionary of all the headers. This is dictionary is case-insensitive.
+ A dictionary of all the headers. This dictionary is case-insensitive.
``req.urlvars`` and ``req.urlargs``:
``req.urlvars`` is the keyword parameters associated with the
request URL. ``req.urlargs`` are the positional parameters.
These are set by products like `Routes
- <http://routes.groovie.org/>`_ and `Selector
- <http://lukearno.com/projects/selector/>`_.
+ <http://routes.readthedocs.io/en/latest/>`_ and `Selector
+ <https://github.com/lukearno/selector>`_.
.. _`dictionary-like object`: #multidict
-Also, for standard HTTP request headers there are usually attributes,
-for instance: ``req.accept_language``, ``req.content_length``,
-``req.user_agent``, as an example. These properties expose the
-*parsed* form of each header, for whatever parsing makes sense. For
-instance, ``req.if_modified_since`` returns a `datetime
-<http://python.org/doc/current/lib/datetime-datetime.html>`_ object
-(or None if the header is was not provided). Details are in the
-`Request reference <class-webob.Request.html>`_.
+Also for standard HTTP request headers, there are usually attributes, e.g.,
+``req.accept_language``, ``req.content_length``, and ``req.user_agent``. These
+properties expose the *parsed* form of each header, for whatever parsing makes
+sense. For instance, ``req.if_modified_since`` returns a `datetime
+<http://python.org/doc/current/lib/datetime-datetime.html>`_ object (or
+``None`` if the header is was not provided). Details are in the `Request
+reference <class-webob.Request.html>`_.
URLs
----
@@ -104,18 +103,18 @@ is mounted at ``http://localhost/app-root``.
``req.url``:
The full request URL, with query string, e.g.,
- ``'http://localhost/app-root/doc?article_id=10'``
+ ``'http://localhost/app-root/doc?article_id=10'``.
``req.application_url``:
- The URL of the application (just the SCRIPT_NAME portion of the
- path, not PATH_INFO). E.g., ``'http://localhost/app-root'``
+ The URL of the application (just the ``SCRIPT_NAME`` portion of the
+ path, not ``PATH_INFO``), e.g., ``'http://localhost/app-root'``.
``req.host_url``:
- The URL with the host, e.g., ``'http://localhost'``
+ The URL with the host, e.g., ``'http://localhost'``.
``req.relative_url(url, to_application=False)``:
Gives a URL, relative to the current URL. If ``to_application``
- is True, then resolves it relative to ``req.application_url``.
+ is True, then the URL is resolved relative to ``req.application_url``.
Methods
-------
@@ -178,7 +177,7 @@ WSGI):
to ``app_iter``).
Everything else in the object derives from this underlying state.
-Here's the highlights:
+Here are the highlights:
``response.content_type``:
The content type *not* including the ``charset`` parameter.
@@ -193,22 +192,17 @@ Here's the highlights:
``response.content_type_params`` is a dictionary of all the
parameters.
-``response.request``:
- This optional attribute can point to the request object associated
- with this response object.
-
-``response.set_cookie(key, value, max_age=None, path='/', domain=None, secure=None, httponly=False, version=None, comment=None)``:
... 11834 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