[Python-modules-commits] [webtest] 01/03: Import webtest_2.0.24.orig.tar.gz

Piotr Ożarowski piotr at moszumanska.debian.org
Wed Dec 21 11:47:25 UTC 2016


This is an automated email from the git hooks/post-receive script.

piotr pushed a commit to branch master
in repository webtest.

commit 474668976ad9da203b701fe1228ab46f3bc40b68
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Wed Dec 21 12:45:04 2016 +0100

    Import webtest_2.0.24.orig.tar.gz
---
 CHANGELOG.rst                 | 12 ++++++++++++
 PKG-INFO                      |  3 +--
 WebTest.egg-info/PKG-INFO     |  3 +--
 WebTest.egg-info/requires.txt |  7 -------
 docs/conf.py                  |  2 +-
 docs/index.rst                |  6 +++---
 docs/testapp.rst              | 16 ++++++++--------
 docs/testapp_fixt.py          |  4 ++--
 docs/testresponse.rst         |  6 +++---
 docs/testresponse_fixt.py     |  2 +-
 setup.cfg                     |  2 +-
 setup.py                      | 10 +---------
 tests/compat.py               |  6 +-----
 tox.ini                       |  6 +++---
 webtest/forms.py              |  6 +-----
 webtest/response.py           |  8 ++------
 16 files changed, 41 insertions(+), 58 deletions(-)

diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 0addb29..505e206 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -1,6 +1,18 @@
 News
 ====
 
+2.0.24 (2016-12-16)
+-------------------
+
+- Drop python 2.6 support. Newer versions may still work if you use waitress < 1.0
+
+- Remove bs4 warnings
+
+- Docs improvments
+
+- Tets are WebOb 1.7.x compatible
+
+
 2.0.23 (2016-07-21)
 -------------------
 
diff --git a/PKG-INFO b/PKG-INFO
index 513f7e2..e5dce83 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: WebTest
-Version: 2.0.23
+Version: 2.0.24
 Summary: Helper to test WSGI applications
 Home-page: http://webtest.pythonpaste.org/
 Author: Gael Pasgrimaud
@@ -27,7 +27,6 @@ Classifier: License :: OSI Approved :: MIT License
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
diff --git a/WebTest.egg-info/PKG-INFO b/WebTest.egg-info/PKG-INFO
index 513f7e2..e5dce83 100644
--- a/WebTest.egg-info/PKG-INFO
+++ b/WebTest.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: WebTest
-Version: 2.0.23
+Version: 2.0.24
 Summary: Helper to test WSGI applications
 Home-page: http://webtest.pythonpaste.org/
 Author: Gael Pasgrimaud
@@ -27,7 +27,6 @@ Classifier: License :: OSI Approved :: MIT License
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
 Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Server
 Classifier: Programming Language :: Python :: 2
-Classifier: Programming Language :: Python :: 2.6
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
 Classifier: Programming Language :: Python :: 3.3
diff --git a/WebTest.egg-info/requires.txt b/WebTest.egg-info/requires.txt
index cce5500..288af00 100644
--- a/WebTest.egg-info/requires.txt
+++ b/WebTest.egg-info/requires.txt
@@ -3,9 +3,6 @@ WebOb>=1.2
 waitress>=0.8.5
 beautifulsoup4
 
-[:python_version=="2.6"]
-ordereddict
-
 [tests]
 nose<1.3.0
 coverage
@@ -13,7 +10,3 @@ mock
 PasteDeploy
 WSGIProxy2
 pyquery
-unittest2py3k
-
-[tests:python_version=="2.6"]
-unittest2
diff --git a/docs/conf.py b/docs/conf.py
index d8c8816..268326f 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -124,7 +124,7 @@ html_theme = 'nature'
 # Add any paths that contain custom static files (such as style sheets) here,
 # relative to this directory. They are copied after the builtin static files,
 # so a file named "default.css" will overwrite the builtin "default.css".
-html_static_path = ['_static']
+html_static_path = []
 
 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
 # using the given strftime format.
