forked from pool/python-decorator
Accepting request 910347 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/910347 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-decorator?expand=0&rev=23
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e3a62f0520172440ca0dcc823749319382e377f37f140a0b99ef45fecb84bfe7
|
||||
size 33629
|
||||
3
decorator-5.0.9.tar.gz
Normal file
3
decorator-5.0.9.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:72ecfba4320a893c53f9706bebb2d55c270c1e51a28789361aa93e4a21319ed5
|
||||
size 34544
|
||||
36
kwsyntax.patch
Normal file
36
kwsyntax.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 817d070db3c9cc5900d118837c533c039982b050 Mon Sep 17 00:00:00 2001
|
||||
From: Michele Simionato <michele.simionato@gmail.com>
|
||||
Date: Fri, 28 May 2021 08:30:09 +0200
|
||||
Subject: [PATCH] Fixed decorator.decorator not passing kwsyntax
|
||||
|
||||
---
|
||||
CHANGES.md | 2 ++
|
||||
src/decorator.py | 2 +-
|
||||
2 files changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/CHANGES.md b/CHANGES.md
|
||||
index 596559b..876df34 100644
|
||||
--- a/CHANGES.md
|
||||
+++ b/CHANGES.md
|
||||
@@ -3,6 +3,8 @@ HISTORY
|
||||
|
||||
## unreleased
|
||||
|
||||
+decorator.decorator was not passing the kwsyntax.
|
||||
+
|
||||
## 5.0.9 (2021-05-16)
|
||||
|
||||
Fixed a test breaking PyPy. Restored support for Sphinx.
|
||||
diff --git a/src/decorator.py b/src/decorator.py
|
||||
index 438dff6..dab0d7c 100644
|
||||
--- a/src/decorator.py
|
||||
+++ b/src/decorator.py
|
||||
@@ -265,7 +265,7 @@ def decorator(caller, _func=None, kwsyntax=False):
|
||||
"""
|
||||
if _func is not None: # return a decorated function
|
||||
# this is obsolete behavior; you should use decorate instead
|
||||
- return decorate(_func, caller)
|
||||
+ return decorate(_func, caller, (), kwsyntax)
|
||||
# else return a decorator function
|
||||
sig = inspect.signature(caller)
|
||||
dec_params = [p for p in sig.parameters.values() if p.kind is POS]
|
||||
@@ -1,3 +1,22 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Aug 5 15:25:53 UTC 2021 - Markéta Machová <mmachova@suse.com>
|
||||
|
||||
- Add upstream patch kwsyntax.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 27 06:15:15 UTC 2021 - Dirk Müller <dmueller@suse.com>
|
||||
|
||||
- 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 <dmueller@suse.com>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-decorator
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -19,14 +19,17 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%global skip_python2 1
|
||||
Name: python-decorator
|
||||
Version: 4.4.2
|
||||
Version: 5.0.9
|
||||
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
|
||||
# PATCH-FIX-UPSTREAM https://github.com/micheles/decorator/commit/817d070db3c9cc5900d118837c533c039982b050 Fixed decorator.decorator not passing kwsyntax
|
||||
Patch0: kwsyntax.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
@@ -45,6 +48,7 @@ redirecting_stdout, locked, etc. more accessible.
|
||||
|
||||
%prep
|
||||
%setup -q -n decorator-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
Reference in New Issue
Block a user