Accepting request 1087190 from devel:languages:python
- Add patch support-typeguard-4.patch: * Support typeguard 4+. OBS-URL: https://build.opensuse.org/request/show/1087190 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-stack-data?expand=0&rev=6
This commit is contained in:
commit
79442471ae
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 15 09:53:06 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch support-typeguard-4.patch:
|
||||||
|
* Support typeguard 4+.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 4 21:23:25 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Thu May 4 21:23:25 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ Summary: Extract data from python stack frames and tracebacks
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/alexmojaki/stack_data
|
URL: https://github.com/alexmojaki/stack_data
|
||||||
Source: https://files.pythonhosted.org/packages/source/s/stack_data/stack_data-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/s/stack_data/stack_data-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-OPENSUSE Support typeguard 4+
|
||||||
|
Patch0: support-typeguard-4.patch
|
||||||
BuildRequires: %{python_module Cython}
|
BuildRequires: %{python_module Cython}
|
||||||
BuildRequires: %{python_module setuptools >= 44}
|
BuildRequires: %{python_module setuptools >= 44}
|
||||||
BuildRequires: %{python_module setuptools_scm >= 3.4.3}
|
BuildRequires: %{python_module setuptools_scm >= 3.4.3}
|
||||||
|
38
support-typeguard-4.patch
Normal file
38
support-typeguard-4.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
Index: stack_data-0.6.2/tests/__init__.py
|
||||||
|
===================================================================
|
||||||
|
--- stack_data-0.6.2.orig/tests/__init__.py
|
||||||
|
+++ stack_data-0.6.2/tests/__init__.py
|
||||||
|
@@ -1,7 +1,7 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
import pyximport
|
||||||
|
-from typeguard.importhook import install_import_hook
|
||||||
|
+from typeguard import install_import_hook
|
||||||
|
|
||||||
|
pyximport.install(language_level=3)
|
||||||
|
|
||||||
|
Index: stack_data-0.6.2/stack_data/utils.py
|
||||||
|
===================================================================
|
||||||
|
--- stack_data-0.6.2.orig/stack_data/utils.py
|
||||||
|
+++ stack_data-0.6.2/stack_data/utils.py
|
||||||
|
@@ -8,6 +8,11 @@ from typing import (
|
||||||
|
TypeVar, Mapping,
|
||||||
|
)
|
||||||
|
|
||||||
|
+try:
|
||||||
|
+ from types import NoneType
|
||||||
|
+except ImportError:
|
||||||
|
+ NoneType = type(None)
|
||||||
|
+
|
||||||
|
from asttokens import ASTText
|
||||||
|
|
||||||
|
T = TypeVar('T')
|
||||||
|
@@ -91,7 +96,7 @@ def is_frame(frame_or_tb: Union[FrameTyp
|
||||||
|
return isinstance(frame_or_tb, (types.FrameType,))
|
||||||
|
|
||||||
|
|
||||||
|
-def iter_stack(frame_or_tb: Union[FrameType, TracebackType]) -> Iterator[Union[FrameType, TracebackType]]:
|
||||||
|
+def iter_stack(frame_or_tb: Union[FrameType, TracebackType, NoneType]) -> Iterator[Union[FrameType, TracebackType]]:
|
||||||
|
while frame_or_tb:
|
||||||
|
yield frame_or_tb
|
||||||
|
if is_frame(frame_or_tb):
|
Loading…
x
Reference in New Issue
Block a user