diff --git a/docs/index.rst b/docs/index.rst
index 0bc355a..c18b33e 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -66,7 +66,7 @@ run WSGI applications and verify the output.
 Quick start
 ===========
 
-The most important object in WebTest is :class:`~webtest.TestApp`, the wrapper
+The most important object in WebTest is :class:`~webtest.app.TestApp`, the wrapper
 for WSGI applications. It also allows you to perform HTTP requests on it.
 To use it, you simply instantiate it with your WSGI application.
 
@@ -83,7 +83,7 @@ Here is a basic application::
     ...     start_response('200 OK', headers)
     ...     return [body]
 
-Wrap it into a :class:`~webtest.TestApp`::
+Wrap it into a :class:`~webtest.app.TestApp`::
 
     >>> from webtest import TestApp
     >>> app = TestApp(application)
@@ -107,7 +107,7 @@ Or response's body::
     >>> resp.mustcontain('<html>')
     >>> assert 'form' in resp
 
-WebTest can do much more. In particular, it can handle :doc:`forms` and :doc:`json`.
+WebTest can do much more. In particular, it can handle :doc:`forms`.
 
 
 Contents
diff --git a/docs/testapp.rst b/docs/testapp.rst
index 5fb5a78..c3b35ec 100644
--- a/docs/testapp.rst
+++ b/docs/testapp.rst
@@ -10,10 +10,10 @@ To make a request, use:
 
     app.get('/path', [params], [headers], [extra_environ], ...)
 
-This call to :meth:`~webtest.TestApp.get` does a request for
+This call to :meth:`~webtest.app.TestApp.get` does a request for
 ``/path``, with any params, extra headers or WSGI
 environment keys that you indicate.  This returns a
-:class:`~webtest.TestResponse` object,
+:class:`~webtest.response.TestResponse` object,
 based on :class:`webob.response.Response`.  It has some
 additional methods to make it easier to test.
 
@@ -24,7 +24,7 @@ If you want to do a POST request, use:
     app.post('/path', {'vars': 'values'}, [headers], [extra_environ],
              [upload_files], ...)
 
-Specifically the second argument of :meth:`~webtest.TestApp.post`
+Specifically the second argument of :meth:`~webtest.app.TestApp.post`
 is the *body* of the request.  You
 can pass in a dictionary (or dictionary-like object), or a string
 body (dictionary objects are turned into HTML form submissions).
@@ -33,8 +33,8 @@ You can also pass in the keyword argument upload_files, which is a
 list of ``[(fieldname, filename, field_content)]``.  File uploads use a
 different form submission data type to pass the structured data.
 
-You can use :meth:`~webtest.TestApp.put` and
-:meth:`~webtest.TestApp.delete` for PUT and DELETE requests.
+You can use :meth:`~webtest.app.TestApp.put` and
+:meth:`~webtest.app.TestApp.delete` for PUT and DELETE requests.
 
 
 Making JSON Requests
@@ -45,10 +45,10 @@ Webtest provide some facilities to test json apis.
 The ``*_json`` methods will transform data to json before ``POST``/``PUT`` and
 add the correct ``Content-Type`` for you.
 
-Also Response have an attribute ``.json`` to allow you to retrieve json
+Also Response have an attribute :attr:`~webtest.response.TestResponse.json` to allow you to retrieve json
 contents as a python dict.
 
-Doing *POST* request with :meth:`webtest.TestApp.post_json`:
+Doing *POST* request with :meth:`webtest.app.TestApp.post_json`:
 
 .. code-block:: python
 
@@ -63,7 +63,7 @@ Doing *POST* request with :meth:`webtest.TestApp.post_json`:
     True
 
 
-Doing *GET* request with :meth:`webtest.TestApp.get` and using :attr:`webtest.response.json`:
+Doing *GET* request with :meth:`webtest.app.TestApp.get` and using :attr:`~webtest.response.TestResponse.json`:
 
 To just parse body of the response, use Response.json:
 
