Hello community,

here is the log from the commit of package python-gabbi for openSUSE:Factory 
checked in at 2019-08-13 13:24:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-gabbi (Old)
 and      /work/SRC/openSUSE:Factory/.python-gabbi.new.9556 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-gabbi"

Tue Aug 13 13:24:27 2019 rev:8 rq:722785 version:1.49.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-gabbi/python-gabbi.changes        
2019-07-26 12:45:06.717814382 +0200
+++ /work/SRC/openSUSE:Factory/.python-gabbi.new.9556/python-gabbi.changes      
2019-08-13 13:24:34.273366173 +0200
@@ -1,0 +2,6 @@
+Mon Aug 12 13:46:41 UTC 2019 - Marketa Calabkova <[email protected]>
+
+- update to 1.49.0
+  * Enhanced https certificate validation.
+
+-------------------------------------------------------------------

Old:
----
  gabbi-1.48.0.tar.gz

New:
----
  gabbi-1.49.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-gabbi.spec ++++++
--- /var/tmp/diff_new_pack.JSeM8j/_old  2019-08-13 13:24:35.965365728 +0200
+++ /var/tmp/diff_new_pack.JSeM8j/_new  2019-08-13 13:24:35.969365726 +0200
@@ -18,12 +18,12 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-gabbi
-Version:        1.48.0
+Version:        1.49.0
 Release:        0
 Summary:        Declarative HTTP testing library
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Url:            https://github.com/cdent/gabbi
+URL:            https://github.com/cdent/gabbi
 Source:         
https://files.pythonhosted.org/packages/source/g/gabbi/gabbi-%{version}.tar.gz
 BuildRequires:  %{python_module certifi}
 BuildRequires:  %{python_module colorama}
@@ -48,7 +48,6 @@
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
 BuildArch:      noarch
-
 %python_subpackages
 
 %description

++++++ gabbi-1.48.0.tar.gz -> gabbi-1.49.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/AUTHORS new/gabbi-1.49.0/AUTHORS
--- old/gabbi-1.48.0/AUTHORS    2019-07-01 16:27:58.000000000 +0200
+++ new/gabbi-1.49.0/AUTHORS    2019-08-07 16:48:13.000000000 +0200
@@ -13,6 +13,7 @@
 Julien Danjou <[email protected]>
 Kim Raymoure <[email protected]>
 Marc Abramowitz <[email protected]>
+Marc Catrisse <[email protected]>
 Mehdi Abaakouk <[email protected]>
 Mehdi Abaakouk <[email protected]>
 Michael McCune <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/ChangeLog new/gabbi-1.49.0/ChangeLog
--- old/gabbi-1.48.0/ChangeLog  2019-07-01 16:27:58.000000000 +0200
+++ new/gabbi-1.49.0/ChangeLog  2019-08-07 16:48:13.000000000 +0200
@@ -1,6 +1,15 @@
 CHANGES
 =======
 
