commit d8531726d52ee221f7e8e5e3af8b1e6b135681d3 Author: Adrian Schröter Date: Thu Oct 19 04:55:42 2023 +0200 Sync from SUSE:ALP:Source:Standard:1.0 python-stack-data revision c5b6d3aac78c9e384412e9b73ab67f4a diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/python-stack-data.changes b/python-stack-data.changes new file mode 100644 index 0000000..85632fd --- /dev/null +++ b/python-stack-data.changes @@ -0,0 +1,59 @@ +------------------------------------------------------------------- +Wed Aug 23 07:28:06 UTC 2023 - ecsos + +- Revert restrict to older Cython. Can not find any specification. + +------------------------------------------------------------------- +Mon Aug 14 12:52:59 UTC 2023 - Dirk Müller + +- skip more tests for newer pygments version + +------------------------------------------------------------------- +Sun Aug 13 19:27:59 UTC 2023 - Dirk Müller + +- restrict to older Cython + +------------------------------------------------------------------- +Mon May 15 09:53:06 UTC 2023 - Steve Kowalik + +- Add patch support-typeguard-4.patch: + * Support typeguard 4+. + +------------------------------------------------------------------- +Thu May 4 21:23:25 UTC 2023 - Dirk Müller + +- update to 0.6.2: + * python 3.11 support + * add tests +- drop 29-Pygments-2-12.patch (upstream) + +------------------------------------------------------------------- +Fri Apr 21 12:37:06 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:45:15 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Wed Jan 4 01:04:23 UTC 2023 - Matej Cepl + +- Skip test_pygments_example test, because it is just too + unstable given the ever changing output from Pygments. + +------------------------------------------------------------------- +Mon May 16 12:18:16 UTC 2022 - Matej Cepl + +- Update to 0.2.0: + - Fallback to basic Source.pieces when there is no Source.tree. + - Handle nodes inside f-strings missing location info from + asttokens +- Add 29-Pygments-2-12.patch (gh#alexmojaki/stack_data#29) making + the package compabile with Pygments 2.12. + +------------------------------------------------------------------- +Fri Jan 14 21:54:31 UTC 2022 - Matej Cepl + +- Initial effort to package stack-data 0.1.3. diff --git a/python-stack-data.spec b/python-stack-data.spec new file mode 100644 index 0000000..e3eb920 --- /dev/null +++ b/python-stack-data.spec @@ -0,0 +1,74 @@ +# +# spec file for package python-stack-data +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%{?sle15_python_module_pythons} +Name: python-stack-data +Version: 0.6.2 +Release: 0 +Summary: Extract data from python stack frames and tracebacks +License: MIT +URL: https://github.com/alexmojaki/stack_data +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 setuptools >= 44} +BuildRequires: %{python_module setuptools_scm >= 3.4.3} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-asttokens +Requires: python-executing +Requires: python-pure-eval +Suggests: python-littleutils +Suggests: python-pygments +Suggests: python-pytest +Suggests: python-typeguard +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module asttokens} +BuildRequires: %{python_module executing} +BuildRequires: %{python_module littleutils} +BuildRequires: %{python_module pure-eval} +BuildRequires: %{python_module pygments} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module typeguard} +# /SECTION +%python_subpackages + +%description +Extract data from python stack frames and tracebacks for informative displays + +%prep +%autosetup -p1 -n stack_data-%{version} + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +# incompatibility with Pygments +%pytest -k 'not (test_pygments_example or test_example)' + +%files %{python_files} +%{python_sitelib}/stack_data +%{python_sitelib}/stack_data-%{version}*-info + +%changelog diff --git a/stack_data-0.6.2.tar.gz b/stack_data-0.6.2.tar.gz new file mode 100644 index 0000000..fbbd482 --- /dev/null +++ b/stack_data-0.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32d2dd0376772d01b6cb9fc996f3c8b57a357089dec328ed4b6553d037eaf815 +size 44146 diff --git a/support-typeguard-4.patch b/support-typeguard-4.patch new file mode 100644 index 0000000..dac421c --- /dev/null +++ b/support-typeguard-4.patch @@ -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):