diff --git a/docs/testapp_fixt.py b/docs/testapp_fixt.py
index 23742cf..ecbbeb8 100644
--- a/docs/testapp_fixt.py
+++ b/docs/testapp_fixt.py
@@ -20,10 +20,10 @@ def application(environ, start_response):
         body = six.b('<xml><message>hey!</message></xml>')
     elif req.path_info.endswith('.json'):
         content_type = 'application/json'
-        body = json.dumps({"a": 1, "b": 2})
+        body = six.b(json.dumps({"a": 1, "b": 2}))
     elif '/resource/' in req.path_info:
         content_type = 'application/json'
-        body = json.dumps(dict(id=1, value='value'))
+        body = six.b(json.dumps(dict(id=1, value='value')))
     resp = Response(body, content_type=content_type)
     return resp(environ, start_response)
 
diff --git a/docs/testresponse.rst b/docs/testresponse.rst
index 2b0ef75..0eb1343 100644
--- a/docs/testresponse.rst
+++ b/docs/testresponse.rst
@@ -33,13 +33,13 @@ The added methods:
 ``response.follow(**kw)``:
     Follows the redirect, returning the new response.  It is an error
     if this response wasn't a redirect. All keyword arguments are
-    passed to :class:`webtest.TestApp` (e.g., ``status``). Returns
+    passed to :class:`webtest.app.TestApp` (e.g., ``status``). Returns
     another response object.
 
 ``response.maybe_follow(**kw)``:
     Follows all redirects; does nothing if this response
     is not a redirect. All keyword arguments are passed
-    to :class:`webtest.TestApp` (e.g., ``status``). Returns another
+    to :class:`webtest.app.TestApp` (e.g., ``status``). Returns another
     response object.
 
 ``x in response``:
@@ -62,7 +62,7 @@ The added methods:
     `doctest <http://python.org/doc/current/lib/module-doctest.html>`_
 
 ``response.click(description=None, linkid=None, href=None, anchor=None, index=None, verbose=False)``:
