commit 7d4ac2861f96fe6665416a2e12cb1d5d2407d534ec4656f4c9eca40fe8bff21b Author: Adrian Schröter Date: Fri May 3 20:29:12 2024 +0200 Sync from SUSE:SLFO:Main python-decorator revision befbc6c16390fa87d77065542e5b9344 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /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/decorator-5.1.1.tar.gz b/decorator-5.1.1.tar.gz new file mode 100644 index 0000000..67c2697 --- /dev/null +++ b/decorator-5.1.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330 +size 35016 diff --git a/python-decorator.changes b/python-decorator.changes new file mode 100644 index 0000000..c45cf9f --- /dev/null +++ b/python-decorator.changes @@ -0,0 +1,256 @@ +------------------------------------------------------------------- +Fri Apr 21 12:24:11 UTC 2023 - Dirk Müller + +- add sle15_python_module_pythons (jsc#PED-68) + +------------------------------------------------------------------- +Thu Apr 13 22:40:52 UTC 2023 - Matej Cepl + +- Make calling of %{sle15modernpython} optional. + +------------------------------------------------------------------- +Mon Jan 10 22:16:37 UTC 2022 - Dirk Müller + +- update to 5.1.1: + * cythonized functions can now be decorated. + * fixed an issue in the `decorator_apply` example and + * regression fix for the "fix" in version 5.1 broke + ` decorator.contextmanager` even more. Both issues are now solved. + +------------------------------------------------------------------- +Sat Oct 16 20:56:50 UTC 2021 - Dirk Müller + +- update to 5.1.0: + * Added a function `decoratorx` using the `FunctionMaker` and thus + preserving the signature of `__code__` objects. + * Sphinx was printing a few warnings when building the documentation + * functions decorated with `decorator.contextmanager` were one-shot, + as discovered by Alex Pizarro. + * `decorator.decorator` was not passing the kwsyntax argument. +- drop kwsyntax.patch (usptream) + +------------------------------------------------------------------- +Thu Aug 5 15:25:53 UTC 2021 - Markéta Machová + +- Add upstream patch kwsyntax.patch + +------------------------------------------------------------------- +Tue Jul 27 06:15:15 UTC 2021 - Dirk Müller + +- update to 5.0.9: + * Fixed a test breaking PyPy. Restored support for Sphinx. + * Made the decorator module more robust when decorating builtin functions + lacking dunder attributes, like `dict.__setitem__`. + * The decorator module was not passing correctly the defaults inside the + `*args` tuple, thanks to Dan Shult for the fix. + * The decorator module was not copying the __module__ attribute anymore. + * Dropped support for Python < 3.5 with a substantial simplification of + the code base (now building a decorator does not require calling "exec"). + Added a way to mimic functools.wraps-generated decorators. + +------------------------------------------------------------------- +Sat Mar 14 15:50:24 UTC 2020 - Dirk Mueller + +- update to 4.4.2: + * removing the usage of `__file__`, that was breaking PyOxidizer. + * fixes for the future Python 3.9. + * some fixes for the future Python 3.10. + +------------------------------------------------------------------- +Fri Dec 20 19:11:44 UTC 2019 - Dirk Mueller + +- update to 4.4.1: + Changed the description to "Decorators for Humans" are requested by + several users. Fixed a .rst bug in the description as seen in PyPI. + +------------------------------------------------------------------- +Tue Mar 19 15:15:40 UTC 2019 - Tomáš Chvátal + +- Update to 4.4.0: + * Fixed a regression with decorator factories breaking the case with no + arguments by going back to the syntax used in version 4.2. + +------------------------------------------------------------------- +Wed Feb 13 17:32:05 UTC 2019 - Todd R + +- update to version 4.3.2 + * now the decorator module can decorate generator functions by + preserving their being generator functions + * Set `python_requires='>=2.6, !=3.0.*, !=3.1.*'` in setup.py +- update to version 4.3.1 + * Added a section "For the impatient" to the README, addressing + an issue raised by Amir Malekpour. + * Added support for Python 3.7. + * Now the path to the decorator module appears in the + tracebacks, as suggested by a user at EuroPython 2018. + +------------------------------------------------------------------- +Tue Dec 4 12:47:11 UTC 2018 - Matej Cepl + +- Remove superfluous devel dependency for noarch package + +------------------------------------------------------------------- +Tue Apr 17 11:05:41 UTC 2018 - jengelh@inai.de + +- Ensure neutrality of description. + +------------------------------------------------------------------- +Tue Apr 17 01:52:09 UTC 2018 - arun@gmx.de + +- update to version 4.3.0: + * Extended the decorator family facility to work with positional + arguments and updated the documentation. Removed + decorator.getargspec and provided decorator.getfullargspec + instead. This is convenient for users of Python 2.6/2.7, the + others can just use inspect.getfullargspec. + +------------------------------------------------------------------- +Wed Jan 17 04:02:48 UTC 2018 - arun@gmx.de + +- specfile: + - updated copyright year + +- updated to version 4.2.1: + * Fixed a regression breaking IPython reported by + https://github.com/spapini . + +- changes from version 4.2.0 : + * Added a facility to define families of decorators (aka decorators + with arguments) as requested by several users. Accepted a pylint + patch by David Allouche. + +------------------------------------------------------------------- +Wed Aug 9 14:14:10 UTC 2017 - tbechtold@suse.com + +- update to 4.1.2: + * Made it possible to define decorators converting coroutines into regular + functions. + * Changed the documentation build system to sphinx and uploaded the docs + on readthedocs.org. + * Support for Python 3.5 coroutines defined with `async def`, thanks to + Victor-Nicolae Savu who raised the issue of `iscoroutinefunction` not + giving the right answer for coroutines decorated with the decorator module. + +------------------------------------------------------------------- +Wed Apr 5 15:13:12 UTC 2017 - jmatejek@suse.com + +- fix source url + +------------------------------------------------------------------- +Sat Apr 1 21:20:43 UTC 2017 - toddrme2178@gmail.com + +- Update to 4.0.11 + * Small improvements to the documentation and tested with Python 3.6 +- Update to 4.0.10 + * Improved the documentation thanks to Tony Goodchild (zearin) who also + provided a much better CSS than the one I was using. +- Update to 4.0.9 + * Same as 4.0.7 and 4.0.8, re-uploaded due to issues on PyPI. +- Update to 4.0.7 + * Switched to a new changelog format (the one in http://keepachangelog.com/) + since it was contributed by Alexander Artemenko. Re-added a newline to support + old version of Python, as requested by [azjps](https://github.com/azjps). +- Update to 4.0.6 + * Removed a file x.py accidentally entered in the tarball. +- Update to 4.0.5 + * Documented a quirk signaled by David Goldstein when writing decorators + for functions with keyword arguments. Avoided copying the globals, + as signaled by Benjamin Peterson. +- Update to 4.0.4 + * Included a patch from Zev Benjamin: now decorated functions play well + with cProfile. +- Update to 4.0.3 + * Added a warning about the memoize example, as requested by Robert + Buchholz. +- Update to 4.0.2 + * docs/README.rst was not included in MANIFEST.in by accident, + thus breaking the source installation. +- Update to 4.0.1 + * Added docs directory and upload_docs command. Fixed bug with + `__qualname__`, reported by Lucian Petrut. +- Update to 4.0.0 + * Removed the need for 2to3 by dropping the support for Python 2.5. + * Added a MANIFEST.in file and produced a proper wheel. Improved + the integration with setuptools so that `python setup.py test` works. + * Reworked the documentation and introduced `decorator.decorated`. + * Removed any dependence from `inspect.getargspec`, which is deprecated + in Python 3.5, as signaled by Ralf Gommers. + * Fixed `contextmanager` to work with Python 3.5. + * Copied the `__qualname__` attribute, as requested by Frazer McLean. + * Added a `dispatch_on` facility to implement generic functions. +- Implement single-spec version. + +------------------------------------------------------------------- +Sat May 2 18:01:29 UTC 2015 - benoit.monin@gmx.fr + +- update to version 3.4.2: + * Same as 3.4.1, re-uploaded to PyPI +- additional changes from version 3.4.1: + * Ported the repository from GoogleCode to GitHub and added + Travis CI support + * Tests are executed with the new command `python test.py -v` + * setuptools is now mandatory in Python 3 + * The suggested installation tool is `pip`, not `easy_install` + * Supported IronPython and other Python implementations without + sys._getframe, as requested by Doug Blank +- remove python-nose from BuildRequires, unneeded +- replace README.txt with README.rst: changed upstream + +------------------------------------------------------------------- +Thu Oct 24 11:01:04 UTC 2013 - speilicke@suse.com + +- Require python-setuptools instead of distribute (upstreams merged) + +------------------------------------------------------------------- +Tue Jun 25 12:01:33 UTC 2013 - dmueller@suse.com + +- update to 3.4.0: + * Added the ability to use classes and generic callables as callers and + implemented a signature-preserving contexmanager decorator. Fixed a bug + with the signature f(**kw) in Python 3 and fixed a couple of doctests + broken by Python 3.3, both issues pointed out by Dominic Sacré (18/10/2012) + +------------------------------------------------------------------- +Wed May 23 07:56:17 UTC 2012 - highwaystar.ru@gmail.com + +- update to version 3.3.3 +- minor spec improvement +- python3 package added + +------------------------------------------------------------------- +Tue Nov 29 19:14:17 UTC 2011 - cfarrell@suse.com + +- license update: BSD-2-Clause + SPDX format + +------------------------------------------------------------------- +Thu Nov 24 13:38:58 UTC 2011 - idoenmez@suse.de + +- Update to upstream tarball, no code changes + +------------------------------------------------------------------- +Mon Sep 26 07:56:23 UTC 2011 - saschpe@suse.de + +- Add python-distribute (setuptools) BuildRequires, seemed to got lost + +------------------------------------------------------------------- +Thu Sep 1 09:56:17 UTC 2011 - saschpe@suse.de + +- Update to version 3.3.2 +- Added proper changes file + +------------------------------------------------------------------- +Thu Jan 7 00:00:00 UTC 2010 - hpj@urpla.net + +- Update to 3.3.0 + +------------------------------------------------------------------- +Mon Aug 10 00:00:00 UTC 2009 - cfarrell1980@gmail.com + +- Update to 3.0.1 + +------------------------------------------------------------------- +Tue Dec 2 00:00:00 UTC 2008 - jfunk@funktronics.ca + +- Initial release + diff --git a/python-decorator.spec b/python-decorator.spec new file mode 100644 index 0000000..e330374 --- /dev/null +++ b/python-decorator.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-decorator +# +# 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/ +# + + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global skip_python2 1 +%{?sle15_python_module_pythons} +Name: python-decorator +Version: 5.1.1 +Release: 0 +Summary: Decorators for Humans +License: BSD-2-Clause +Group: Development/Languages/Python +URL: https://github.com/micheles/decorator +Source: https://files.pythonhosted.org/packages/source/d/decorator/decorator-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: dos2unix +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildArch: noarch +%python_subpackages + +%description +Typical implementations of Python decorators involve nested +functions, and do not preserve the signature of decorated functions, +thus can be confusing to both developers and documentation tools. + +This module changes the usage of decorators for the average +programmer so as to make decorators such as memoize, tracing, +redirecting_stdout, locked, etc. more accessible. + +%prep +%setup -q -n decorator-%{version} +%autopatch -p1 + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python src/tests/test.py -v + +%files %{python_files} +%license LICENSE.txt +%doc CHANGES.md README.rst +%{python_sitelib}/decorator.py* +%pycache_only %{python_sitelib}/__pycache__/decorator.*.py* +%{python_sitelib}/decorator-%{version}-py*.egg-info + +%changelog