+1.49.0
+------
+
+* Release 1.49.0
+* Update docs for cert\_validate functionality
+* Rename gabbi-run --ignore-cert to --insecure and -k
+* Update tox.ini to modern expectations
+* add cert validation attribute (runner + driver) (#274)
+
 1.48.0
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/PKG-INFO new/gabbi-1.49.0/PKG-INFO
--- old/gabbi-1.48.0/PKG-INFO   2019-07-01 16:27:59.000000000 +0200
+++ new/gabbi-1.49.0/PKG-INFO   2019-08-07 16:48:13.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: gabbi
-Version: 1.48.0
+Version: 1.49.0
 Summary: Declarative HTTP testing library
 Home-page: https://github.com/cdent/gabbi
 Author: Chris Dent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/docs/source/format.rst 
new/gabbi-1.49.0/docs/source/format.rst
--- old/gabbi-1.48.0/docs/source/format.rst     2018-06-28 15:18:51.000000000 
+0200
+++ new/gabbi-1.49.0/docs/source/format.rst     2019-08-07 15:18:03.000000000 
+0200
@@ -66,6 +66,13 @@
        selected. Set this to ``False`` to allow selecting a test without
        dependencies.
      - defaults to ``True``
+   * - ``cert_validate``
+     - States whether the underlying HTTP client should attempt to validate SSL
+       certificates. In many test environment certificates will be self-signed
+       so changing this may be requried. It can also be changed when
+       :doc:`loader` or using :doc:`gabbi-run <runner>`.
+     - defaults to ``True``
+
 
 .. note:: When tests are generated dynamically, the ``TestCase`` name will
           include the respective test's ``name``, lowercased with spaces
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/docs/source/release.rst 
new/gabbi-1.49.0/docs/source/release.rst
--- old/gabbi-1.48.0/docs/source/release.rst    2019-07-01 16:06:47.000000000 
+0200
+++ new/gabbi-1.49.0/docs/source/release.rst    2019-08-07 16:22:06.000000000 
+0200
@@ -5,6 +5,14 @@
 highlighting major features and changes. For more detail see
 the `commit logs`_ on GitHub.
 
+1.49.0
+------
+
+* Add support for not validating certificates in ``https`` requests. Controlled
+  by the ``cert_validate`` attribute in individual tests and
+  :meth:`~gabbi.driver.build_tests` and the ``-k`` or ``--insecure`` argument 
to
+  :doc:`gabbi-run <runner>`.
+
 1.48.0
 ------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/docs/source/runner.rst 
new/gabbi-1.49.0/docs/source/runner.rst
--- old/gabbi-1.48.0/docs/source/runner.rst     2019-06-18 10:08:50.000000000 
+0200
+++ new/gabbi-1.49.0/docs/source/runner.rst     2019-08-07 16:23:00.000000000 
+0200
@@ -53,6 +53,9 @@
 If ``https`` is used in the target, then the tests in the provided
 YAML will default to ``ssl: True``.
 
+Use ``-k`` or ``--insecure`` to **not** validate certificates when making
+``https`` connections.
+
 If a ``-x`` or ``--failfast`` argument is provided then ``gabbi-run`` will
 exit after the first test failure.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi/__init__.py 
new/gabbi-1.49.0/gabbi/__init__.py
--- old/gabbi-1.48.0/gabbi/__init__.py  2019-07-01 16:06:51.000000000 +0200
+++ new/gabbi-1.49.0/gabbi/__init__.py  2019-08-07 16:23:32.000000000 +0200
@@ -12,4 +12,4 @@
 # under the License.
 """See gabbi.driver and gabbbi.case."""
 
-__version__ = '1.48.0'
+__version__ = '1.49.0'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi/case.py 
new/gabbi-1.49.0/gabbi/case.py
--- old/gabbi-1.48.0/gabbi/case.py      2018-10-04 16:20:07.000000000 +0200
+++ new/gabbi-1.49.0/gabbi/case.py      2019-08-07 14:40:23.000000000 +0200
@@ -58,6 +58,7 @@
     'name': '',
     'desc': '',
     'verbose': False,
+    'cert_validate': True,
     'ssl': False,
     'redirects': False,
     'method': 'GET',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi/driver.py 
new/gabbi-1.49.0/gabbi/driver.py
--- old/gabbi-1.48.0/gabbi/driver.py    2019-07-01 16:04:18.000000000 +0200
+++ new/gabbi-1.49.0/gabbi/driver.py    2019-08-07 14:40:23.000000000 +0200
@@ -41,7 +41,7 @@
 def build_tests(path, loader, host=None, port=8001, intercept=None,
                 test_loader_name=None, fixture_module=None,
                 response_handlers=None, content_handlers=None,
-                prefix='', require_ssl=False, url=None,
+                prefix='', require_ssl=False, cert_validate=True, url=None,
                 inner_fixtures=None, verbose=False,
                 use_prior_test=True, safe_yaml=True):
     """Read YAML files from a directory to create tests.
@@ -71,6 +71,9 @@
                            sequence of tests
     :param safe_yaml: If ``True``, recognizes only standard YAML tags and not
                       Python object
+    :param cert_validate: If ``False`` ssl server certificate will be ignored,
+                        further it will not be validated if provided
+                        (set cert_reqs=CERT_NONE to the Http object)
     :type inner_fixtures: List of fixtures.Fixture classes.
     :rtype: TestSuite containing multiple TestSuites (one for each YAML file).
     """
@@ -132,6 +135,12 @@
             else:
                 suite_dict['defaults'] = {'verbose': verbose}
 
+        if not cert_validate:
+            if 'defaults' in suite_dict:
+                suite_dict['defaults']['cert_validate'] = False
+            else:
+                suite_dict['defaults'] = {'cert_validate': False}
+
         if not use_prior_test:
             if 'defaults' in suite_dict:
                 suite_dict['defaults']['use_prior_test'] = use_prior_test
@@ -152,7 +161,7 @@
                       fixture_module=None, response_handlers=None,
                       content_handlers=None, require_ssl=False, url=None,
                       metafunc=None, use_prior_test=True,
-                      inner_fixtures=None, safe_yaml=True):
+                      inner_fixtures=None, safe_yaml=True, cert_validate=True):
     """Generate tests cases for py.test
 
     This uses build_tests to create TestCases and then yields them in
@@ -177,7 +186,7 @@
                         content_handlers=content_handlers,
                         prefix=prefix, require_ssl=require_ssl,
                         url=url, use_prior_test=use_prior_test,
-                        safe_yaml=safe_yaml)
+                        safe_yaml=safe_yaml, cert_validate=cert_validate)
 
     test_list = []
     for test in tests:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi/httpclient.py 
new/gabbi-1.49.0/gabbi/httpclient.py
--- old/gabbi-1.48.0/gabbi/httpclient.py        2019-06-18 10:08:50.000000000 
+0200
+++ new/gabbi-1.49.0/gabbi/httpclient.py        2019-08-07 14:40:23.000000000 
+0200
@@ -22,7 +22,6 @@
 from gabbi.handlers import jsonhandler
 from gabbi import utils
 
-
 # Disable SSL warnings otherwise tests which process stderr will get
 # extra information.
 urllib3.disable_warnings()
@@ -170,13 +169,15 @@
         print(message, file=stream)
 
 
-def get_http(verbose=False, caption=''):
+def get_http(verbose=False, caption='', cert_validate=True):
     """Return an ``Http`` class for making requests."""
+    cert_validation = {'cert_reqs': 'CERT_NONE'} if not cert_validate else {}
+
     if not verbose:
-        return Http(strict=True, ca_certs=certifi.where())
+        return Http(strict=True, ca_certs=certifi.where(), **cert_validation)
 
     headers = False if verbose == 'body' else True
     body = False if verbose == 'headers' else True
     return VerboseHttp(headers=headers, body=body, stream=sys.stdout,
                        caption=caption, colorize=True, strict=True,
-                       ca_certs=certifi.where())
+                       ca_certs=certifi.where(), **cert_validation)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi/runner.py 
new/gabbi-1.49.0/gabbi/runner.py
--- old/gabbi-1.48.0/gabbi/runner.py    2019-06-18 10:08:50.000000000 +0200
+++ new/gabbi-1.49.0/gabbi/runner.py    2019-08-07 14:42:00.000000000 +0200
@@ -84,6 +84,7 @@
     quiet = args.quiet
     verbosity = args.verbosity
     failfast = args.failfast
+    cert_validate = args.cert_validate
     failure = False
     # Keep track of file names that have failures.
     failures = []
@@ -92,7 +93,8 @@
         success = run_suite(sys.stdin, handler_objects, host, port,
                             prefix, force_ssl, failfast,
                             verbosity=verbosity,
-                            safe_yaml=args.safe_yaml, quiet=quiet)
+                            safe_yaml=args.safe_yaml, quiet=quiet,
+                            cert_validate=cert_validate)
         failure = not success
     else:
         for input_file in input_files:
@@ -104,7 +106,8 @@
                                     data_dir=data_dir,
                                     verbosity=verbosity, name=name,
                                     safe_yaml=args.safe_yaml,
-                                    quiet=quiet)
+                                    quiet=quiet,
+                                    cert_validate=cert_validate)
             if not success:
                 failures.append(input_file)
             if not failure:  # once failed, this is considered immutable
@@ -120,7 +123,7 @@
 
 def run_suite(handle, handler_objects, host, port, prefix, force_ssl=False,
               failfast=False, data_dir='.', verbosity=False, name='input',
-              safe_yaml=True, quiet=False):
+              safe_yaml=True, quiet=False, cert_validate=True):
     """Run the tests from the YAML in handle."""
     data = utils.load_yaml(handle, safe=safe_yaml)
     if force_ssl:
@@ -133,6 +136,11 @@
             data['defaults']['verbose'] = verbosity
         else:
             data['defaults'] = {'verbose': verbosity}
+    if not cert_validate:
+        if 'defaults' in data:
+            data['defaults']['cert_validate'] = False
+        else:
+            data['defaults'] = {'cert_validate': False}
 
     loader = unittest.defaultTestLoader
     test_suite = suitemaker.test_suite_from_dict(
@@ -242,6 +250,13 @@
         help='Turn on test verbosity for all tests run in this session.'
     )
     parser.add_argument(
+        '-k', '--insecure',
+        dest='cert_validate',
+        action='store_false',
+        default=True,
+        help='Turn off ssl certificate validation.'
+    )
+    parser.add_argument(
         '--unsafe-yaml',
         dest='safe_yaml',
         action='store_false',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi/suitemaker.py 
new/gabbi-1.49.0/gabbi/suitemaker.py
--- old/gabbi-1.48.0/gabbi/suitemaker.py        2018-08-31 13:30:23.000000000 
+0200
+++ new/gabbi-1.49.0/gabbi/suitemaker.py        2019-08-07 14:40:23.000000000 
+0200
@@ -80,7 +80,8 @@
         self._validate_keys(test, test_name)
 
         http_class = httpclient.get_http(verbose=test['verbose'],
-                                         caption=test['name'])
+                                         caption=test['name'],
+                                         cert_validate=test['cert_validate'])
         if prior_test:
             history = prior_test.history
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi.egg-info/PKG-INFO 
new/gabbi-1.49.0/gabbi.egg-info/PKG-INFO
--- old/gabbi-1.48.0/gabbi.egg-info/PKG-INFO    2019-07-01 16:27:58.000000000 
+0200
+++ new/gabbi-1.49.0/gabbi.egg-info/PKG-INFO    2019-08-07 16:48:13.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: gabbi
-Version: 1.48.0
+Version: 1.49.0
 Summary: Declarative HTTP testing library
 Home-page: https://github.com/cdent/gabbi
 Author: Chris Dent
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/gabbi.egg-info/pbr.json 
new/gabbi-1.49.0/gabbi.egg-info/pbr.json
--- old/gabbi-1.48.0/gabbi.egg-info/pbr.json    2019-07-01 16:27:58.000000000 
+0200
+++ new/gabbi-1.49.0/gabbi.egg-info/pbr.json    2019-08-07 16:48:13.000000000 
+0200
@@ -1 +1 @@
-{"git_version": "c8244db", "is_release": true}
\ No newline at end of file
+{"git_version": "8e02d4d", "is_release": true}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gabbi-1.48.0/tox.ini new/gabbi-1.49.0/tox.ini
--- old/gabbi-1.48.0/tox.ini    2019-07-01 13:15:49.000000000 +0200
+++ new/gabbi-1.49.0/tox.ini    2019-08-07 14:59:57.000000000 +0200
@@ -1,5 +1,5 @@
 [tox]
-minversion = 1.6
+minversion = 3.1.1
 skipsdist = True
 envlist = 
py27,py35,py36,py37,pypy,pep8,limit,failskip,docs,py37-prefix,py37-limit,py37-failskip,py27-pytest,py35-pytest,py36-pytest,py37-pytest
 
@@ -7,6 +7,7 @@
 deps = -r{toxinidir}/requirements.txt
        -r{toxinidir}/test-requirements.txt
 whitelist_externals = rm
+usedevelop = True
 install_command = pip install --no-cache -U {opts} {packages}
 commands =
     stestr run {posargs}
@@ -52,7 +53,9 @@
 commands = {toxinidir}/test-failskip.sh
 
 [testenv:cover]
-setenv = PYTHON=coverage run --source gabbi --parallel-mode
+setenv =
+    {[testenv]setenv}
+    PYTHON=coverage run --source gabbi --parallel-mode
 commands =
     coverage erase
     find . -type f -name "*.pyc" -delete


Reply via email to