python-greenlet/python-greenlet.spec

86 lines
2.7 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-greenlet
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2010 B1 Systems GmbH, Vohburg, Germany.
#
# 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-greenlet
- update to 3.0.0~rc3: * Fix an intermittent error during process termination on some platforms (GCC/Linux/libstdc++). * Fix some potential bugs (assertion failures and memory leaks) in previously-untested error handling code. In some cases, this means that the process will execute a controlled ``abort()`` after severe trouble when previously the process might have continued for some time with a corrupt state. It is unlikely those errors occurred in practice. * Fix some assertion errors and potential bugs with re-entrant switches. * Fix a potential crash when certain compilers compile greenlet with high levels of optimization. The symptom would be that switching to a greenlet for the first time immediately crashes. * Fix a potential crash when the callable object passed to the greenlet constructor (or set as the ``greenlet.run`` attribute) has a destructor attached to it that switches. Typically, triggering this issue would require an unlikely subclass of ``greenlet.greenlet``. * Python 3.11+: Fix rare switching errors that could occur when a garbage collection was triggered during the middle of a switch, and Python-level code in ``__del__`` or weakref callbacks switched to a different greenlet and ultimately switched back to the original greenlet. This often manifested as a ``SystemError``: "switch returned NULL without an exception set." * Python 3.12: Fix walking the frame stack of suspended greenlets. Previously accessing ``glet.gr_frame.f_back`` would crash due to `changes in CPython's undocumented internal frame handling * Make the platform-specific low-level C/assembly snippets stop using the ``register`` storage class. Newer versions of standards remove OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=70
2023-09-20 00:06:34 +02:00
Version: 3.0.0~rc3
Release: 0
Summary: Lightweight in-process concurrent programming
License: MIT
Group: Development/Libraries/Python
URL: https://github.com/python-greenlet/greenlet
- update to 3.0.0~rc3: * Fix an intermittent error during process termination on some platforms (GCC/Linux/libstdc++). * Fix some potential bugs (assertion failures and memory leaks) in previously-untested error handling code. In some cases, this means that the process will execute a controlled ``abort()`` after severe trouble when previously the process might have continued for some time with a corrupt state. It is unlikely those errors occurred in practice. * Fix some assertion errors and potential bugs with re-entrant switches. * Fix a potential crash when certain compilers compile greenlet with high levels of optimization. The symptom would be that switching to a greenlet for the first time immediately crashes. * Fix a potential crash when the callable object passed to the greenlet constructor (or set as the ``greenlet.run`` attribute) has a destructor attached to it that switches. Typically, triggering this issue would require an unlikely subclass of ``greenlet.greenlet``. * Python 3.11+: Fix rare switching errors that could occur when a garbage collection was triggered during the middle of a switch, and Python-level code in ``__del__`` or weakref callbacks switched to a different greenlet and ultimately switched back to the original greenlet. This often manifested as a ``SystemError``: "switch returned NULL without an exception set." * Python 3.12: Fix walking the frame stack of suspended greenlets. Previously accessing ``glet.gr_frame.f_back`` would crash due to `changes in CPython's undocumented internal frame handling * Make the platform-specific low-level C/assembly snippets stop using the ``register`` storage class. Newer versions of standards remove OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=70
2023-09-20 00:06:34 +02:00
Source0: https://files.pythonhosted.org/packages/source/g/greenlet/greenlet-3.0.0rc3.tar.gz
Source9: python-greenlet-rpmlintrc
BuildRequires: %{python_module devel}
- update to 2.0.2: * Fix calling ``greenlet.settrace()`` with the same tracer object that was currently active. * Various compilation and standards conformance fixes. * Python 3.11: Fix a memory leak. See issue 328 and gevent issue 1924. - 2.0.0.post0 (2022-11-03) * Add Programming Language :: Python :: 3.11 to the PyPI classifier metadata. - 2.0.0rc5 (2022-10-31) * Linux: Fix another group of rare crashes that could occur when shutting down an interpeter running multiple threads. See issue 325. - 2.0.0rc4 (2022-10-30) * Linux: Fix a rare crash that could occur when shutting down an interpreter running multiple threads, when some of those threads are in greenlets making calls to functions that release the GIL. - 2.0.0rc1 (2022-10-27) * Deal gracefully with greenlet switches that occur while deferred deallocation of objects is happening using CPython's "trash can" mechanism. Previously, if a large nested container held items that switched greenlets during delayed deallocation, and that second greenlet also invoked the trash can, CPython's internal state could become corrupt. This was visible as an assertion error in debug builds. Now, the relevant internal state is saved and restored during greenlet switches. See also gevent issue 1909. * Rename the C API function PyGreenlet_GET_PARENT to PyGreenlet_GetParent for consistency. The old name remains available as a deprecated alias. - 2.0.0a1 (2022-01-20) * Drop support for very old versions of GCC and MSVC. Compilation now requires a compiler that either supports C++11 or has some other intrinsic way to create thread local variables; for older GCC, clang OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=68
2023-05-04 16:46:15 +02:00
BuildRequires: %{python_module objgraph}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module wheel}
BuildRequires: c++_compiler
BuildRequires: fdupes
BuildRequires: python-rpm-macros
BuildRequires: python3-Sphinx
%python_subpackages
%description
The greenlet package is a spin-off of Stackless, a version of CPython
that supports micro-threads called "tasklets". Tasklets run
pseudo-concurrently (typically in a single or a few OS-level threads)
and are synchronized with data exchanges on "channels".
%package devel
Summary: C development headers for python-greenlet
Group: Development/Libraries/Python
Requires: %{name} = %{version}
BuildArch: noarch
%description devel
This package contains header files required for C modules development.
%prep
- update to 3.0.0~rc3: * Fix an intermittent error during process termination on some platforms (GCC/Linux/libstdc++). * Fix some potential bugs (assertion failures and memory leaks) in previously-untested error handling code. In some cases, this means that the process will execute a controlled ``abort()`` after severe trouble when previously the process might have continued for some time with a corrupt state. It is unlikely those errors occurred in practice. * Fix some assertion errors and potential bugs with re-entrant switches. * Fix a potential crash when certain compilers compile greenlet with high levels of optimization. The symptom would be that switching to a greenlet for the first time immediately crashes. * Fix a potential crash when the callable object passed to the greenlet constructor (or set as the ``greenlet.run`` attribute) has a destructor attached to it that switches. Typically, triggering this issue would require an unlikely subclass of ``greenlet.greenlet``. * Python 3.11+: Fix rare switching errors that could occur when a garbage collection was triggered during the middle of a switch, and Python-level code in ``__del__`` or weakref callbacks switched to a different greenlet and ultimately switched back to the original greenlet. This often manifested as a ``SystemError``: "switch returned NULL without an exception set." * Python 3.12: Fix walking the frame stack of suspended greenlets. Previously accessing ``glet.gr_frame.f_back`` would crash due to `changes in CPython's undocumented internal frame handling * Make the platform-specific low-level C/assembly snippets stop using the ``register`` storage class. Newer versions of standards remove OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=70
2023-09-20 00:06:34 +02:00
%autosetup -p1 -n greenlet-3.0.0rc3
%build
export CFLAGS="%{optflags} -fno-tree-dominator-opts -fno-strict-aliasing"
- update to 2.0.2: * Fix calling ``greenlet.settrace()`` with the same tracer object that was currently active. * Various compilation and standards conformance fixes. * Python 3.11: Fix a memory leak. See issue 328 and gevent issue 1924. - 2.0.0.post0 (2022-11-03) * Add Programming Language :: Python :: 3.11 to the PyPI classifier metadata. - 2.0.0rc5 (2022-10-31) * Linux: Fix another group of rare crashes that could occur when shutting down an interpeter running multiple threads. See issue 325. - 2.0.0rc4 (2022-10-30) * Linux: Fix a rare crash that could occur when shutting down an interpreter running multiple threads, when some of those threads are in greenlets making calls to functions that release the GIL. - 2.0.0rc1 (2022-10-27) * Deal gracefully with greenlet switches that occur while deferred deallocation of objects is happening using CPython's "trash can" mechanism. Previously, if a large nested container held items that switched greenlets during delayed deallocation, and that second greenlet also invoked the trash can, CPython's internal state could become corrupt. This was visible as an assertion error in debug builds. Now, the relevant internal state is saved and restored during greenlet switches. See also gevent issue 1909. * Rename the C API function PyGreenlet_GET_PARENT to PyGreenlet_GetParent for consistency. The old name remains available as a deprecated alias. - 2.0.0a1 (2022-01-20) * Drop support for very old versions of GCC and MSVC. Compilation now requires a compiler that either supports C++11 or has some other intrinsic way to create thread local variables; for older GCC, clang OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=68
2023-05-04 16:46:15 +02:00
%pyproject_wheel
export PYTHONPATH=$PWD/src
cd docs && make html && rm _build/html/.buildinfo
%install
- update to 2.0.2: * Fix calling ``greenlet.settrace()`` with the same tracer object that was currently active. * Various compilation and standards conformance fixes. * Python 3.11: Fix a memory leak. See issue 328 and gevent issue 1924. - 2.0.0.post0 (2022-11-03) * Add Programming Language :: Python :: 3.11 to the PyPI classifier metadata. - 2.0.0rc5 (2022-10-31) * Linux: Fix another group of rare crashes that could occur when shutting down an interpeter running multiple threads. See issue 325. - 2.0.0rc4 (2022-10-30) * Linux: Fix a rare crash that could occur when shutting down an interpreter running multiple threads, when some of those threads are in greenlets making calls to functions that release the GIL. - 2.0.0rc1 (2022-10-27) * Deal gracefully with greenlet switches that occur while deferred deallocation of objects is happening using CPython's "trash can" mechanism. Previously, if a large nested container held items that switched greenlets during delayed deallocation, and that second greenlet also invoked the trash can, CPython's internal state could become corrupt. This was visible as an assertion error in debug builds. Now, the relevant internal state is saved and restored during greenlet switches. See also gevent issue 1909. * Rename the C API function PyGreenlet_GET_PARENT to PyGreenlet_GetParent for consistency. The old name remains available as a deprecated alias. - 2.0.0a1 (2022-01-20) * Drop support for very old versions of GCC and MSVC. Compilation now requires a compiler that either supports C++11 or has some other intrinsic way to create thread local variables; for older GCC, clang OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-greenlet?expand=0&rev=68
2023-05-04 16:46:15 +02:00
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
export CFLAGS="%{optflags} -fno-tree-dominator-opts -fno-strict-aliasing"
%pyunittest_arch discover -v greenlet.tests
%files %{python_files}
%doc AUTHORS CHANGES.rst README.rst
%doc docs/_build/html/
%license LICENSE*
%{python_sitearch}/greenlet*
%files %{python_files devel}
%doc AUTHORS
%license LICENSE*
%{_includedir}/python%{python_version}*/greenlet/
%changelog