Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-drf-spectacular for
openSUSE:Factory checked in at 2025-04-29 16:39:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-drf-spectacular (Old)
and /work/SRC/openSUSE:Factory/.python-drf-spectacular.new.30101 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-drf-spectacular"
Tue Apr 29 16:39:59 2025 rev:4 rq:1273163 version:0.28.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-drf-spectacular/python-drf-spectacular.changes
2025-04-24 17:28:09.459991821 +0200
+++
/work/SRC/openSUSE:Factory/.python-drf-spectacular.new.30101/python-drf-spectacular.changes
2025-04-29 16:40:32.338589639 +0200
@@ -1,0 +2,5 @@
+Mon Apr 28 13:56:47 UTC 2025 - Markéta Machová <[email protected]>
+
+- Add upstream patch py313.patch to add Python 3.13 compatibility
+
+-------------------------------------------------------------------
New:
----
py313.patch
BETA DEBUG BEGIN:
New:
- Add upstream patch py313.patch to add Python 3.13 compatibility
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-drf-spectacular.spec ++++++
--- /var/tmp/diff_new_pack.IUFCBr/_old 2025-04-29 16:40:32.862611650 +0200
+++ /var/tmp/diff_new_pack.IUFCBr/_new 2025-04-29 16:40:32.862611650 +0200
@@ -16,8 +16,6 @@
#
-# python 3.13 not supported yet
-%define skip_python313 1
%{?sle15_python_module_pythons}
Name: python-drf-spectacular
Version: 0.28.0
@@ -26,6 +24,8 @@
License: BSD-3-Clause
URL: https://github.com/tfranzel/drf-spectacular
Source:
https://files.pythonhosted.org/packages/source/d/drf-spectacular/drf_spectacular-%{version}.tar.gz
+# PATCH-FIX-UPSTREAM https://github.com/tfranzel/drf-spectacular/pull/1381
Django 5.2 and python 3.13 minor changes
+Patch: py313.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
++++++ py313.patch ++++++
>From cb5ff5ac17c6ce9ed94a7daece47a2d6ec3913a0 Mon Sep 17 00:00:00 2001
From: "T. Franzel" <[email protected]>
Date: Sat, 15 Feb 2025 15:45:14 +0100
Subject: [PATCH] Django 5.2 and python 3.13 minor changes
---
README.rst | 2 +-
drf_spectacular/openapi.py | 6 ++++++
drf_spectacular/plumbing.py | 2 ++
setup.py | 2 ++
tox.ini | 3 ++-
5 files changed, 13 insertions(+), 2 deletions(-)
Index: drf_spectacular-0.28.0/drf_spectacular/openapi.py
===================================================================
--- drf_spectacular-0.28.0.orig/drf_spectacular/openapi.py
+++ drf_spectacular-0.28.0/drf_spectacular/openapi.py
@@ -912,6 +912,12 @@ class AutoSchema(ViewInspector):
# the only way to detect an uninitialized partial method
# this is a convenience method for model choice fields and is
mostly a string
schema = build_basic_type(str)
+ elif (
+ hasattr(target, "__partialmethod__")
+ and target.__partialmethod__.func.__name__ ==
'_get_FIELD_display'
+ ):
+ # same as above but specifically for python >= 3.13
+ schema = build_basic_type(str)
elif callable(target):
schema = self._map_response_type_hint(target)
elif isinstance(target, models.Field):
Index: drf_spectacular-0.28.0/drf_spectacular/plumbing.py
===================================================================
--- drf_spectacular-0.28.0.orig/drf_spectacular/plumbing.py
+++ drf_spectacular-0.28.0/drf_spectacular/plumbing.py
@@ -236,6 +236,8 @@ def get_doc(obj) -> str:
# also clean up trailing whitespace for each line
return '\n'.join(line.rstrip() for line in doc.rstrip().split('\n'))
+ if obj is None:
+ return ''
if not inspect.isclass(obj):
return post_cleanup(inspect.getdoc(obj) or '')
Index: drf_spectacular-0.28.0/setup.py
===================================================================
--- drf_spectacular-0.28.0.orig/setup.py
+++ drf_spectacular-0.28.0/setup.py
@@ -88,6 +88,7 @@ setup(
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
+ 'Framework :: Django :: 5.2',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
@@ -100,6 +101,7 @@ setup(
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
+ 'Programming Language :: Python :: 3.13',
'Topic :: Internet :: WWW/HTTP',
'Topic :: Documentation',
'Topic :: Software Development :: Code Generators',