Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-django-rest-framework-braces 
for openSUSE:Factory checked in at 2022-05-15 19:00:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-django-rest-framework-braces (Old)
 and      
/work/SRC/openSUSE:Factory/.python-django-rest-framework-braces.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-django-rest-framework-braces"

Sun May 15 19:00:24 2022 rev:3 rq:977288 version:0.3.4

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-django-rest-framework-braces/python-django-rest-framework-braces.changes
  2021-12-14 22:02:42.679165548 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-django-rest-framework-braces.new.1538/python-django-rest-framework-braces.changes
        2022-05-15 19:00:26.542411628 +0200
@@ -1,0 +2,5 @@
+Sun May 15 03:10:08 UTC 2022 - John Vandenberg <jay...@gmail.com>
+
+- Add pr_34.patch for DRF 3.13 compatibility
+
+-------------------------------------------------------------------

New:
----
  pr_34.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-django-rest-framework-braces.spec ++++++
--- /var/tmp/diff_new_pack.uE1GNg/_old  2022-05-15 19:00:27.074412259 +0200
+++ /var/tmp/diff_new_pack.uE1GNg/_new  2022-05-15 19:00:27.078412264 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-django-rest-framework-braces
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/dealertrack/django-rest-framework-braces
 Source:         
https://files.pythonhosted.org/packages/source/d/django-rest-framework-braces/django-rest-framework-braces-%{version}.tar.gz
+Patch0:         pr_34.patch
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -52,6 +53,9 @@
 
 %prep
 %setup -q -n django-rest-framework-braces-%{version}
+%patch0 -p1
+sed -i 's/from collections import Mapping/from collections.abc import 
Mapping/' drf_braces/renderers.py
+
 sed -i '/argparse/d' setup.* requirements*
 sed -i '/\.admin/d' tests/settings.py
 
@@ -71,6 +75,6 @@
 %files %{python_files}
 %doc AUTHORS.rst README.rst
 %license LICENSE.rst
-%{python_sitelib}/*
+%{python_sitelib}/*braces*/
 
 %changelog

++++++ pr_34.patch ++++++
commit 904b1c4032ce7e3b695ffb122a219a8c07f06fe9
Author: John Vandenberg <jay...@gmail.com>
Date:   Sun May 15 09:28:54 2022 +0800

    find_function_args: Include spec.kwonlyargs
    
    Fixes https://github.com/dealertrack/django-rest-framework-braces/issues/32

diff --git a/drf_braces/utils.py b/drf_braces/utils.py
index 6730c17..e6323e5 100644
--- a/drf_braces/utils.py
+++ b/drf_braces/utils.py
@@ -12,7 +12,10 @@ def find_function_args(func):
     """
     try:
         spec = inspect.getfullargspec(func) if hasattr(inspect, 
'getfullargspec') else inspect.getargspec(func)
-        return [i for i in spec[0] if i not in IGNORE_ARGS]
+        arg_list = spec[0]
+        if hasattr(spec, 'kwonlyargs'):
+            arg_list += spec.kwonlyargs
+        return [i for i in arg_list if i not in IGNORE_ARGS]
     except TypeError:
         return []
 

Reply via email to