14
0

Accepting request 1196375 from devel:languages:python

- Update to 1.2.1:
  * New features:
    + Improve loading and error indicators
    + Save URL to an individual's LinkedIn profile
    + Link to GitHub profile
    + Assign users to permission groups
    + Configuration for regular expressions in CORS
    + Dedicated queues in multi-tenancy
    + Organization aliases
  * Bug fixes:
    + Consistent date format for job executions
    + Match source parameter fixed in recommendations
    + Organizations aliases in Python client
    + Change password form fixed
    + Refetch general settings after they are changed
    + Profile view displays correct recommendations
    + Match recommendations job fixed
- Drop patch use-correct-assertion-methods.patch, included.
- Refresh all other patches.

OBS-URL: https://build.opensuse.org/request/show/1196375
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-sortinghat?expand=0&rev=10
This commit is contained in:
2024-08-28 19:30:25 +00:00
committed by Git OBS Bridge
7 changed files with 54 additions and 86 deletions

View File

@@ -1,7 +1,7 @@
Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
Index: grimoirelab-sortinghat-1.2.1/tests/test_schema.py
===================================================================
--- grimoirelab-sortinghat-0.19.1.orig/tests/test_schema.py
+++ grimoirelab-sortinghat-0.19.1/tests/test_schema.py
--- grimoirelab-sortinghat-1.2.1.orig/tests/test_schema.py
+++ grimoirelab-sortinghat-1.2.1/tests/test_schema.py
@@ -22,6 +22,7 @@
#
@@ -10,7 +10,7 @@ Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
import unittest.mock
import json
import httpretty
@@ -1403,6 +1404,7 @@ class TestQueryPagination(django.test.Te
@@ -1408,6 +1409,7 @@ class TestQueryPagination(django.test.Te
self.assertEqual(pag_data['endIndex'], 6)
self.assertEqual(pag_data['totalResults'], 6)
@@ -18,7 +18,7 @@ Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
def test_page_size_negative(self):
"""Check if it fails when `pageSize` is a negative number"""
@@ -6367,7 +6369,8 @@ class TestAddIdentityMutation(django.tes
@@ -6399,7 +6401,8 @@ class TestAddIdentityMutation(django.tes
variables=params)
msg = executed['errors'][0]['message']
@@ -28,7 +28,7 @@ Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
def test_add_identity_name_none(self):
"""Check if the username is set to the profile when no name is provided"""
@@ -8163,7 +8166,8 @@ class TestWithdrawMutation(django.test.T
@@ -8195,7 +8198,8 @@ class TestWithdrawMutation(django.test.T
variables=params)
msg = executed['errors'][0]['message']
@@ -38,7 +38,7 @@ Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
def test_non_existing_organization(self):
"""Check if it fails when the organization does not exist"""
@@ -9850,6 +9854,7 @@ class TestUnifyMutation(django.test.Test
@@ -9882,6 +9886,7 @@ class TestUnifyMutation(django.test.Test
source='scm',
uuid=self.jrae.uuid)
@@ -46,7 +46,7 @@ Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
@unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4')
def test_unify(self, mock_job_id_gen):
"""Check if unify is applied for the specified individuals"""
@@ -9922,6 +9927,7 @@ class TestUnifyMutation(django.test.Test
@@ -9954,6 +9959,7 @@ class TestUnifyMutation(django.test.Test
id5 = identities[4]
self.assertEqual(id5, self.jr2)
@@ -54,10 +54,10 @@ Index: grimoirelab-sortinghat-0.19.1/tests/test_schema.py
@unittest.mock.patch('sortinghat.core.jobs.rq.job.uuid4')
def test_unify_last_modified(self, mock_job_id_gen):
"""Check if unify is applied only for the individuals modified after a date"""
Index: grimoirelab-sortinghat-0.19.1/tests/cli/test_cmd_config.py
Index: grimoirelab-sortinghat-1.2.1/tests/cli/test_cmd_config.py
===================================================================
--- grimoirelab-sortinghat-0.19.1.orig/tests/cli/test_cmd_config.py
+++ grimoirelab-sortinghat-0.19.1/tests/cli/test_cmd_config.py
--- grimoirelab-sortinghat-1.2.1.orig/tests/cli/test_cmd_config.py
+++ grimoirelab-sortinghat-1.2.1/tests/cli/test_cmd_config.py
@@ -41,10 +41,10 @@ MOCK_CONFIG_FILEPATH = os.path.join(os.p
@@ -71,10 +71,10 @@ Index: grimoirelab-sortinghat-0.19.1/tests/cli/test_cmd_config.py
class TestInitConfig(unittest.TestCase):
Index: grimoirelab-sortinghat-0.19.1/sortinghat/core/decorators.py
Index: grimoirelab-sortinghat-1.2.1/sortinghat/core/decorators.py
===================================================================
--- grimoirelab-sortinghat-0.19.1.orig/sortinghat/core/decorators.py
+++ grimoirelab-sortinghat-0.19.1/sortinghat/core/decorators.py
--- grimoirelab-sortinghat-1.2.1.orig/sortinghat/core/decorators.py
+++ grimoirelab-sortinghat-1.2.1/sortinghat/core/decorators.py
@@ -68,6 +68,8 @@ check_auth = user_passes_test(lambda u:

View File

@@ -1,7 +1,7 @@
Index: grimoirelab-sortinghat-0.19.1/config/settings/testing.py
Index: grimoirelab-sortinghat-1.2.1/config/settings/config_testing.py
===================================================================
--- grimoirelab-sortinghat-0.19.1.orig/config/settings/testing.py
+++ grimoirelab-sortinghat-0.19.1/config/settings/testing.py
--- grimoirelab-sortinghat-1.2.1.orig/config/settings/config_testing.py
+++ grimoirelab-sortinghat-1.2.1/config/settings/config_testing.py
@@ -1,3 +1,4 @@
+import os
import sys
@@ -30,11 +30,11 @@ Index: grimoirelab-sortinghat-0.19.1/config/settings/testing.py
}
}
Index: grimoirelab-sortinghat-0.19.1/config/settings/testing_tenant.py
Index: grimoirelab-sortinghat-1.2.1/config/settings/config_testing_tenant.py
===================================================================
--- grimoirelab-sortinghat-0.19.1.orig/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
--- grimoirelab-sortinghat-1.2.1.orig/config/settings/config_testing_tenant.py
+++ grimoirelab-sortinghat-1.2.1/config/settings/config_testing_tenant.py
@@ -15,8 +15,8 @@ TENANTS_DEDICATED_QUEUES = [t["name"] fo
DATABASES.update({
tenant: {
'ENGINE': 'django.db.backends.mysql',
@@ -45,7 +45,7 @@ Index: grimoirelab-sortinghat-0.19.1/config/settings/testing_tenant.py
'NAME': tenant,
'OPTIONS': {
'charset': 'utf8mb4',
@@ -16,9 +16,10 @@ DATABASES.update({
@@ -26,9 +26,10 @@ DATABASES.update({
'NAME': tenant,
'CHARSET': 'utf8mb4',
'COLLATION': 'utf8mb4_unicode_520_ci',
@@ -55,5 +55,5 @@ Index: grimoirelab-sortinghat-0.19.1/config/settings/testing_tenant.py
- 'PORT': 3306
+ 'PORT': os.environ.get('TEST_SORTINGHAT_DB_PORT', 3306)
}
for tenant in ['tenant_1', 'tenant_2']
for tenant in [t["name"] for t in tenants_cfg]
})

View File

@@ -1,3 +1,26 @@
-------------------------------------------------------------------
Wed Aug 28 03:30:10 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
- Update to 1.2.1:
* New features:
+ Improve loading and error indicators
+ Save URL to an individual's LinkedIn profile
+ Link to GitHub profile
+ Assign users to permission groups
+ Configuration for regular expressions in CORS
+ Dedicated queues in multi-tenancy
+ Organization aliases
* Bug fixes:
+ Consistent date format for job executions
+ Match source parameter fixed in recommendations
+ Organizations aliases in Python client
+ Change password form fixed
+ Refetch general settings after they are changed
+ Profile view displays correct recommendations
+ Match recommendations job fixed
- Drop patch use-correct-assertion-methods.patch, included.
- Refresh all other patches.
-------------------------------------------------------------------
Tue Feb 6 04:49:48 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>

View File

@@ -17,7 +17,7 @@
Name: python-sortinghat
Version: 0.19.1
Version: 1.2.1
Release: 0
Summary: A tool to manage identities
License: GPL-3.0-only
@@ -26,15 +26,13 @@ Source: https://github.com/chaoss/grimoirelab-sortinghat/archive/refs/ta
# PATCH-FIX-OPENSUSE Allow overridding the database config
Patch0: allow-database-config-overrides.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 poetry-core}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Django >= 3.2
Requires: python-Django >= 4.2
Requires: python-Jinja2 >= 3.1
Requires: python-PyJWT
Requires: python-PyMySQL >= 0.7.0
@@ -62,7 +60,7 @@ Requires(postun): update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module Jinja2 >= 3.1}
BuildRequires: %{python_module Django >= 3.2}
BuildRequires: %{python_module Django >= 4.2}
BuildRequires: %{python_module PyMySQL >= 0.7.0}
BuildRequires: %{python_module PyYAML >= 3.12}
BuildRequires: %{python_module SQLAlchemy >= 1.2}
@@ -145,8 +143,8 @@ export TEST_SORTINGHAT_DB_USER=$user
export TEST_SORTINGHAT_DB_PASSWORD=$pass
# Broken tests
rm tests/test_jobs.py
%python_exec manage.py test --settings=config.settings.testing
%python_exec manage.py test --settings=config.settings.testing_tenant
%python_exec manage.py test --settings=config.settings.config_testing
%python_exec manage.py test --settings=config.settings.config_testing_tenant
#
# stopping mariadb
#

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:20ec93c4c5951bfeb2cbd5f750209eaf1aa3ab57228676c98ebc00e2f92abc05
size 2441873

3
sortinghat-1.2.1.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e524a0ff1dccca14decfa9231a6e531fa94225ad1ffa7d491f3f9c728b223ffe
size 2255793

View File

@@ -1,53 +0,0 @@
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)]