forked from pool/python-python-redmine
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
This commit is contained in:
22
328.patch
22
328.patch
@@ -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'])
|
|
||||||
|
|
@@ -1,3 +1,57 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Apr 7 19:14:48 UTC 2024 - Martin Hauke <mardnh@gmx.de>
|
||||||
|
|
||||||
|
- 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 <steven.kowalik@suse.com>
|
Mon Mar 4 02:06:37 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@@ -17,24 +17,21 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: python-python-redmine
|
Name: python-python-redmine
|
||||||
Version: 2.4.0
|
Version: 2.5.0
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Python library for the Redmine RESTful API
|
Summary: Python library for the Redmine RESTful API
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://python-redmine.com
|
URL: https://python-redmine.com
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/python-redmine/python-redmine-%{version}.tar.gz
|
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 pip}
|
||||||
BuildRequires: %{python_module pytest-cov}
|
BuildRequires: %{python_module pytest-cov}
|
||||||
BuildRequires: %{python_module pytest}
|
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 setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: python-requests >= 2.28.2
|
Requires: python-requests >= 2.31.0
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:29e1c479e6bedc4b193f84dda25121a1a0fcc30969c7f0f6e729c5638749e9d8
|
|
||||||
size 67730
|
|
3
python-redmine-2.5.0.tar.gz
Normal file
3
python-redmine-2.5.0.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:81bdc529aaf188658e2d07488096c795d03d4e256711bfa3fa3f17b1eecc471b
|
||||||
|
size 73643
|
@@ -1,45 +0,0 @@
|
|||||||
From b28beb9f0c1516d35037bb54adcb54dd803694e6 Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
|
|
||||||
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)
|
|
Reference in New Issue
Block a user