forked from pool/python-wrapt
Compare commits
10 Commits
| Author | SHA256 | Date | |
|---|---|---|---|
| 2825a01b31 | |||
| 47329f25cf | |||
| c25c4318c0 | |||
| 288d3c8a90 | |||
| 9c5cffe16f | |||
| cad3f9eb23 | |||
| f22020647a | |||
| 24a4468b88 | |||
| 7c19886876 | |||
| a5a43c8d1f |
BIN
1.16.0.tar.gz
LFS
BIN
1.16.0.tar.gz
LFS
Binary file not shown.
3
2.0.1.tar.gz
Normal file
3
2.0.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:54dd4dd4f357e398ffc3d70b7d89cc56b8e5e535dc1a4de2e5015f05e4896be6
|
||||||
|
size 184792
|
||||||
@@ -1,3 +1,121 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 26 01:59:50 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Update to 2.0.1:
|
||||||
|
## New Features
|
||||||
|
* Added __all__ attribute to wrapt module to expose the public API.
|
||||||
|
* The wrapt.PartialCallableObjectProxy class can now be accessed via the
|
||||||
|
alias wrapt.partial, which is a convenience for users who are used to
|
||||||
|
using functools.partial and want to use the wrapt version of it.
|
||||||
|
* Type hints have been added to the wrapt module.
|
||||||
|
* Added wrapt.BaseObjectProxy class which is the base class for all object
|
||||||
|
proxy classes.
|
||||||
|
* Added wrapt.AutoObjectProxy class which is a pure Python subclass of
|
||||||
|
BaseObjectProxy which overrides the __new__() method to dynamically
|
||||||
|
generate a custom subclass which includes methods for callable,
|
||||||
|
descriptor and iterator protocols, as well as other select special
|
||||||
|
methods.
|
||||||
|
* Added wrapt.LazyObjectProxy class which is a variant of AutoObjectProxy
|
||||||
|
which takes a callable which returns the object to be wrapped. The
|
||||||
|
callable is only invoked the first time an attribute of the wrapped
|
||||||
|
object is accessed.
|
||||||
|
* Added wrapt.lazy_import() function which takes a module name and returns
|
||||||
|
a LazyObjectProxy which will import the module when it is first needed.
|
||||||
|
## Features Changed
|
||||||
|
* Code related to Python 2.X and workarounds for older Python 3.X versions
|
||||||
|
has been removed.
|
||||||
|
* Dependency at runtime on setuptools for calculating package entry points
|
||||||
|
has been removed. Instead the importlib.metadata module is now used for
|
||||||
|
this purpose.
|
||||||
|
* For reasons to do with backward/forward compatibility the wrapt module
|
||||||
|
included references to getcallargs() and formatargspec() functions which
|
||||||
|
were part of the inspect module at one time or another. These were
|
||||||
|
provided as convenience for users of the wrapt module, but were not
|
||||||
|
actually part of the public API. They have now been removed from the
|
||||||
|
wrapt module and are no longer available.
|
||||||
|
* The enabled, adapter and proxy arguments to the @decorator decorator had
|
||||||
|
to be keyword parameters, and the initial wrapped argument had to be
|
||||||
|
positional only. Because though Python 2.X was still being supported it
|
||||||
|
was not possible to use appropriate syntax to mark them as such. These
|
||||||
|
arguments are now marked as positional and keyword only parameters in the
|
||||||
|
function signature as appropriate.
|
||||||
|
* The object proxy classes now raise a WrapperNotInitializedError exception
|
||||||
|
rather than Python builtin ValueError exception when an attempt is made
|
||||||
|
to access an attribute of the wrapped object before the wrapper has been
|
||||||
|
initialized.
|
||||||
|
## Bugs Fixed
|
||||||
|
* The wrapt.lazy_import() function wasn't included in the __all__ attribute
|
||||||
|
of the wrapt module.
|
||||||
|
* When using wrapt.lazy_import() to lazily import a function of a module,
|
||||||
|
the resulting proxy object wasn't marked as callable until something
|
||||||
|
triggered the import of the module via the proxy. This meant a callable()
|
||||||
|
check on the proxy would return False until the module was actually
|
||||||
|
imported.
|
||||||
|
* Reference count was not being incremented on type object for C
|
||||||
|
implementation of the partial callable object proxy when module was
|
||||||
|
initialized. If wrapt was being used in Python sub interpreters which
|
||||||
|
were deleted it could lead to the process crashing.
|
||||||
|
* Wasn't chaining __mro_entries__() calls when the wrapped object was not a
|
||||||
|
type (class) and itself had a __mro_entries__() method. This meant that
|
||||||
|
if using the object proxy as a base class for a generic class, the
|
||||||
|
generic parameters were being ignored.
|
||||||
|
* When an object proxy wrapped an immutable type, such as an integer, and
|
||||||
|
the object proxy had been assigned to a second variable, the result of an
|
||||||
|
in-place operation on the second variable was also affecting the first
|
||||||
|
variable, when instead the lifetime of the two variables should have been
|
||||||
|
independent to reflect what occurs for normal immutable types.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Oct 16 14:09:34 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.17.3
|
||||||
|
* Added universal binary wheels for macOS. That is, contains
|
||||||
|
both x86_64 and arm64 architectures in the same wheel.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jun 13 02:42:47 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Switch to pyproject macros.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Feb 28 08:57:55 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
- Update to 1.17.2
|
||||||
|
* Added universal binary wheels for macOS. That is, contains
|
||||||
|
both x86_64 and arm64 architectures in the same wheel.
|
||||||
|
- from version 1.17.1
|
||||||
|
* Due to GitHub actions changes, binary wheels were missing
|
||||||
|
for macOS Intel.
|
||||||
|
* Not implemented error for __reduce__() on ObjectProxy was
|
||||||
|
incorrectly displaying the error as being on __reduce_ex__().
|
||||||
|
- from version 1.17.0
|
||||||
|
* Add __format__() method to ObjectProxy class to allow formatting
|
||||||
|
of wrapped object.
|
||||||
|
* Added C extension internal flag to indicate that wrapt should be
|
||||||
|
safe for Python 3.13 free threading mode. Releases will include
|
||||||
|
free threading variants of Python wheels. Note that as free
|
||||||
|
threading is new, one should be cautious about using it in
|
||||||
|
production until it has been more widely tested.
|
||||||
|
* When a normal function or builtin function which had wrapt.decorator
|
||||||
|
or a function wrapper applied, was assigned as a class attribute,
|
||||||
|
and the function attribute called via the class or an instance of
|
||||||
|
the class, an additional argument was being passed, inserted as the
|
||||||
|
first argument, which was the class or instance. This was not the
|
||||||
|
correct behaviour and the class or instance should not have been
|
||||||
|
passed as the first argument.
|
||||||
|
* When an instance of a callable class object was wrapped which didn’t
|
||||||
|
not have a __get__() method for binding, and it was called in context
|
||||||
|
where binding would be attempted, it would fail with error that __get__()
|
||||||
|
did not exist when instead it should have been called directly, ignoring
|
||||||
|
that binding was not possible.
|
||||||
|
* The __round__ hook for the object proxy didn’t accept ndigits argument.
|
||||||
|
- Drop py313-classmethods.patch, merged upstream
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 28 11:56:13 UTC 2024 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- add py313-classmethods.patch to fix test failures with py313
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Nov 27 20:31:38 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Mon Nov 27 20:31:38 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-wrapt
|
# spec file for package python-wrapt
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
|
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
@@ -19,16 +19,18 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-wrapt
|
Name: python-wrapt
|
||||||
Version: 1.16.0
|
Version: 2.0.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: A Python module for decorators, wrappers and monkey patching
|
Summary: A Python module for decorators, wrappers and monkey patching
|
||||||
License: BSD-2-Clause
|
License: BSD-2-Clause
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/GrahamDumpleton/wrapt
|
URL: https://github.com/GrahamDumpleton/wrapt
|
||||||
Source: https://github.com/GrahamDumpleton/wrapt/archive/%{version}.tar.gz
|
Source: https://github.com/GrahamDumpleton/wrapt/archive/%{version}.tar.gz
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
|
BuildRequires: %{python_module mypy}
|
||||||
|
BuildRequires: %{python_module pip}
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
@@ -62,10 +64,10 @@ For further information on the **wrapt** module see:
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags}"
|
export CFLAGS="%{optflags}"
|
||||||
%python_build
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@@ -73,8 +75,8 @@ export CFLAGS="%{optflags}"
|
|||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.rst docs/changes.rst
|
%doc README.md docs/changes.rst
|
||||||
%{python_sitearch}/wrapt
|
%{python_sitearch}/wrapt
|
||||||
%{python_sitearch}/wrapt-%{version}*-info
|
%{python_sitearch}/wrapt-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
Reference in New Issue
Block a user