Hello community, here is the log from the commit of package python-pika for openSUSE:Factory checked in at 2019-03-14 15:00:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pika (Old) and /work/SRC/openSUSE:Factory/.python-pika.new.28833 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pika" Thu Mar 14 15:00:34 2019 rev:11 rq:684704 version:0.13.1 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pika/python-pika.changes 2019-02-06 15:48:24.491223211 +0100 +++ /work/SRC/openSUSE:Factory/.python-pika.new.28833/python-pika.changes 2019-03-14 15:01:16.575696403 +0100 @@ -1,0 +2,6 @@ +Wed Mar 13 14:08:31 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Update to 0.13.1: + * URLParameters with SSL options not working + +------------------------------------------------------------------- Old: ---- 0.13.0.tar.gz New: ---- 0.13.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pika.spec ++++++ --- /var/tmp/diff_new_pack.orDZxj/_old 2019-03-14 15:01:17.979696126 +0100 +++ /var/tmp/diff_new_pack.orDZxj/_new 2019-03-14 15:01:18.015696119 +0100 @@ -19,7 +19,7 @@ %define mod_name pika %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-%{mod_name} -Version: 0.13.0 +Version: 0.13.1 Release: 0 Summary: Pika Python AMQP Client Library License: BSD-3-Clause @@ -60,9 +60,7 @@ %python_expand %fdupes %{buildroot}%{$python_sitelib}/*.egg-info %check -for i in $(seq 5) ; do %python_expand PYTHONPATH="%{buildroot}%{$python_sitelib}"% nosetests-%{$python_bin_suffix} tests/ -done %files %{python_files} %doc README.rst CHANGELOG.rst ++++++ 0.13.0.tar.gz -> 0.13.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-0.13.0/CHANGELOG.rst new/pika-0.13.1/CHANGELOG.rst --- old/pika-0.13.0/CHANGELOG.rst 2019-01-17 18:05:25.000000000 +0100 +++ new/pika-0.13.1/CHANGELOG.rst 2019-03-07 21:50:58.000000000 +0100 @@ -1,6 +1,11 @@ Version History =============== +0.13.1 2019-03-07 +----------------- + +`GitHub milestone <https://github.com/pika/pika/milestone/14>`_ + 0.13.0 2019-01-17 ----------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-0.13.0/docs/version_history.rst new/pika-0.13.1/docs/version_history.rst --- old/pika-0.13.0/docs/version_history.rst 2019-01-17 18:05:25.000000000 +0100 +++ new/pika-0.13.1/docs/version_history.rst 2019-03-07 21:50:58.000000000 +0100 @@ -1,6 +1,11 @@ Version History =============== +0.13.1 2019-03-07 +----------------- + +`GitHub milestone <https://github.com/pika/pika/milestone/14>`_ + 0.13.0 2019-01-17 ----------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-0.13.0/pika/__init__.py new/pika-0.13.1/pika/__init__.py --- old/pika-0.13.0/pika/__init__.py 2019-01-17 18:05:25.000000000 +0100 +++ new/pika-0.13.1/pika/__init__.py 2019-03-07 21:50:58.000000000 +0100 @@ -1,4 +1,4 @@ -__version__ = '0.13.0' +__version__ = '0.13.1' import logging from logging import NullHandler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-0.13.0/pika/connection.py new/pika-0.13.1/pika/connection.py --- old/pika-0.13.0/pika/connection.py 2019-01-17 18:05:25.000000000 +0100 +++ new/pika-0.13.1/pika/connection.py 2019-03-07 21:50:58.000000000 +0100 @@ -955,57 +955,17 @@ 'Specified ssl_options=None URL arg is inconsistent with ' 'the specified https URL scheme.') else: - # Note: this is the deprecated wrap_socket signature and info: - # - # Internally, function creates a SSLContext with protocol - # ssl_version and SSLContext.options set to cert_reqs. - # If parameters keyfile, certfile, ca_certs or ciphers are set, - # then the values are passed to SSLContext.load_cert_chain(), - # SSLContext.load_verify_locations(), and SSLContext.set_ciphers(). - # - # ssl.wrap_socket(sock, - # keyfile=None, - # certfile=None, - # server_side=False, # Not URL-supported - # cert_reqs=CERT_NONE, # Not URL-supported - # ssl_version=PROTOCOL_TLS, # Not URL-supported - # ca_certs=None, - # do_handshake_on_connect=True, # Not URL-supported - # suppress_ragged_eofs=True, # Not URL-supported - # ciphers=None - cxt = None - if 'ca_certs' in opts: - opt_ca_certs = opts['ca_certs'] - if os.path.isfile(opt_ca_certs): - cxt = ssl.create_default_context(cafile=opt_ca_certs) - elif os.path.isdir(opt_ca_certs): - cxt = ssl.create_default_context(capath=opt_ca_certs) - else: - LOGGER.warning('ca_certs is specified via ssl_options but ' - 'is neither a valid file nor directory: "%s"', - opt_ca_certs) - - if 'certfile' in opts: - if os.path.isfile(opts['certfile']): - keyfile = opts.get('keyfile') - password = opts.get('password') - cxt.load_cert_chain(opts['certfile'], keyfile, password) - else: - LOGGER.warning('certfile is specified via ssl_options but ' - 'is not a valid file: "%s"', - opts['certfile']) - - if 'ciphers' in opts: - opt_ciphers = opts['ciphers'] - if opt_ciphers is not None: - cxt.set_ciphers(opt_ciphers) - else: - LOGGER.warning('ciphers specified in ssl_options but ' - 'evaluates to None') - - server_hostname = opts.get('server_hostname') - self.ssl_options = pika.SSLOptions(context=cxt, - server_hostname=server_hostname) + self.ssl_options = pika.SSLOptions( + keyfile=opts.get('keyfile'), + key_password=opts.get('key_password') or opts.get('password'), + certfile=opts.get('certfile'), + verify_mode=opts.get('verify_mode') or ssl.CERT_NONE, + ssl_version=opts.get('ssl_version') or ssl.PROTOCOL_TLSv1, + cafile=opts.get('cafile'), + capath=opts.get('capath'), + cadata=opts.get('cadata'), + ciphers=opts.get('ciphers'), + server_hostname=opts.get('server_hostname')) def _set_url_tcp_options(self, value): """Deserialize and apply the corresponding query string arg""" @@ -1042,7 +1002,7 @@ certfile=None, server_side=False, verify_mode=ssl.CERT_NONE, - ssl_version=ssl.PROTOCOL_SSLv23, + ssl_version=ssl.PROTOCOL_TLSv1, cafile=None, capath=None, cadata=None, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-0.13.0/setup.py new/pika-0.13.1/setup.py --- old/pika-0.13.0/setup.py 2019-01-17 18:05:25.000000000 +0100 +++ new/pika-0.13.1/setup.py 2019-03-07 21:50:58.000000000 +0100 @@ -16,7 +16,7 @@ setuptools.setup( name='pika', - version='0.13.0', + version='0.13.1', description='Pika Python AMQP Client Library', long_description=open('README.rst').read(), maintainer='Gavin M. Roy', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pika-0.13.0/tests/acceptance/async_test_base.py new/pika-0.13.1/tests/acceptance/async_test_base.py --- old/pika-0.13.0/tests/acceptance/async_test_base.py 2019-01-17 18:05:25.000000000 +0100 +++ new/pika-0.13.1/tests/acceptance/async_test_base.py 2019-03-07 21:50:58.000000000 +0100 @@ -24,6 +24,13 @@ from pika.adapters import select_connection +def enable_tls(): + if 'PIKA_TEST_TLS' in os.environ and \ + os.environ['PIKA_TEST_TLS'].lower() == 'true': + return True + return False + + class AsyncTestCase(unittest.TestCase): DESCRIPTION = "" ADAPTER = None @@ -31,29 +38,15 @@ def setUp(self): self.logger = logging.getLogger(self.__class__.__name__) - self.parameters = pika.ConnectionParameters( - host='localhost', - port=5672) - if self.should_test_tls(): + if enable_tls(): self.logger.info('testing using TLS/SSL connection to port 5671') - self.parameters.port = 5671 - self.parameters.ssl = True - self.parameters.ssl_options = dict( - ssl_version=ssl.PROTOCOL_TLSv1, - ca_certs="testdata/certs/ca_certificate.pem", - keyfile="testdata/certs/client_key.pem", - certfile="testdata/certs/client_certificate.pem", - cert_reqs=ssl.CERT_REQUIRED) + url = 'amqps://localhost:5671/%2F?ssl_options=%7B%27ca_certs%27%3A%27testdata%2Fcerts%2Fca_certificate.pem%27%2C%27keyfile%27%3A%27testdata%2Fcerts%2Fclient_key.pem%27%2C%27certfile%27%3A%27testdata%2Fcerts%2Fclient_certificate.pem%27%7D' + self.parameters = pika.URLParameters(url) + else: + self.parameters = pika.ConnectionParameters(host='localhost', port=5672) self._timed_out = False super(AsyncTestCase, self).setUp() - @staticmethod - def should_test_tls(): - if 'PIKA_TEST_TLS' in os.environ and \ - os.environ['PIKA_TEST_TLS'].lower() == 'true': - return True - return False - def tearDown(self): self._stop()