-    Clicks the described link (see :class:`~webtest.TestResponse.click`)
+    Clicks the described link (see :meth:`~webtest.response.TestResponse.click`)
 
 ``response.forms``:
     Return a dictionary of forms; you can use both indexes (refer to
diff --git a/docs/testresponse_fixt.py b/docs/testresponse_fixt.py
index 66c373e..b80503e 100644
--- a/docs/testresponse_fixt.py
+++ b/docs/testresponse_fixt.py
@@ -20,7 +20,7 @@ def application(environ, start_response):
         body = six.b('<xml><message>hey!</message></xml>')
     elif req.path_info.endswith('.json'):
         content_type = 'application/json'
-        body = json.dumps({"a": 1, "b": 2})
+        body = six.b(json.dumps({"a": 1, "b": 2}))
     resp = Response(body, content_type=content_type)
     return resp(environ, start_response)
 
diff --git a/setup.cfg b/setup.cfg
index 69720dd..2c56a12 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -11,7 +11,7 @@ with-doctest = True
 doctest-extension = rst
 doctest-fixtures = _fixt
 include = docs
-exclude = (CHANGELOG|contributing).rst
+exclude = (CHANGELOG|changelog|contributing).rst
 cover-package = webtest
 doctest-options = +ELLIPSIS,+NORMALIZE_WHITESPACE
 
diff --git a/setup.py b/setup.py
index ee81d2e..e7f0add 100644
--- a/setup.py
+++ b/setup.py
@@ -5,7 +5,7 @@ import sys
 from setuptools import setup
 from setuptools import find_packages
 
-version = '2.0.23'
+version = '2.0.24'
 
 install_requires = [
     'six',
@@ -22,11 +22,6 @@ tests_require = [
 if sys.version_info[0:2] < (2, 7):
     install_requires.append('ordereddict')
 
-if sys.version_info[0:2] <= (2, 7):
-    tests_require.append('unittest2')
-else:
-    tests_require.append('unittest2py3k')
-
 
 setup(name='WebTest',
       version=version,
@@ -40,7 +35,6 @@ setup(name='WebTest',
           "Topic :: Internet :: WWW/HTTP :: WSGI",
           "Topic :: Internet :: WWW/HTTP :: WSGI :: Server",
           "Programming Language :: Python :: 2",
-          "Programming Language :: Python :: 2.6",
           "Programming Language :: Python :: 2.7",
           "Programming Language :: Python :: 3",
           "Programming Language :: Python :: 3.3",
@@ -67,9 +61,7 @@ setup(name='WebTest',
       test_suite='nose.collector',
       tests_require=tests_require,
       extras_require={
-          ':python_version=="2.6"': ['ordereddict'],
           'tests': tests_require,
-          'tests:python_version=="2.6"': ['unittest2'],
       },
       entry_points="""
       [paste.app_factory]
diff --git a/tests/compat.py b/tests/compat.py
index 510db92..bfde62b 100644
--- a/tests/compat.py
+++ b/tests/compat.py
@@ -1,10 +1,6 @@
 # -*- coding: utf-8 -*-
 
-try:
-    # py < 2.7
-    import unittest2 as unittest
-except ImportError:
-    import unittest  # noqa
+import unittest  # noqa
 
 try:
     unicode()
diff --git a/tox.ini b/tox.ini
index 241e7a3..3875d00 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 skip_missing_interpreters=true
-envlist=py26,py27,py33,py34,py35,coverage
+envlist=py27,py33,py34,py35,coverage
 
 [testenv]
 setenv =
@@ -9,7 +9,7 @@ setenv =
   COVERAGE_FILE=.coverage.{envname}
 deps =
   nose<1.3.0
-  webtest[tests]
+  .[tests]
   lxml
   pyquery
   mock
@@ -20,7 +20,7 @@ commands =
   {envbindir}/python --version
   {envbindir}/pip freeze
   py{26,27,33}: {envbindir}/nosetests  --with-coverage --with-xunit --xunit-file=nosetests-{envname}.xml []
-  py{26,27,33}: {envbindir}/coverage xml -o coverage-{envname}.xml
+  py{27,33}: {envbindir}/coverage xml -o coverage-{envname}.xml
   py{34,35}: {envbindir}/nosetests
 
 [testenv:coverage]
diff --git a/webtest/forms.py b/webtest/forms.py
index 16f5637..9ff0a17 100644
--- a/webtest/forms.py
+++ b/webtest/forms.py
@@ -400,11 +400,7 @@ class Form(object):
     def __init__(self, response, text, parser_features='html.parser'):
         self.response = response
         self.text = text
-        if response and response.charset:
-            self.html = BeautifulSoup(self.text, parser_features,
-                                      from_encoding=response.charset)
-        else:
-            self.html = BeautifulSoup(self.text, parser_features)
+        self.html = BeautifulSoup(self.text, parser_features)
 
         attrs = self.html('form')[0].attrs
         self.action = attrs.get('action', '')
diff --git a/webtest/response.py b/webtest/response.py
index 186ac47..e00f65a 100644
--- a/webtest/response.py
+++ b/webtest/response.py
@@ -74,7 +74,7 @@ class TestResponse(webob.Response):
 
     def _parse_forms(self):
         forms_ = self._forms_indexed = {}
-        form_texts = [str(f) for f in self.html('form')]
+        form_texts = [text_type(f) for f in self.html('form')]
         for i, text in enumerate(form_texts):
             form = forms.Form(self, text, self.parser_features)
             forms_[i] = form
@@ -426,11 +426,7 @@ class TestResponse(webob.Response):
             raise AttributeError(
                 "Not an HTML response body (content-type: %s)"
                 % self.content_type)
-        if self.charset:
-            soup = BeautifulSoup(self.testbody, self.parser_features,
-                                 from_encoding=self.charset)
-        else:
-            soup = BeautifulSoup(self.testbody, self.parser_features)
+        soup = BeautifulSoup(self.testbody, self.parser_features)
         return soup
 
     @property

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/webtest.git



More information about the Python-modules-commits mailing list