From 7f07fb3c664d93db7758736e049dc89413037dcbdd45f49844006167282d6c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Mon, 8 Apr 2024 08:15:49 +0000 Subject: [PATCH] Accepting request 1165991 from home:mnhauke - Update to version 2.5.0 Deprecations: * Requests version required >= 2.31.0 New Features: * Pro Edition: RedmineUP Products plugin support * Issue copying (see docs for details) Improvements: * dir(resource) and list(resource) now also show properties of an object. * Support for issues_assigned and issues_authored relations in User object * Original filename will be used as a filename for all uploaded files if a path was provided and filename wasn't set. * Pro Edition: Added support for RedmineUP Contact avatar add/update operations (see docs for details). * Pro Edition: Added support for RedmineUP DealCategory create(), update(), delete() operations (see docs for details). * Pro Edition: RedmineUP CrmQuery resource now supports invoices and expenses relation attributes. * PerformanceWarning will be issued when Python-Redmine does some unnecessary redirects before the actual request is made. Changes: * Backwards Incompatible: API key is now being sent in the X-Redmine-API-Key header instead of the key GET parameter which makes things more secure in case of a failed connection, but it might created issues for servers that don't do custom request header forwarding by default, so be sure to check your web server before upgrading (Issue #328 and Issue #330). * Backwards Incompatible: User all operation now really returns all users, i.e. not only active, but locked, registered and OBS-URL: https://build.opensuse.org/request/show/1165991 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-redmine?expand=0&rev=18 --- 328.patch | 22 -------------- python-python-redmine.changes | 54 +++++++++++++++++++++++++++++++++++ python-python-redmine.spec | 9 ++---- python-redmine-2.4.0.tar.gz | 3 -- python-redmine-2.5.0.tar.gz | 3 ++ support-python-312.patch | 45 ----------------------------- 6 files changed, 60 insertions(+), 76 deletions(-) delete mode 100644 328.patch delete mode 100644 python-redmine-2.4.0.tar.gz create mode 100644 python-redmine-2.5.0.tar.gz delete mode 100644 support-python-312.patch diff --git a/328.patch b/328.patch deleted file mode 100644 index e9e46de..0000000 --- a/328.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 5b5918e5b8a02f7e84df3884a365b13fd575ee50 Mon Sep 17 00:00:00 2001 -From: Tom Misilo <1446856+misilot@users.noreply.github.com> -Date: Thu, 10 Aug 2023 16:00:47 -0500 -Subject: [PATCH] Change the key from a query paramter to a HEADER - ---- - redminelib/engines/base.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/redminelib/engines/base.py b/redminelib/engines/base.py -index f9785be..c0122f4 100644 ---- a/redminelib/engines/base.py -+++ b/redminelib/engines/base.py -@@ -34,7 +34,7 @@ def __init__(self, **options): - - # We would like to be authenticated by API key by default - if options.get('key') is not None: -- self.requests['params']['key'] = options['key'] -+ self.requests['headers']['X-Redmine-API-Key'] = options['key'] - elif options.get('username') is not None and options.get('password') is not None: - self.requests['auth'] = (options['username'], options['password']) - diff --git a/python-python-redmine.changes b/python-python-redmine.changes index 2dec3ac..9c0fc74 100644 --- a/python-python-redmine.changes +++ b/python-python-redmine.changes @@ -1,3 +1,57 @@ +------------------------------------------------------------------- +Sun Apr 7 19:14:48 UTC 2024 - Martin Hauke + +- Update to version 2.5.0 + Deprecations: + * Requests version required >= 2.31.0 + New Features: + * Pro Edition: RedmineUP Products plugin support + * Issue copying (see docs for details) + Improvements: + * dir(resource) and list(resource) now also show properties of + an object. + * Support for issues_assigned and issues_authored relations in + User object + * Original filename will be used as a filename for all uploaded + files if a path was provided and filename wasn't set. + * Pro Edition: Added support for RedmineUP Contact avatar + add/update operations (see docs for details). + * Pro Edition: Added support for RedmineUP DealCategory create(), + update(), delete() operations (see docs for details). + * Pro Edition: RedmineUP CrmQuery resource now supports + invoices and expenses relation attributes. + * PerformanceWarning will be issued when Python-Redmine does some + unnecessary redirects before the actual request is made. + Changes: + * Backwards Incompatible: API key is now being sent in the + X-Redmine-API-Key header instead of the key GET parameter which + makes things more secure in case of a failed connection, but + it might created issues for servers that don't do custom + request header forwarding by default, so be sure to check your + web server before upgrading (Issue #328 and Issue #330). + * Backwards Incompatible: User all operation now really returns + all users, i.e. not only active, but locked, registered and + anonymous as well instead of only returning just active users + in previous versions due to the respect to Redmine's standard + behaviour. + Bugfixes: + * Tests were failing on Python 3.12 (Issue #332). + * Some closed Issues weren't converted to Resource objects + using redmine.search(). + * Pro Edition: RedmineUP Invoice resource order attribute was + returned as a dict instead of being converted to Resource + object. + * Pro Edition: RedmineUP CrmQuery resource deals and contacts + relation attributes didn't work. + * Pro Edition: RedmineUP DealStatus resource deals relation + attribute didn't work. + Documentation: + * Mentioned support for author_id in Issue's resource filter + operation. +- Drop not longer needed patches + * 328.patch + * support-python-312.patch + ------------------------------------------------------------------- Mon Mar 4 02:06:37 UTC 2024 - Steve Kowalik diff --git a/python-python-redmine.spec b/python-python-redmine.spec index dce8470..7d39247 100644 --- a/python-python-redmine.spec +++ b/python-python-redmine.spec @@ -17,24 +17,21 @@ Name: python-python-redmine -Version: 2.4.0 +Version: 2.5.0 Release: 0 Summary: Python library for the Redmine RESTful API License: Apache-2.0 URL: https://python-redmine.com Source: https://files.pythonhosted.org/packages/source/p/python-redmine/python-redmine-%{version}.tar.gz -Patch0: https://github.com/maxtepkeev/python-redmine/pull/328.patch -# PATCH-FIX-UPSTREAM gh#maxtepkeev/python-redmine#332 -Patch1: support-python-312.patch BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest-cov} BuildRequires: %{python_module pytest} -BuildRequires: %{python_module requests >= 2.28.2} +BuildRequires: %{python_module requests >= 2.31.0} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-requests >= 2.28.2 +Requires: python-requests >= 2.31.0 BuildArch: noarch %python_subpackages diff --git a/python-redmine-2.4.0.tar.gz b/python-redmine-2.4.0.tar.gz deleted file mode 100644 index a73f179..0000000 --- a/python-redmine-2.4.0.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29e1c479e6bedc4b193f84dda25121a1a0fcc30969c7f0f6e729c5638749e9d8 -size 67730 diff --git a/python-redmine-2.5.0.tar.gz b/python-redmine-2.5.0.tar.gz new file mode 100644 index 0000000..3ea7397 --- /dev/null +++ b/python-redmine-2.5.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:81bdc529aaf188658e2d07488096c795d03d4e256711bfa3fa3f17b1eecc471b +size 73643 diff --git a/support-python-312.patch b/support-python-312.patch deleted file mode 100644 index 6412896..0000000 --- a/support-python-312.patch +++ /dev/null @@ -1,45 +0,0 @@ -From b28beb9f0c1516d35037bb54adcb54dd803694e6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= -Date: Sat, 2 Mar 2024 14:45:08 +0100 -Subject: [PATCH] Replace `assertEquals()` to fix tests with Python 3.12 (#332) - ---- - tests/test_managers.py | 4 ++-- - tests/test_redmine.py | 2 +- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/tests/test_managers.py b/tests/test_managers.py -index dfacab2..44c2e8b 100644 ---- a/tests/test_managers.py -+++ b/tests/test_managers.py -@@ -125,7 +125,7 @@ def test_create_resource_with_stream_uploads(self): - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always') - issue = self.redmine.issue.create(project_id=1, subject='Foo', uploads=[{'path': stream}]) -- self.assertEquals(len(w), 1) -+ self.assertEqual(len(w), 1) - self.assertIs(w[0].category, exceptions.PerformanceWarning) - self.assertEqual(issue.project_id, 1) - self.assertEqual(issue.subject, 'Foo') -@@ -166,7 +166,7 @@ def test_update_resource_with_stream_uploads(self): - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always') - self.assertEqual(self.redmine.issue.update(1, subject='Bar', uploads=[{'path': stream}]), True) -- self.assertEquals(len(w), 1) -+ self.assertEqual(len(w), 1) - self.assertIs(w[0].category, exceptions.PerformanceWarning) - - def test_update_resource_returns_none(self): -diff --git a/tests/test_redmine.py b/tests/test_redmine.py -index 46e456b..9384c18 100644 ---- a/tests/test_redmine.py -+++ b/tests/test_redmine.py -@@ -77,7 +77,7 @@ def test_successful_filestream_upload(self): - with warnings.catch_warnings(record=True) as w: - warnings.simplefilter('always') - self.assertEqual(self.redmine.upload(StringIO(b'\xcf\x86oo'.decode('utf-8')))['token'], '456789') -- self.assertEquals(len(w), 1) -+ self.assertEqual(len(w), 1) - self.assertIs(w[0].category, exceptions.PerformanceWarning) - - @mock.patch('redminelib.open', mock.mock_open(), create=True)