Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-lazy-object-proxy for
openSUSE:Factory checked in at 2023-05-09 13:06:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-lazy-object-proxy (Old)
and /work/SRC/openSUSE:Factory/.python-lazy-object-proxy.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-lazy-object-proxy"
Tue May 9 13:06:52 2023 rev:16 rq:1085123 version:1.9.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-lazy-object-proxy/python-lazy-object-proxy.changes
2023-04-22 22:03:38.522357746 +0200
+++
/work/SRC/openSUSE:Factory/.python-lazy-object-proxy.new.1533/python-lazy-object-proxy.changes
2023-05-09 13:07:03.540921408 +0200
@@ -1,0 +2,15 @@
+Fri May 5 13:42:30 UTC 2023 - Dirk Müller <[email protected]>
+
+- update to 1.9.0:
+ * Added support for matrix multiplication operator (``@``).
+ * Should have all the wheels now (including the manylinux
+ ones).
+ * Bumped minimum version requirements for setuptools and
+ setuptools-scm.
+ * Switched the default pure python fallback implementation to
+ the "simple" one (when you ``from lazy_object_proxy import
+ Proxy`` and the C extension is not available).
+ Previously the "slots" implementation was used but as it
+ turns out it is slower on Python 3.
+
+-------------------------------------------------------------------
Old:
----
lazy-object-proxy-1.8.0.tar.gz
New:
----
lazy-object-proxy-1.9.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-lazy-object-proxy.spec ++++++
--- /var/tmp/diff_new_pack.7by3FM/_old 2023-05-09 13:07:04.412926598 +0200
+++ /var/tmp/diff_new_pack.7by3FM/_new 2023-05-09 13:07:04.416926621 +0200
@@ -28,7 +28,7 @@
%global skip_python2 1
%{?sle15_python_module_pythons}
Name: python-lazy-object-proxy%{psuffix}
-Version: 1.8.0
+Version: 1.9.0
Release: 0
Summary: Rebuild a new abstract syntax tree from Python's ast
License: BSD-2-Clause
@@ -36,8 +36,8 @@
URL: https://github.com/ionelmc/python-lazy-object-proxy
Source:
https://files.pythonhosted.org/packages/source/l/lazy-object-proxy/lazy-object-proxy-%{version}.tar.gz
BuildRequires: %{python_module devel}
-BuildRequires: %{python_module setuptools_scm >= 3.3.1}
-BuildRequires: %{python_module setuptools}
+BuildRequires: %{python_module setuptools >= 45}
+BuildRequires: %{python_module setuptools_scm >= 6.2}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Obsoletes: python-lazy_object_proxy < %{version}-%{release}
++++++ lazy-object-proxy-1.8.0.tar.gz -> lazy-object-proxy-1.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/.bumpversion.cfg
new/lazy-object-proxy-1.9.0/.bumpversion.cfg
--- old/lazy-object-proxy-1.8.0/.bumpversion.cfg 2022-10-26
15:09:21.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/.bumpversion.cfg 2023-01-04
19:21:34.000000000 +0100
@@ -1,5 +1,5 @@
[bumpversion]
-current_version = 1.8.0
+current_version = 1.9.0
commit = True
tag = True
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/.cookiecutterrc
new/lazy-object-proxy-1.9.0/.cookiecutterrc
--- old/lazy-object-proxy-1.8.0/.cookiecutterrc 2022-10-26 11:21:36.000000000
+0200
+++ new/lazy-object-proxy-1.9.0/.cookiecutterrc 2023-01-04 19:15:22.000000000
+0100
@@ -54,4 +54,4 @@
version_manager: bump2version
website: https://blog.ionelmc.ro
year_from: '2014'
- year_to: '2022'
+ year_to: '2023'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/.git-archival.txt
new/lazy-object-proxy-1.9.0/.git-archival.txt
--- old/lazy-object-proxy-1.8.0/.git-archival.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/lazy-object-proxy-1.9.0/.git-archival.txt 2023-01-04
17:59:28.000000000 +0100
@@ -0,0 +1,4 @@
+node: $Format:%H$
+node-date: $Format:%cI$
+describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
+ref-names: $Format:%D$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/.gitattributes
new/lazy-object-proxy-1.9.0/.gitattributes
--- old/lazy-object-proxy-1.8.0/.gitattributes 1970-01-01 01:00:00.000000000
+0100
+++ new/lazy-object-proxy-1.9.0/.gitattributes 2023-01-04 17:59:28.000000000
+0100
@@ -0,0 +1 @@
+.git_archival.txt export-subst
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/.pre-commit-config.yaml
new/lazy-object-proxy-1.9.0/.pre-commit-config.yaml
--- old/lazy-object-proxy-1.8.0/.pre-commit-config.yaml 2022-10-26
11:22:50.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/.pre-commit-config.yaml 2023-01-04
17:59:20.000000000 +0100
@@ -5,20 +5,20 @@
exclude: '^(\.tox|ci/templates|\.bumpversion\.cfg)(/|$)'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.3.0
+ rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- repo: https://github.com/timothycrosley/isort
- rev: 5.10.1
+ rev: v5.11.3
hooks:
- id: isort
- repo: https://github.com/psf/black
- rev: 22.10.0
+ rev: 22.12.0
hooks:
- id: black
- - repo: https://gitlab.com/pycqa/flake8
- rev: 3.9.2
+ - repo: https://github.com/pycqa/flake8
+ rev: 6.0.0
hooks:
- id: flake8
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/CHANGELOG.rst
new/lazy-object-proxy-1.9.0/CHANGELOG.rst
--- old/lazy-object-proxy-1.8.0/CHANGELOG.rst 2022-10-26 13:20:39.000000000
+0200
+++ new/lazy-object-proxy-1.9.0/CHANGELOG.rst 2023-01-04 19:19:51.000000000
+0100
@@ -2,6 +2,16 @@
Changelog
=========
+1.9.0 (2023-01-04)
+------------------
+
+* Added support for matrix multiplication operator (``@``).
+* Should have all the wheels now (including the manylinux ones).
+* Bumped minimum version requirements for setuptools and setuptools-scm.
+* Switched the default pure python fallback implementation to the "simple" one
(when you ``from lazy_object_proxy import Proxy``
+ and the C extension is not available).
+ Previously the "slots" implementation was used but as it turns out it is
slower on Python 3.
+
1.8.0 (2022-10-26)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/CONTRIBUTING.rst
new/lazy-object-proxy-1.9.0/CONTRIBUTING.rst
--- old/lazy-object-proxy-1.8.0/CONTRIBUTING.rst 2022-10-26
11:21:35.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/CONTRIBUTING.rst 2023-01-04
19:21:09.000000000 +0100
@@ -49,7 +49,7 @@
Now you can make your changes locally.
-4. When you're done making changes run all the checks and docs builder with
`tox <https://tox.readthedocs.io/en/latest/install.html>`_ one command::
+4. When you're done making changes run all the checks and docs builder with
`tox <https://tox.wiki/en/latest/installation.html>`_ one command::
tox
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/LICENSE
new/lazy-object-proxy-1.9.0/LICENSE
--- old/lazy-object-proxy-1.8.0/LICENSE 2022-10-26 11:22:50.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/LICENSE 2023-01-04 19:15:22.000000000 +0100
@@ -1,6 +1,6 @@
BSD 2-Clause License
-Copyright (c) 2014-2022, Ionel Cristian MÄrieÈ. All rights reserved.
+Copyright (c) 2014-2023, Ionel Cristian MÄrieÈ. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the
following conditions are met:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/PKG-INFO
new/lazy-object-proxy-1.9.0/PKG-INFO
--- old/lazy-object-proxy-1.8.0/PKG-INFO 2022-10-26 15:10:03.500244900
+0200
+++ new/lazy-object-proxy-1.9.0/PKG-INFO 2023-01-04 20:54:45.887931800
+0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: lazy-object-proxy
-Version: 1.8.0
+Version: 1.9.0
Summary: A fast and thorough lazy object proxy.
Home-page: https://github.com/ionelmc/python-lazy-object-proxy
Author: Ionel Cristian MÄrieÈ
@@ -96,6 +96,16 @@
Changelog
=========
+1.9.0 (2023-01-04)
+------------------
+
+* Added support for matrix multiplication operator (``@``).
+* Should have all the wheels now (including the manylinux ones).
+* Bumped minimum version requirements for setuptools and setuptools-scm.
+* Switched the default pure python fallback implementation to the "simple" one
(when you ``from lazy_object_proxy import Proxy``
+ and the C extension is not available).
+ Previously the "slots" implementation was used but as it turns out it is
slower on Python 3.
+
1.8.0 (2022-10-26)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/README.rst
new/lazy-object-proxy-1.9.0/README.rst
--- old/lazy-object-proxy-1.8.0/README.rst 2022-10-26 15:09:21.000000000
+0200
+++ new/lazy-object-proxy-1.9.0/README.rst 2023-01-04 19:21:34.000000000
+0100
@@ -51,9 +51,9 @@
:alt: Supported implementations
:target: https://pypi.org/project/lazy-object-proxy
-.. |commits-since| image::
https://img.shields.io/github/commits-since/ionelmc/python-lazy-object-proxy/v1.8.0.svg
+.. |commits-since| image::
https://img.shields.io/github/commits-since/ionelmc/python-lazy-object-proxy/v1.9.0.svg
:alt: Commits since latest release
- :target:
https://github.com/ionelmc/python-lazy-object-proxy/compare/v1.8.0...master
+ :target:
https://github.com/ionelmc/python-lazy-object-proxy/compare/v1.9.0...master
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/docs/conf.py
new/lazy-object-proxy-1.9.0/docs/conf.py
--- old/lazy-object-proxy-1.8.0/docs/conf.py 2022-10-26 15:09:21.000000000
+0200
+++ new/lazy-object-proxy-1.9.0/docs/conf.py 2023-01-04 19:21:34.000000000
+0100
@@ -19,7 +19,7 @@
source_suffix = '.rst'
master_doc = 'index'
project = 'lazy-object-proxy'
-year = '2014-2022'
+year = '2014-2023'
author = 'Ionel Cristian MÄrieÈ'
copyright = '{0}, {1}'.format(year, author)
try:
@@ -28,7 +28,7 @@
version = release = get_distribution('lazy_object_proxy').version
except Exception:
traceback.print_exc()
- version = release = '1.8.0'
+ version = release = '1.9.0'
pygments_style = 'trac'
templates_path = ['.']
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/pyproject.toml
new/lazy-object-proxy-1.9.0/pyproject.toml
--- old/lazy-object-proxy-1.8.0/pyproject.toml 2022-10-26 11:21:35.000000000
+0200
+++ new/lazy-object-proxy-1.9.0/pyproject.toml 2023-01-04 17:59:28.000000000
+0100
@@ -1,8 +1,8 @@
[build-system]
requires = [
- "setuptools>=30.3.0",
"wheel",
- "setuptools_scm>=3.3.1",
+ "setuptools>=45",
+ "setuptools_scm[toml]>=6.2"
]
[tool.black]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/setup.py
new/lazy-object-proxy-1.9.0/setup.py
--- old/lazy-object-proxy-1.8.0/setup.py 2022-10-26 15:09:21.000000000
+0200
+++ new/lazy-object-proxy-1.9.0/setup.py 2023-01-04 19:21:34.000000000
+0100
@@ -74,7 +74,7 @@
use_scm_version={
'local_scheme': 'dirty-tag',
'write_to': 'src/lazy_object_proxy/_version.py',
- 'fallback_version': '1.8.0',
+ 'fallback_version': '1.9.0',
},
license='BSD-2-Clause',
description='A fast and thorough lazy object proxy.',
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/__init__.py
new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/__init__.py
--- old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/__init__.py
2022-10-26 15:09:21.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/__init__.py
2023-01-04 19:21:34.000000000 +0100
@@ -11,13 +11,13 @@
from .cext import Proxy
from .cext import identity
except ImportError:
- from .slots import Proxy
+ from .simple import Proxy
else:
copyreg.constructor(identity)
try:
from ._version import version as __version__
except ImportError:
- __version__ = '1.8.0'
+ __version__ = '1.9.0'
__all__ = ("Proxy",)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/_version.py
new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/_version.py
--- old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/_version.py
2022-10-26 15:10:03.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/_version.py
2023-01-04 20:54:45.000000000 +0100
@@ -1,5 +1,5 @@
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
-version = '1.8.0'
-version_tuple = (1, 8, 0)
+version = '1.9.0'
+version_tuple = (1, 9, 0)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/cext.c
new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/cext.c
--- old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/cext.c 2021-12-15
14:59:37.000000000 +0100
+++ new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/cext.c 2023-01-04
17:58:54.000000000 +0100
@@ -248,6 +248,16 @@
/* ------------------------------------------------------------------------- */
+static PyObject *Proxy_matrix_multiply(PyObject *o1, PyObject *o2)
+{
+ Proxy__WRAPPED_REPLACE_OR_RETURN_NULL(o1);
+ Proxy__WRAPPED_REPLACE_OR_RETURN_NULL(o2);
+
+ return PyNumber_MatrixMultiply(o1, o2);
+}
+
+/* ------------------------------------------------------------------------- */
+
static PyObject *Proxy_remainder(PyObject *o1, PyObject *o2)
{
Proxy__WRAPPED_REPLACE_OR_RETURN_NULL(o1);
@@ -458,6 +468,28 @@
/* ------------------------------------------------------------------------- */
+static PyObject *Proxy_inplace_matrix_multiply(
+ ProxyObject *self, PyObject *other)
+{
+ PyObject *object = NULL;
+
+ Proxy__ENSURE_WRAPPED_OR_RETURN_NULL(self);
+ Proxy__WRAPPED_REPLACE_OR_RETURN_NULL(other);
+
+ object = PyNumber_InPlaceMatrixMultiply(self->wrapped, other);
+
+ if (!object)
+ return NULL;
+
+ Py_DECREF(self->wrapped);
+ self->wrapped = object;
+
+ Py_INCREF(self);
+ return (PyObject *)self;
+}
+
+/* ------------------------------------------------------------------------- */
+
static PyObject *Proxy_inplace_remainder(
ProxyObject *self, PyObject *other)
{
@@ -1239,6 +1271,8 @@
(binaryfunc)Proxy_inplace_floor_divide, /*nb_inplace_floor_divide*/
(binaryfunc)Proxy_inplace_true_divide, /*nb_inplace_true_divide*/
(unaryfunc)Proxy_index, /*nb_index*/
+ (binaryfunc)Proxy_matrix_multiply, /*nb_matrix_multiply*/
+ (binaryfunc)Proxy_inplace_matrix_multiply,
/*nb_inplace_matrix_multiply*/
};
static PySequenceMethods Proxy_as_sequence = {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/simple.py
new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/simple.py
--- old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/simple.py 2022-10-26
12:18:46.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/simple.py 2023-01-04
17:58:54.000000000 +0100
@@ -141,6 +141,7 @@
__add__ = make_proxy_method(operator.add)
__sub__ = make_proxy_method(operator.sub)
__mul__ = make_proxy_method(operator.mul)
+ __matmul__ = make_proxy_method(operator.matmul)
__truediv__ = make_proxy_method(operator.truediv)
__floordiv__ = make_proxy_method(operator.floordiv)
__mod__ = make_proxy_method(operator.mod)
@@ -161,6 +162,9 @@
def __rmul__(self, other):
return other * self.__wrapped__
+ def __rmatmul__(self, other):
+ return other @ self.__wrapped__
+
def __rdiv__(self, other):
return operator.div(other, self.__wrapped__)
@@ -197,6 +201,7 @@
__iadd__ = make_proxy_method(operator.iadd)
__isub__ = make_proxy_method(operator.isub)
__imul__ = make_proxy_method(operator.imul)
+ __imatmul__ = make_proxy_method(operator.imatmul)
__itruediv__ = make_proxy_method(operator.itruediv)
__ifloordiv__ = make_proxy_method(operator.ifloordiv)
__imod__ = make_proxy_method(operator.imod)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/slots.py
new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/slots.py
--- old/lazy-object-proxy-1.8.0/src/lazy_object_proxy/slots.py 2022-10-26
12:19:15.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/src/lazy_object_proxy/slots.py 2023-01-04
17:58:54.000000000 +0100
@@ -226,6 +226,9 @@
def __mul__(self, other):
return self.__wrapped__ * other
+ def __matmul__(self, other):
+ return self.__wrapped__ @ other
+
def __truediv__(self, other):
return operator.truediv(self.__wrapped__, other)
@@ -265,6 +268,9 @@
def __rmul__(self, other):
return other * self.__wrapped__
+ def __rmatmul__(self, other):
+ return other @ self.__wrapped__
+
def __rdiv__(self, other):
return operator.div(other, self.__wrapped__)
@@ -310,8 +316,8 @@
self.__wrapped__ *= other
return self
- def __idiv__(self, other):
- self.__wrapped__ = operator.idiv(self.__wrapped__, other)
+ def __imatmul__(self, other):
+ self.__wrapped__ @= other
return self
def __itruediv__(self, other):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazy-object-proxy-1.8.0/src/lazy_object_proxy.egg-info/PKG-INFO
new/lazy-object-proxy-1.9.0/src/lazy_object_proxy.egg-info/PKG-INFO
--- old/lazy-object-proxy-1.8.0/src/lazy_object_proxy.egg-info/PKG-INFO
2022-10-26 15:10:03.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/src/lazy_object_proxy.egg-info/PKG-INFO
2023-01-04 20:54:45.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: lazy-object-proxy
-Version: 1.8.0
+Version: 1.9.0
Summary: A fast and thorough lazy object proxy.
Home-page: https://github.com/ionelmc/python-lazy-object-proxy
Author: Ionel Cristian MÄrieÈ
@@ -96,6 +96,16 @@
Changelog
=========
+1.9.0 (2023-01-04)
+------------------
+
+* Added support for matrix multiplication operator (``@``).
+* Should have all the wheels now (including the manylinux ones).
+* Bumped minimum version requirements for setuptools and setuptools-scm.
+* Switched the default pure python fallback implementation to the "simple" one
(when you ``from lazy_object_proxy import Proxy``
+ and the C extension is not available).
+ Previously the "slots" implementation was used but as it turns out it is
slower on Python 3.
+
1.8.0 (2022-10-26)
------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazy-object-proxy-1.8.0/src/lazy_object_proxy.egg-info/SOURCES.txt
new/lazy-object-proxy-1.9.0/src/lazy_object_proxy.egg-info/SOURCES.txt
--- old/lazy-object-proxy-1.8.0/src/lazy_object_proxy.egg-info/SOURCES.txt
2022-10-26 15:10:03.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/src/lazy_object_proxy.egg-info/SOURCES.txt
2023-01-04 20:54:45.000000000 +0100
@@ -2,6 +2,8 @@
.cookiecutterrc
.coveragerc
.editorconfig
+.git-archival.txt
+.gitattributes
.gitignore
.pre-commit-config.yaml
.readthedocs.yml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/lazy-object-proxy-1.8.0/tests/test_lazy_object_proxy.py
new/lazy-object-proxy-1.9.0/tests/test_lazy_object_proxy.py
--- old/lazy-object-proxy-1.8.0/tests/test_lazy_object_proxy.py 2022-10-26
12:09:28.000000000 +0200
+++ new/lazy-object-proxy-1.9.0/tests/test_lazy_object_proxy.py 2023-01-04
18:51:34.000000000 +0100
@@ -912,6 +912,38 @@
assert two * 3 == 2 * 3
+def test_matmul(lop):
+ class MatmulClass:
+ def __init__(self, value):
+ self.value = value
+
+ def __matmul__(self, other):
+ return self.value * other.value
+
+ def __rmatmul__(self, other):
+ return other + self.value
+
+ one = MatmulClass(123)
+ two = MatmulClass(234)
+ assert one @ two == 28782
+
+ one = lop.Proxy(lambda: MatmulClass(123))
+ two = lop.Proxy(lambda: MatmulClass(234))
+ assert one @ two == 28782
+
+ one = lop.Proxy(lambda: MatmulClass(123))
+ two = MatmulClass(234)
+ assert one @ two == 28782
+
+ one = 123
+ two = lop.Proxy(lambda: MatmulClass(234))
+ assert one @ two == 357
+
+ one = lop.Proxy(lambda: 123)
+ two = lop.Proxy(lambda: MatmulClass(234))
+ assert one @ two == 357
+
+
def test_div(lop):
# On Python 2 this will pick up div and on Python
# 3 it will pick up truediv.
@@ -1065,6 +1097,27 @@
if lop.kind != 'simple':
assert type(value) == lop.Proxy
+
+
+def test_imatmul(lop):
+ class InplaceMatmul:
+ value = None
+
+ def __imatmul__(self, other):
+ self.value = other
+ return self
+
+ value = InplaceMatmul()
+ assert value.value is None
+ value @= 123
+ assert value.value == 123
+
+ value = lop.Proxy(InplaceMatmul)
+ value @= 234
+ assert value.value == 234
+
+ if lop.kind != 'simple':
+ assert type(value) == lop.Proxy
def test_idiv(lop):