Hello community, here is the log from the commit of package python-rfc6555.11976 for openSUSE:Leap:15.1:Update checked in at 2020-02-22 16:12:37 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.1:Update/python-rfc6555.11976 (Old) and /work/SRC/openSUSE:Leap:15.1:Update/.python-rfc6555.11976.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-rfc6555.11976" Sat Feb 22 16:12:37 2020 rev:1 rq:774888 version:0.0.0 Changes: -------- New Changes file: --- /dev/null 2019-12-19 10:12:34.003146842 +0100 +++ /work/SRC/openSUSE:Leap:15.1:Update/.python-rfc6555.11976.new.26092/python-rfc6555.changes 2020-02-22 16:12:37.642521743 +0100 @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Wed Jan 22 07:55:52 UTC 2020 - Tomáš Chvátal <[email protected]> + +- Add patch to properly pull in dependencies only when needed: + * dependencies.patch + +------------------------------------------------------------------- +Thu Jan 16 10:20:22 UTC 2020 - [email protected] + +- Init package at version 0.0.0 New: ---- dependencies.patch python-rfc6555.changes python-rfc6555.spec rfc6555-0.0.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-rfc6555.spec ++++++ # # spec file for package python-rfc6555 # # Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-rfc6555 Version: 0.0.0 Release: 0 Summary: Python implementation of the Happy Eyeballs Algorithm described in RFC 6555 License: Apache-2.0 Group: Development/Languages/Python URL: https://github.com/sethmlarson/rfc6555 Source: https://files.pythonhosted.org/packages/source/r/rfc6555/rfc6555-%{version}.tar.gz Patch0: dependencies.patch BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch %if %{with python2} BuildRequires: python-mock BuildRequires: python-selectors2 %endif %ifpython2 Requires: python-selectors2 %endif %python_subpackages %description This module provided with a single file and dead-simple API for RFC 6555 "Happy Eyeballs: Success with Dual-Stack Hosts" <https://tools.ietf.org/html/rfc6555> to allow easy vendoring and integration into other projects. %prep %setup -q -n rfc6555-%{version} %patch0 -p1 %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check # test_create_connection_has_proper_timeout - online tests %pytest -k 'not test_create_connection_has_proper_timeout' %files %{python_files} %doc CHANGES.rst README.rst %license LICENSE %{python_sitelib}/* %changelog ++++++ dependencies.patch ++++++ >From b2de6951cdae722920671a690c0c15b5f9a06d60 Mon Sep 17 00:00:00 2001 From: Kurt Mosiejczuk <[email protected]> Date: Thu, 22 Aug 2019 18:15:23 -0400 Subject: [PATCH 1/2] Only use selectors2 if needed (Python < 3.4) --- rfc6555.py | 5 ++++- setup.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/rfc6555.py b/rfc6555.py index 8298597..222fe6c 100644 --- a/rfc6555.py +++ b/rfc6555.py @@ -16,7 +16,10 @@ import errno import socket -from selectors2 import DefaultSelector, EVENT_WRITE +try: + from selectors import DefaultSelector, EVENT_WRITE +except (ImportError, AttributeError): + from selectors2 import DefaultSelector, EVENT_WRITE # time.perf_counter() is defined in Python 3.3 try: diff --git a/setup.py b/setup.py index ce6517a..f6f087a 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,9 @@ author_email='[email protected]', maintainer='Seth Michael Larson', maintainer_email='[email protected]', - install_requires=['selectors2'], + install_requires=[ + 'selectors2;python_version<"3.4"' + ], py_modules=['rfc6555'], zip_safe=False, classifiers=['Intended Audience :: Developers', >From ba7f665a613b2450b829b231a95e936039686964 Mon Sep 17 00:00:00 2001 From: Kurt Mosiejczuk <[email protected]> Date: Thu, 12 Sep 2019 18:25:37 -0400 Subject: [PATCH 2/2] Make tests use mock built into Python 3.x if possible --- tests/test_create_connection.py | 6 +++++- tests/test_ipv6.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/test_create_connection.py b/tests/test_create_connection.py index fe38026..0603546 100644 --- a/tests/test_create_connection.py +++ b/tests/test_create_connection.py @@ -1,4 +1,8 @@ -import mock +try: + from unittest import mock +except (ImportError, AttributeError): + import mock + import pytest import socket import rfc6555 diff --git a/tests/test_ipv6.py b/tests/test_ipv6.py index 3ee8564..d58286c 100644 --- a/tests/test_ipv6.py +++ b/tests/test_ipv6.py @@ -1,7 +1,11 @@ import socket -import mock import rfc6555 +try: + from unittest import mock +except (ImportError, AttributeError): + import mock + def test_ipv6_available(): assert rfc6555._detect_ipv6()
