forked from pool/python-sortinghat
- Update to 0.19.1:
* Fix "Table 'django_session' doesn't exist" error * Unify identities with same source * Use correct base URL for login and change password API calls (#851) * Display individual's most recent organization * CSRF token is only required on web requests * Link to profile in individual cards (#837) * Open calendar to the side of the date input (#838) * Improved loading time when looking for organizations * Gitdm identities importer * Fix individual page not loading * Recommendations for individuals modified after a given date (#813) * Add individual to workspace from their profile page (#816) * Cache individuals table data (#821) * Strict criteria for merge recommendations (#812) * Text field to update enrollment dates (#819) * Improved organization selector (#820) * API method to create a scheduled task * Manage app settings from the user interface * Remove tasks that fail to be scheduled * Add Python 3.9 and drop 3.7 support * Sub-domain affiliation error (#805) - Refresh patches. - Add patch use-correct-assertion-methods.patch: * Use non-deprecated and non-removed assertion methods. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-sortinghat?expand=0&rev=40
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
Index: grimoirelab-sortinghat-0.12.0/tests/test_schema.py
|
Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- grimoirelab-sortinghat-0.12.0.orig/tests/test_schema.py
|
--- grimoirelab-sortinghat-0.19.1.orig/tests/test_schema.py
|
||||||
+++ grimoirelab-sortinghat-0.12.0/tests/test_schema.py
|
+++ grimoirelab-sortinghat-0.19.1/tests/test_schema.py
|
||||||
@@ -22,6 +22,7 @@
|
@@ -22,6 +22,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ Index: grimoirelab-sortinghat-0.12.0/tests/test_schema.py
|
|||||||
def test_page_size_negative(self):
|
def test_page_size_negative(self):
|
||||||
"""Check if it fails when `pageSize` is a negative number"""
|
"""Check if it fails when `pageSize` is a negative number"""
|
||||||
|
|
||||||
@@ -6343,7 +6345,8 @@ class TestAddIdentityMutation(django.tes
|
@@ -6367,7 +6369,8 @@ class TestAddIdentityMutation(django.tes
|
||||||
variables=params)
|
variables=params)
|
||||||
|
|
||||||
msg = executed['errors'][0]['message']
|
msg = executed['errors'][0]['message']
|
||||||
@@ -28,7 +28,7 @@ Index: grimoirelab-sortinghat-0.12.0/tests/test_schema.py
|
|||||||
|
|
||||||
def test_add_identity_name_none(self):
|
def test_add_identity_name_none(self):
|
||||||
"""Check if the username is set to the profile when no name is provided"""
|
"""Check if the username is set to the profile when no name is provided"""
|
||||||
@@ -8139,7 +8142,8 @@ class TestWithdrawMutation(django.test.T
|
@@ -8163,7 +8166,8 @@ class TestWithdrawMutation(django.test.T
|
||||||
variables=params)
|
variables=params)
|
||||||
|
|
||||||
msg = executed['errors'][0]['message']
|
msg = executed['errors'][0]['message']
|
||||||
@@ -38,7 +38,7 @@ Index: grimoirelab-sortinghat-0.12.0/tests/test_schema.py
|
|||||||
|
|
||||||
def test_non_existing_organization(self):
|
def test_non_existing_organization(self):
|
||||||
"""Check if it fails when the organization does not exist"""
|
"""Check if it fails when the organization does not exist"""
|
||||||
@@ -9771,6 +9775,7 @@ class TestUnifyMutation(django.test.Test
|
@@ -9850,6 +9854,7 @@ class TestUnifyMutation(django.test.Test
|
||||||
source='scm',
|
source='scm',
|
||||||
uuid=self.jrae.uuid)
|
uuid=self.jrae.uuid)
|
||||||
|
|
||||||
@@ -46,18 +46,18 @@ Index: grimoirelab-sortinghat-0.12.0/tests/test_schema.py
|
|||||||
@unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4')
|
@unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4')
|
||||||
def test_unify(self, mock_job_id_gen):
|
def test_unify(self, mock_job_id_gen):
|
||||||
"""Check if unify is applied for the specified individuals"""
|
"""Check if unify is applied for the specified individuals"""
|
||||||
@@ -9842,6 +9847,7 @@ class TestUnifyMutation(django.test.Test
|
@@ -9922,6 +9927,7 @@ class TestUnifyMutation(django.test.Test
|
||||||
id5 = identities[4]
|
id5 = identities[4]
|
||||||
self.assertEqual(id5, self.jr2)
|
self.assertEqual(id5, self.jr2)
|
||||||
|
|
||||||
+ @unittest.skip("Broken")
|
+ @unittest.skip("Broken")
|
||||||
@unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4')
|
@unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4')
|
||||||
def test_unify_exclude(self, mock_job_id_gen):
|
def test_unify_last_modified(self, mock_job_id_gen):
|
||||||
"""Check if unify is applied for the specified individuals"""
|
"""Check if unify is applied only for the individuals modified after a date"""
|
||||||
Index: grimoirelab-sortinghat-0.12.0/tests/cli/test_cmd_config.py
|
Index: grimoirelab-sortinghat-0.19.1/tests/cli/test_cmd_config.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- grimoirelab-sortinghat-0.12.0.orig/tests/cli/test_cmd_config.py
|
--- grimoirelab-sortinghat-0.19.1.orig/tests/cli/test_cmd_config.py
|
||||||
+++ grimoirelab-sortinghat-0.12.0/tests/cli/test_cmd_config.py
|
+++ grimoirelab-sortinghat-0.19.1/tests/cli/test_cmd_config.py
|
||||||
@@ -41,10 +41,10 @@ MOCK_CONFIG_FILEPATH = os.path.join(os.p
|
@@ -41,10 +41,10 @@ MOCK_CONFIG_FILEPATH = os.path.join(os.p
|
||||||
|
|
||||||
|
|
||||||
@@ -71,16 +71,16 @@ Index: grimoirelab-sortinghat-0.12.0/tests/cli/test_cmd_config.py
|
|||||||
|
|
||||||
|
|
||||||
class TestInitConfig(unittest.TestCase):
|
class TestInitConfig(unittest.TestCase):
|
||||||
Index: grimoirelab-sortinghat-0.12.0/sortinghat/core/decorators.py
|
Index: grimoirelab-sortinghat-0.19.1/sortinghat/core/decorators.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- grimoirelab-sortinghat-0.12.0.orig/sortinghat/core/decorators.py
|
--- grimoirelab-sortinghat-0.19.1.orig/sortinghat/core/decorators.py
|
||||||
+++ grimoirelab-sortinghat-0.12.0/sortinghat/core/decorators.py
|
+++ grimoirelab-sortinghat-0.19.1/sortinghat/core/decorators.py
|
||||||
@@ -44,6 +44,8 @@ check_auth = user_passes_test(
|
@@ -68,6 +68,8 @@ check_auth = user_passes_test(lambda u:
|
||||||
|
|
||||||
|
|
||||||
def check_permissions(perms):
|
def check_permissions(perms):
|
||||||
+ if isinstance(perms, str):
|
+ if isinstance(perms, str):
|
||||||
+ perms = (perms,)
|
+ perms = (perms,)
|
||||||
return user_passes_test(
|
return user_passes_test(lambda u: u.has_perms(perms))
|
||||||
lambda u: u.has_perms(perms) or not settings.SORTINGHAT_AUTHENTICATION_REQUIRED
|
|
||||||
)
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
Index: grimoirelab-sortinghat-0.11.1/config/settings/testing.py
|
Index: grimoirelab-sortinghat-0.19.1/config/settings/testing.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- grimoirelab-sortinghat-0.11.1.orig/config/settings/testing.py
|
--- grimoirelab-sortinghat-0.19.1.orig/config/settings/testing.py
|
||||||
+++ grimoirelab-sortinghat-0.11.1/config/settings/testing.py
|
+++ grimoirelab-sortinghat-0.19.1/config/settings/testing.py
|
||||||
@@ -1,3 +1,4 @@
|
@@ -1,3 +1,4 @@
|
||||||
+import os
|
+import os
|
||||||
import sys
|
import sys
|
||||||
@@ -30,10 +30,10 @@ Index: grimoirelab-sortinghat-0.11.1/config/settings/testing.py
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Index: grimoirelab-sortinghat-0.11.1/config/settings/testing_tenant.py
|
Index: grimoirelab-sortinghat-0.19.1/config/settings/testing_tenant.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- grimoirelab-sortinghat-0.11.1.orig/config/settings/testing_tenant.py
|
--- grimoirelab-sortinghat-0.19.1.orig/config/settings/testing_tenant.py
|
||||||
+++ grimoirelab-sortinghat-0.11.1/config/settings/testing_tenant.py
|
+++ grimoirelab-sortinghat-0.19.1/config/settings/testing_tenant.py
|
||||||
@@ -5,8 +5,8 @@ from .testing import SQL_MODE, DATABASES
|
@@ -5,8 +5,8 @@ from .testing import SQL_MODE, DATABASES
|
||||||
DATABASES.update({
|
DATABASES.update({
|
||||||
tenant: {
|
tenant: {
|
||||||
|
@@ -1,3 +1,32 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 6 04:49:48 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 0.19.1:
|
||||||
|
* Fix "Table 'django_session' doesn't exist" error
|
||||||
|
* Unify identities with same source
|
||||||
|
* Use correct base URL for login and change password API calls (#851)
|
||||||
|
* Display individual's most recent organization
|
||||||
|
* CSRF token is only required on web requests
|
||||||
|
* Link to profile in individual cards (#837)
|
||||||
|
* Open calendar to the side of the date input (#838)
|
||||||
|
* Improved loading time when looking for organizations
|
||||||
|
* Gitdm identities importer
|
||||||
|
* Fix individual page not loading
|
||||||
|
* Recommendations for individuals modified after a given date (#813)
|
||||||
|
* Add individual to workspace from their profile page (#816)
|
||||||
|
* Cache individuals table data (#821)
|
||||||
|
* Strict criteria for merge recommendations (#812)
|
||||||
|
* Text field to update enrollment dates (#819)
|
||||||
|
* Improved organization selector (#820)
|
||||||
|
* API method to create a scheduled task
|
||||||
|
* Manage app settings from the user interface
|
||||||
|
* Remove tasks that fail to be scheduled
|
||||||
|
* Add Python 3.9 and drop 3.7 support
|
||||||
|
* Sub-domain affiliation error (#805)
|
||||||
|
- Refresh patches.
|
||||||
|
- Add patch use-correct-assertion-methods.patch:
|
||||||
|
* Use non-deprecated and non-removed assertion methods.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 27 06:07:58 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
Thu Jul 27 06:07:58 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-sortinghat
|
# spec file for package python-sortinghat
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-sortinghat
|
Name: python-sortinghat
|
||||||
Version: 0.12.0
|
Version: 0.19.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A tool to manage identities
|
Summary: A tool to manage identities
|
||||||
License: GPL-3.0-only
|
License: GPL-3.0-only
|
||||||
@@ -26,6 +26,9 @@ Source: https://github.com/chaoss/grimoirelab-sortinghat/archive/refs/ta
|
|||||||
# PATCH-FIX-OPENSUSE Allow overridding the database config
|
# PATCH-FIX-OPENSUSE Allow overridding the database config
|
||||||
Patch0: allow-database-config-overrides.patch
|
Patch0: allow-database-config-overrides.patch
|
||||||
Patch1: add-missing-format-calls.patch
|
Patch1: add-missing-format-calls.patch
|
||||||
|
# PATCH-FIX-UPSTREAM gh#chaoss/grimoirelab-sortinghat#855
|
||||||
|
Patch2: use-correct-assertion-methods.patch
|
||||||
|
BuildRequires: %{python_module base >= 3.9}
|
||||||
BuildRequires: %{python_module pip}
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module poetry-core}
|
BuildRequires: %{python_module poetry-core}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
@@ -45,14 +48,17 @@ Requires: python-django-treebeard >= 4.5
|
|||||||
Requires: python-graphene >= 2.1.5
|
Requires: python-graphene >= 2.1.5
|
||||||
Requires: python-graphene-django
|
Requires: python-graphene-django
|
||||||
Requires: python-grimoirelab-toolkit >= 0.3
|
Requires: python-grimoirelab-toolkit >= 0.3
|
||||||
|
Requires: python-importlib-resources
|
||||||
Requires: python-mysqlclient >= 2.0
|
Requires: python-mysqlclient >= 2.0
|
||||||
|
Requires: python-numpy
|
||||||
Requires: python-pandas >= 1.3
|
Requires: python-pandas >= 1.3
|
||||||
Requires: python-python-dateutil >= 2.8.0
|
Requires: python-python-dateutil >= 2.8.0
|
||||||
Requires: python-requests >= 2.7
|
Requires: python-requests >= 2.7
|
||||||
Requires: python-rq
|
Requires: python-rq
|
||||||
|
Requires: python-setuptools
|
||||||
Requires: python-sgqlc
|
Requires: python-sgqlc
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun):update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module Jinja2 >= 3.1}
|
BuildRequires: %{python_module Jinja2 >= 3.1}
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:738e425e3031a4eecf502110ac550103e67eb96f10982dac8fe832b04c1af7a5
|
|
||||||
size 2420879
|
|
3
sortinghat-0.19.1.tar.gz
Normal file
3
sortinghat-0.19.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:20ec93c4c5951bfeb2cbd5f750209eaf1aa3ab57228676c98ebc00e2f92abc05
|
||||||
|
size 2441873
|
53
use-correct-assertion-methods.patch
Normal file
53
use-correct-assertion-methods.patch
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
From ad69dc80b8e8b4df49a3fe14e4a05ec31c7a67e8 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
Date: Tue, 6 Feb 2024 15:22:33 +1100
|
||||||
|
Subject: [PATCH] Switch to self.assertRaisesRegex()
|
||||||
|
|
||||||
|
assertRaisesRegexp() is a deprecated (and as of Python 3.12, removed)
|
||||||
|
alias of assertRaisesRegex(). Switch to it to avoid future problems.
|
||||||
|
|
||||||
|
Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
|
||||||
|
---
|
||||||
|
tests/test_aux.py | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/test_aux.py b/tests/test_aux.py
|
||||||
|
index 86e421422..91a1c29c3 100644
|
||||||
|
--- a/tests/test_aux.py
|
||||||
|
+++ b/tests/test_aux.py
|
||||||
|
@@ -338,7 +338,7 @@ def test_dates_out_of_bounds(self):
|
||||||
|
|
||||||
|
expected = DATE_OUT_OF_BOUNDS_ERROR.format(type='start',
|
||||||
|
date=r'1800-01-01 00:00:00\+00:00')
|
||||||
|
- with self.assertRaisesRegexp(ValueError, expected):
|
||||||
|
+ with self.assertRaisesRegex(ValueError, expected):
|
||||||
|
_ = [r for r in merge_datetime_ranges(dates)]
|
||||||
|
|
||||||
|
# Case 2
|
||||||
|
@@ -349,7 +349,7 @@ def test_dates_out_of_bounds(self):
|
||||||
|
|
||||||
|
expected = DATE_OUT_OF_BOUNDS_ERROR.format(type='end',
|
||||||
|
date=r'2100-02-01 00:00:00\+00:00')
|
||||||
|
- with self.assertRaisesRegexp(ValueError, expected):
|
||||||
|
+ with self.assertRaisesRegex(ValueError, expected):
|
||||||
|
_ = [r for r in merge_datetime_ranges(dates)]
|
||||||
|
|
||||||
|
def test_dates_no_timezone(self):
|
||||||
|
@@ -361,7 +361,7 @@ def test_dates_no_timezone(self):
|
||||||
|
(datetime.datetime(1800, 1, 1, tzinfo=UTC), datetime.datetime(2010, 1, 1, tzinfo=UTC))
|
||||||
|
]
|
||||||
|
|
||||||
|
- with self.assertRaisesRegexp(TypeError, CANT_COMPARE_DATES_ERROR):
|
||||||
|
+ with self.assertRaisesRegex(TypeError, CANT_COMPARE_DATES_ERROR):
|
||||||
|
_ = [r for r in merge_datetime_ranges(dates)]
|
||||||
|
|
||||||
|
# Case 2
|
||||||
|
@@ -370,7 +370,7 @@ def test_dates_no_timezone(self):
|
||||||
|
(datetime.datetime(1900, 1, 1, tzinfo=UTC), datetime.datetime(2010, 1, 1))
|
||||||
|
]
|
||||||
|
|
||||||
|
- with self.assertRaisesRegexp(TypeError, CANT_COMPARE_DATES_ERROR):
|
||||||
|
+ with self.assertRaisesRegex(TypeError, CANT_COMPARE_DATES_ERROR):
|
||||||
|
_ = [r for r in merge_datetime_ranges(dates)]
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user