Hello community,
here is the log from the commit of package python-sortinghat for
openSUSE:Factory checked in at 2019-12-24 14:29:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-sortinghat (Old)
and /work/SRC/openSUSE:Factory/.python-sortinghat.new.6675 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-sortinghat"
Tue Dec 24 14:29:51 2019 rev:3 rq:755912 version:0.7.6
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-sortinghat/python-sortinghat.changes
2018-12-24 11:44:11.973302788 +0100
+++
/work/SRC/openSUSE:Factory/.python-sortinghat.new.6675/python-sortinghat.changes
2019-12-24 14:29:56.314575034 +0100
@@ -1,0 +2,24 @@
+Fri Dec 6 18:01:12 UTC 2019 - [email protected]
+
+- run the testsuite against test mysqld server
+
+-------------------------------------------------------------------
+Mon Sep 23 13:57:05 UTC 2019 - [email protected]
+
+- version update to 0.7.6
+ **NOTICE: Database schema generated by SortingHat < 0.7.0 is still
+ compatible but older versions can have problems inserting UTF-8
+ characters of 4 bytes.
+ **Python 2.7 is no longer supported.
+ **NOTICE: Database schema generated by SortingHat < 0.6.0 are no longer
+ compatible. Please check "Compatibility between versions" section from
+ README.md file**
+ **NOTICE: Database schema generated by SortingHat < 0.5.0 are no longer
+ compatible. Please check "Compatibility between versions" section from
+ README.md file**
+- added patches
+ https://github.com/chaoss/grimoirelab-sortinghat/issues/121
+ + python-sortinghat-gh-121-workaround.patch
+- python3-only package
+
+-------------------------------------------------------------------
Old:
----
sortinghat-0.4.3.tar.gz
New:
----
python-sortinghat-gh-121-workaround.patch
sortinghat-0.7.6.tar.gz
tests.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-sortinghat.spec ++++++
--- /var/tmp/diff_new_pack.s3MkKC/_old 2019-12-24 14:29:57.582575648 +0100
+++ /var/tmp/diff_new_pack.s3MkKC/_new 2019-12-24 14:29:57.590575651 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-sortinghat
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,32 +17,46 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
-%bcond_without test
+%define skip_python2 1
Name: python-sortinghat
-Version: 0.4.3
+Version: 0.7.6
Release: 0
Summary: A tool to manage identities
License: GPL-3.0-only
Group: Development/Languages/Python
-Url: https://github.com/grimoirelab/sortinghat
-Source:
https://files.pythonhosted.org/packages/source/s/sortinghat/sortinghat-%{version}.tar.gz
+URL: https://github.com/grimoirelab/sortinghat
+Source0:
https://files.pythonhosted.org/packages/source/s/sortinghat/sortinghat-%{version}.tar.gz
+#
https://github.com/chaoss/grimoirelab-sortinghat/issues/207#issuecomment-534094890
+Source1: tests.tar.bz2
+# workaround for https://github.com/chaoss/grimoirelab-sortinghat/issues/121
+# reverting
https://github.com/chaoss/grimoirelab-sortinghat/commit/5f69ed899c94584de17d47b37152098f64012e10
+# plus, test_is_top_domain_invalid_type and test_is_bot_invalid_type tests
exception thrown from
+# CoerceToBool(), thus disabling
+Patch0: python-sortinghat-gh-121-workaround.patch
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
-%if %{with test}
+# SECTION test requirements
BuildRequires: %{python_module Jinja2}
-BuildRequires: %{python_module PyMySQL}
+BuildRequires: %{python_module PyMySQL >= 0.7.0}
BuildRequires: %{python_module PyYAML >= 3.12}
-BuildRequires: %{python_module SQLAlchemy >= 1.0.0}
+BuildRequires: %{python_module SQLAlchemy >= 1.2}
+BuildRequires: %{python_module httpretty >= 0.9.5}
+BuildRequires: %{python_module mock}
BuildRequires: %{python_module pandas >= 0.17}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-dateutil >= 2.6.0}
-%endif
+BuildRequires: %{python_module requests >= 2.9}
+BuildRequires: mariadb-rpm-macros
+# /SECTION
BuildRequires: fdupes
Requires: python-Jinja2
-Requires: python-PyMySQL
+Requires: python-PyMySQL >= 0.7.0
Requires: python-PyYAML >= 3.12
-Requires: python-SQLAlchemy >= 1.0.0
-Requires: python-pandas >= 0.17
+Requires: python-SQLAlchemy >= 1.2
+Requires: python-pandas >= 0.18.1
Requires: python-python-dateutil >= 2.6.0
+Requires: python-requests >= 2.9
+Requires: python-urllib3 >= 1.22
BuildArch: noarch
%python_subpackages
@@ -73,7 +87,9 @@
into unique identities (and maybe affiliate them).
%prep
-%setup -q -n sortinghat-%{version}
+%setup -q -a1 -n sortinghat-%{version}
+%patch0 -p1
+sed -i "s/\('pandoc'\|'wheel',\)//" setup.py
%build
%python_build
@@ -82,6 +98,31 @@
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
+%check
+exit_code=0
+user=abuild
+pass=abuildpw
+port=63306
+run_dir=/tmp/mysql
+#
+# start the mariadb server
+#
+%mysql_testserver_start -u $user -p $pass -t $port
+#
+# running the test
+#
+cp tests/tests.conf.sample tests/tests.conf
+sed -i -e "s/3306/$port/" \
+ -e "s/\(user=\)/\1$user/" \
+ -e "s/\(password=\)/\1$pass/" tests/tests.conf
+sed -i -e "s/'3306'/self.kwargs['port']/" tests/test_cmd_init.py
+%{python_expand $python setup.py test || exit_code=1}
+#
+# stopping mariadb
+#
+%mysql_testserver_stop
+exit $exit_code
+
%files %{python_files}
%doc NEWS README.md
%python3_only %{_bindir}/mg2sh
++++++ python-sortinghat-gh-121-workaround.patch ++++++
Index: sortinghat-0.7.6/sortinghat/db/model.py
===================================================================
--- sortinghat-0.7.6.orig/sortinghat/db/model.py 2019-06-05
00:26:10.000000000 +0200
+++ sortinghat-0.7.6/sortinghat/db/model.py 2019-09-23 15:30:11.325722141
+0200
@@ -95,7 +95,7 @@ class Domain(ModelBase):
id = Column(Integer, primary_key=True)
domain = Column(String(128), nullable=False)
- is_top_domain = Column(CoerceToBool(name='top_domain_check'),
default=False)
+ is_top_domain = Column(Boolean(name='top_domain_check'), default=False)
organization_id = Column(Integer,
ForeignKey('organizations.id', ondelete='CASCADE',
onupdate='CASCADE'),
@@ -219,7 +219,7 @@ class Profile(ModelBase):
email = Column(String(128))
gender = Column(String(32))
gender_acc = Column(Integer())
- is_bot = Column(CoerceToBool(name='is_bot_check'), default=False)
+ is_bot = Column(Boolean(name='is_bot_check'), default=False)
country_code = Column(String(2),
ForeignKey('countries.code', ondelete='CASCADE'))
Index: sortinghat-0.7.6/tests/test_model.py
===================================================================
--- sortinghat-0.7.6.orig/tests/test_model.py 2019-06-17 12:26:18.963611797
+0200
+++ sortinghat-0.7.6/tests/test_model.py 2019-09-23 15:31:18.366114007
+0200
@@ -210,19 +210,6 @@ class TestDomain(TestCaseBase):
self.session.add(dom1)
self.session.commit()
- def test_is_top_domain_invalid_type(self):
- """Check invalid values on top_domain bool collumn"""
-
- with self.assertRaisesRegex(StatementError, INVALID_DATATYPE_ERROR):
- org1 = Organization(name='Example')
- self.session.add(org1)
-
- dom1 = Domain(domain='example.com', is_top_domain='True')
- dom1.organization = org1
-
- self.session.add(dom1)
- self.session.commit()
-
def test_to_dict(self):
"""Test output of to_dict() method"""
@@ -474,18 +461,6 @@ class TestProfile(TestCaseBase):
self.session.add(prf2)
self.session.commit()
- def test_is_bot_invalid_type(self):
- """Check invalid values on is_bot bool column"""
-
- with self.assertRaisesRegex(StatementError, INVALID_DATATYPE_ERROR):
- uid = UniqueIdentity(uuid='John Smith')
- self.session.add(uid)
-
- prf = Profile(uuid='John Smith', name='John Smith', is_bot='True')
-
- self.session.add(prf)
- self.session.commit()
-
def test_to_dict(self):
"""Test output of to_dict() method"""
++++++ sortinghat-0.4.3.tar.gz -> sortinghat-0.7.6.tar.gz ++++++
++++ 6387 lines of diff (skipped)