Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-kiwisolver for openSUSE:Factory checked in at 2025-01-15 17:42:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-kiwisolver (Old)
and /work/SRC/openSUSE:Factory/.python-kiwisolver.new.1881 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-kiwisolver"
Wed Jan 15 17:42:22 2025 rev:12 rq:1237808 version:1.4.8
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-kiwisolver/python-kiwisolver.changes 2024-10-25 19:18:43.788341273 +0200
+++ /work/SRC/openSUSE:Factory/.python-kiwisolver.new.1881/python-kiwisolver.changes 2025-01-15 17:42:29.854936692 +0100
@@ -1,0 +2,8 @@
+Tue Jan 14 10:16:44 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz(a)suse.com>
+
+- Update to 1.4.8
+ * Drop support for Python 3.8 and 3.9
+ * Do not link to MSVCP on Windows and drop windows 32 bits support
+ * Add support for free-threaded builds on Python 3.13
+
+-------------------------------------------------------------------
Old:
----
kiwisolver-1.4.7.tar.gz
New:
----
kiwisolver-1.4.8.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-kiwisolver.spec ++++++
--- /var/tmp/diff_new_pack.IUOXZK/_old 2025-01-15 17:42:30.518964216 +0100
+++ /var/tmp/diff_new_pack.IUOXZK/_new 2025-01-15 17:42:30.518964216 +0100
@@ -1,7 +1,7 @@
#
# spec file for package python-kiwisolver
#
-# Copyright (c) 2024 SUSE LLC
+# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-kiwisolver
-Version: 1.4.7
+Version: 1.4.8
Release: 0
Summary: An implementation of the Cassowary constraint solver
License: BSD-3-Clause
++++++ kiwisolver-1.4.7.tar.gz -> kiwisolver-1.4.8.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/.github/workflows/ci.yml new/kiwisolver-1.4.8/.github/workflows/ci.yml
--- old/kiwisolver-1.4.7/.github/workflows/ci.yml 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/.github/workflows/ci.yml 2024-12-24 18:54:47.000000000 +0100
@@ -22,15 +22,15 @@
runs-on: ubuntu-latest
strategy:
matrix:
- python-version: ['3.9']
+ python-version: ['3.12']
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -60,7 +60,7 @@
matrix:
os: [ubuntu-latest]
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
@@ -78,22 +78,20 @@
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
- python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13-dev', 'pypy-3.8', 'pypy-3.9', 'pypy-3.10']
+ python-version: ['3.10', '3.11', '3.12', '3.13', '3.13t', 'pypy-3.10']
exclude:
- - python-version: '3.8'
- os: macos-latest
- - python-version: '3.9'
- os: macos-latest
- - python-version: 'pypy-3.8'
- os: macos-latest
+ # TODO: Reenable this once there's a setuptools release that sets Py_GIL_DISABLED
+ # correctly on Windows
+ - os: windows-latest
+ python-version: 3.13t
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python ${{ matrix.python-version }}
- uses: actions/setup-python@v4
+ uses: Quansight-Labs/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
@@ -113,7 +111,7 @@
run: |
bash -c "find . -type f -name '*.gcno' -exec gcov -pb --all-blocks {} +" || true
- name: Upload coverage to Codecov
- uses: codecov/codecov-action@v3
+ uses: codecov/codecov-action@v5
if: (github.event_name != 'schedule' && matrix.os != 'windows-latest')
with:
token: ${{ secrets.CODECOV_TOKEN }}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/.github/workflows/docs.yml new/kiwisolver-1.4.8/.github/workflows/docs.yml
--- old/kiwisolver-1.4.7/.github/workflows/docs.yml 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/.github/workflows/docs.yml 2024-12-24 18:54:47.000000000 +0100
@@ -21,13 +21,13 @@
name: Docs building
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/.github/workflows/release.yml new/kiwisolver-1.4.8/.github/workflows/release.yml
--- old/kiwisolver-1.4.7/.github/workflows/release.yml 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/.github/workflows/release.yml 2024-12-24 18:54:47.000000000 +0100
@@ -13,13 +13,13 @@
runs-on: ubuntu-latest
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Build sdist
@@ -34,9 +34,9 @@
cd ..
pytest kiwi/py/tests -v -W error
- name: Store artifacts
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
- name: artifact
+ name: cibw-sdist
path: dist/*
build_wheels:
@@ -47,21 +47,11 @@
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
- # We build separately 3.8 using manylinux1
- manylinux_version: [manylinux1, manylinux2010, manylinux2014]
+ manylinux_version: [manylinux2010, manylinux2014]
archs: [auto]
include:
- os: ubuntu-latest
archs: aarch64
- manylinux_version: manylinux1
- - os: ubuntu-latest
- archs: ppc64le
- manylinux_version: manylinux1
- - os: ubuntu-latest
- archs: s390x
- manylinux_version: manylinux1
- - os: ubuntu-latest
- archs: aarch64
manylinux_version: manylinux2010
- os: ubuntu-latest
archs: ppc64le
@@ -82,13 +72,13 @@
archs: ARM64
steps:
- name: Checkout
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
- name: Get history and tags for SCM versioning to work
run: |
git fetch --prune --unshallow
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Setup Python
- uses: actions/setup-python@v4
+ uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Set up QEMU
@@ -101,41 +91,12 @@
python -m pip install --upgrade pip
python -m pip install wheel cibuildwheel
- name: Build wheels
- if: matrix.manylinux_version == 'manylinux1'
- env:
- # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
- # MinGW on PATH that would be picked otherwise), switch to a static build for
- # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
- # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
- # keeping shared state with the rest of the Python process/extensions.
- CIBW_CONFIG_SETTINGS_WINDOWS: >-
- setup-args="--vsenv"
- setup-args="-Db_vscrt=mt"
- setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
- CIBW_BUILD: "cp38-*"
- CIBW_ARCHS_MACOS: x86_64 universal2 arm64
- CIBW_ARCHS_LINUX: ${{ matrix.archs }}
- CIBW_MANYLINUX_X86_64_IMAGE: manylinux1
- CIBW_MANYLINUX_I686_IMAGE: manylinux1
- CIBW_TEST_REQUIRES: pytest
- CIBW_TEST_COMMAND: pytest {package}/py/tests -v -W error
- run: |
- python -m cibuildwheel . --output-dir dist
- - name: Build wheels
if: matrix.manylinux_version == 'manylinux2010'
env:
- # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
- # MinGW on PATH that would be picked otherwise), switch to a static build for
- # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
- # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
- # keeping shared state with the rest of the Python process/extensions.
- CIBW_CONFIG_SETTINGS_WINDOWS: >-
- setup-args="--vsenv"
- setup-args="-Db_vscrt=mt"
- setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
- CIBW_BUILD: "cp39-* cp310-* pp38-*"
+ CIBW_BUILD: "cp310-*"
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CIBW_ARCHS_LINUX: ${{ matrix.archs }}
+ CIBW_ARCHS_WINDOWS: auto64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2010
CIBW_MANYLINUX_I686_IMAGE: manylinux2010
CIBW_TEST_REQUIRES: pytest
@@ -145,18 +106,12 @@
- name: Build wheels
if: matrix.manylinux_version == 'manylinux2014'
env:
- # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
- # MinGW on PATH that would be picked otherwise), switch to a static build for
- # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
- # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
- # keeping shared state with the rest of the Python process/extensions.
- CIBW_CONFIG_SETTINGS_WINDOWS: >-
- setup-args="--vsenv"
- setup-args="-Db_vscrt=mt"
- setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
- CIBW_BUILD: "cp311-* cp312-* cp313-* pp39-* pp310-*"
+ CIBW_BUILD: "cp311-* cp312-* cp313-* cp313t-* pp310-*"
+ CIBW_SKIP: "cp313t-win*"
+ CIBW_ENABLE: cpython-freethreading
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CIBW_ARCHS_LINUX: ${{ matrix.archs }}
+ CIBW_ARCHS_WINDOWS: auto64
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_MANYLINUX_I686_IMAGE: manylinux2014
CIBW_TEST_REQUIRES: pytest
@@ -164,18 +119,9 @@
run: |
python -m cibuildwheel . --output-dir dist
- name: Build wheels
- if: runner.os == 'Windows' && matrix.archs != 'auto'
+ if: runner.os == 'Windows' && matrix.archs == 'ARM64'
env:
- # On Windows, we explicitly request MSVC compilers (as GitHub Action runners have
- # MinGW on PATH that would be picked otherwise), switch to a static build for
- # runtimes, but use dynamic linking for `VCRUNTIME140.dll`, `VCRUNTIME140_1.dll`,
- # and the UCRT. This avoids requiring specific versions of `MSVCP140.dll`, while
- # keeping shared state with the rest of the Python process/extensions.
- CIBW_CONFIG_SETTINGS_WINDOWS: >-
- setup-args="--vsenv"
- setup-args="-Db_vscrt=mt"
- setup-args="-Dcpp_link_args=['ucrt.lib','vcruntime.lib','/nodefaultlib:libucrt.lib','/nodefaultlib:libvcruntime.lib']"
- CIBW_BUILD: "cp39-* cp310-* cp311-* cp312-* cp313-*"
+ CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-*"
CIBW_ARCHS_WINDOWS: ${{ matrix.archs }}
# It is not yet possible to run ARM64 tests, only cross-compile them.
CIBW_TEST_SKIP: "*-win_arm64"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/PKG-INFO new/kiwisolver-1.4.8/PKG-INFO
--- old/kiwisolver-1.4.7/PKG-INFO 2024-09-04 10:32:27.468615000 +0200
+++ new/kiwisolver-1.4.8/PKG-INFO 2024-12-24 18:54:53.570472500 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: kiwisolver
-Version: 1.4.7
+Version: 1.4.8
Summary: A fast implementation of the Cassowary constraint solver
Author-email: The Nucleic Development Team <sccolbert(a)gmail.com>
Maintainer-email: "Matthieu C. Dartiailh" <m.dartiailh(a)gmail.com>
@@ -83,15 +83,13 @@
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
-Requires-Python: >=3.8
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/kiwisolver/__init__.py new/kiwisolver-1.4.8/py/kiwisolver/__init__.py
--- old/kiwisolver-1.4.7/py/kiwisolver/__init__.py 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/kiwisolver/__init__.py 2024-12-24 18:54:47.000000000 +0100
@@ -26,17 +26,17 @@
__all__ = [
"BadRequiredStrength",
+ "Constraint",
"DuplicateConstraint",
"DuplicateEditVariable",
+ "Expression",
+ "Solver",
+ "Term",
"UnknownConstraint",
"UnknownEditVariable",
"UnsatisfiableConstraint",
- "strength",
"Variable",
- "Term",
- "Expression",
- "Constraint",
- "Solver",
- "__version__",
"__kiwi_version__",
+ "__version__",
+ "strength",
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/kiwisolver.egg-info/PKG-INFO new/kiwisolver-1.4.8/py/kiwisolver.egg-info/PKG-INFO
--- old/kiwisolver-1.4.7/py/kiwisolver.egg-info/PKG-INFO 2024-09-04 10:32:27.000000000 +0200
+++ new/kiwisolver-1.4.8/py/kiwisolver.egg-info/PKG-INFO 2024-12-24 18:54:53.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: kiwisolver
-Version: 1.4.7
+Version: 1.4.8
Summary: A fast implementation of the Cassowary constraint solver
Author-email: The Nucleic Development Team <sccolbert(a)gmail.com>
Maintainer-email: "Matthieu C. Dartiailh" <m.dartiailh(a)gmail.com>
@@ -83,15 +83,13 @@
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
-Requires-Python: >=3.8
+Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/constraint.cpp new/kiwisolver-1.4.8/py/src/constraint.cpp
--- old/kiwisolver-1.4.7/py/src/constraint.cpp 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/constraint.cpp 2024-12-24 18:54:47.000000000 +0100
@@ -44,8 +44,12 @@
cn->expression = reduce_expression(pyexpr);
if (!cn->expression)
return 0;
+
+ ACQUIRE_GLOBAL_LOCK();
kiwi::Expression expr(convert_to_kiwi_expression(cn->expression));
new (&cn->constraint) kiwi::Constraint(expr, op, strength);
+ RELEASE_GLOBAL_LOCK();
+
return pycn.release();
}
@@ -68,7 +72,9 @@
{
PyObject_GC_UnTrack(self);
Constraint_clear(self);
+ ACQUIRE_GLOBAL_LOCK();
self->constraint.~Constraint();
+ RELEASE_GLOBAL_LOCK();
Py_TYPE(self)->tp_free(pyobject_cast(self));
}
@@ -83,11 +89,21 @@
PyObject *item = PyTuple_GET_ITEM(expr->terms, i);
Term *term = reinterpret_cast<Term *>(item);
stream << term->coefficient << " * ";
- stream << reinterpret_cast<Variable *>(term->variable)->variable.name();
+ ACQUIRE_GLOBAL_LOCK();
+ std::string name = reinterpret_cast<Variable *>(term->variable)->variable.name();
+ RELEASE_GLOBAL_LOCK();
+ stream << name;
stream << " + ";
}
stream << expr->constant;
- switch (self->constraint.op())
+
+ ACQUIRE_GLOBAL_LOCK();
+ kiwi::RelationalOperator op = self->constraint.op();
+ double strength = self->constraint.strength();
+ bool violated = self->constraint.violated();
+ RELEASE_GLOBAL_LOCK();
+
+ switch (op)
{
case kiwi::OP_EQ:
stream << " == 0";
@@ -99,8 +115,8 @@
stream << " >= 0";
break;
}
- stream << " | strength = " << self->constraint.strength();
- if (self->constraint.violated())
+ stream << " | strength = " << strength;
+ if (violated)
{
stream << " (VIOLATED)";
}
@@ -117,7 +133,12 @@
Constraint_op(Constraint *self)
{
PyObject *res = 0;
- switch (self->constraint.op())
+
+ ACQUIRE_GLOBAL_LOCK();
+ kiwi::RelationalOperator op = self->constraint.op();
+ RELEASE_GLOBAL_LOCK();
+
+ switch (op)
{
case kiwi::OP_EQ:
res = PyUnicode_FromString("==");
@@ -135,13 +156,20 @@
PyObject *
Constraint_strength(Constraint *self)
{
- return PyFloat_FromDouble(self->constraint.strength());
+ ACQUIRE_GLOBAL_LOCK();
+ double strength = self->constraint.strength();
+ RELEASE_GLOBAL_LOCK();
+ return PyFloat_FromDouble(strength);
}
PyObject *
Constraint_violated(Constraint *self)
{
- if (self->constraint.violated()) {
+ ACQUIRE_GLOBAL_LOCK();
+ bool violated = self->constraint.violated();
+ RELEASE_GLOBAL_LOCK();
+
+ if (violated) {
Py_RETURN_TRUE;
} else {
Py_RETURN_FALSE;
@@ -162,7 +190,11 @@
Constraint *oldcn = reinterpret_cast<Constraint *>(pyoldcn);
Constraint *newcn = reinterpret_cast<Constraint *>(pynewcn);
newcn->expression = cppy::incref(oldcn->expression);
+
+ ACQUIRE_GLOBAL_LOCK();
new (&newcn->constraint) kiwi::Constraint(oldcn->constraint, strength);
+ RELEASE_GLOBAL_LOCK();
+
return pynewcn;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/expression.cpp new/kiwisolver-1.4.8/py/src/expression.cpp
--- old/kiwisolver-1.4.7/py/src/expression.cpp 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/expression.cpp 2024-12-24 18:54:47.000000000 +0100
@@ -89,7 +89,10 @@
PyObject* item = PyTuple_GET_ITEM( self->terms, i );
Term* term = reinterpret_cast<Term*>( item );
stream << term->coefficient << " * ";
- stream << reinterpret_cast<Variable*>( term->variable )->variable.name();
+ ACQUIRE_GLOBAL_LOCK();
+ std::string name = reinterpret_cast<Variable*>( term->variable )->variable.name();
+ RELEASE_GLOBAL_LOCK();
+ stream << name;
stream << " + ";
}
stream << self->constant;
@@ -121,7 +124,10 @@
PyObject* item = PyTuple_GET_ITEM( self->terms, i );
Term* term = reinterpret_cast<Term*>( item );
Variable* pyvar = reinterpret_cast<Variable*>( term->variable );
- result += term->coefficient * pyvar->variable.value();
+ ACQUIRE_GLOBAL_LOCK();
+ double value = pyvar->variable.value();
+ RELEASE_GLOBAL_LOCK();
+ result += term->coefficient * value;
}
return PyFloat_FromDouble( result );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/kiwisolver.cpp new/kiwisolver-1.4.8/py/src/kiwisolver.cpp
--- old/kiwisolver-1.4.7/py/src/kiwisolver.cpp 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/kiwisolver.cpp 2024-12-24 18:54:47.000000000 +0100
@@ -5,11 +5,18 @@
|
| The full license is in the file LICENSE, distributed with this software.
|----------------------------------------------------------------------------*/
+#include <mutex>
#include <cppy/cppy.h>
#include <kiwi/kiwi.h>
#include "types.h"
#include "version.h"
+namespace kiwisolver
+{
+
+std::recursive_mutex global_lock;
+
+}
namespace
{
@@ -162,6 +169,9 @@
PyModuleDef_Slot kiwisolver_slots[] = {
{Py_mod_exec, reinterpret_cast<void*>( kiwi_modexec ) },
+#ifdef Py_GIL_DISABLED
+ {Py_mod_gil, Py_MOD_GIL_NOT_USED},
+#endif
{0, NULL}
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/solver.cpp new/kiwisolver-1.4.8/py/src/solver.cpp
--- old/kiwisolver-1.4.7/py/src/solver.cpp 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/solver.cpp 2024-12-24 18:54:47.000000000 +0100
@@ -26,7 +26,9 @@
if( !pysolver )
return 0;
Solver* self = reinterpret_cast<Solver*>( pysolver );
+ ACQUIRE_GLOBAL_LOCK();
new( &self->solver ) kiwi::Solver();
+ RELEASE_GLOBAL_LOCK();
return pysolver;
}
@@ -34,7 +36,9 @@
void
Solver_dealloc( Solver* self )
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.~Solver();
+ RELEASE_GLOBAL_LOCK();
Py_TYPE( self )->tp_free( pyobject_cast( self ) );
}
@@ -47,15 +51,19 @@
Constraint* cn = reinterpret_cast<Constraint*>( other );
try
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.addConstraint( cn->constraint );
+ RELEASE_GLOBAL_LOCK();
}
catch( const kiwi::DuplicateConstraint& )
{
+ RELEASE_GLOBAL_LOCK();
PyErr_SetObject( DuplicateConstraint, other );
return 0;
}
catch( const kiwi::UnsatisfiableConstraint& )
{
+ RELEASE_GLOBAL_LOCK();
PyErr_SetObject( UnsatisfiableConstraint, other );
return 0;
}
@@ -71,10 +79,13 @@
Constraint* cn = reinterpret_cast<Constraint*>( other );
try
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.removeConstraint( cn->constraint );
+ RELEASE_GLOBAL_LOCK();
}
catch( const kiwi::UnknownConstraint& )
{
+ RELEASE_GLOBAL_LOCK();
PyErr_SetObject( UnknownConstraint, other );
return 0;
}
@@ -88,7 +99,12 @@
if( !Constraint::TypeCheck( other ) )
return cppy::type_error( other, "Constraint" );
Constraint* cn = reinterpret_cast<Constraint*>( other );
- return cppy::incref( self->solver.hasConstraint( cn->constraint ) ? Py_True : Py_False );
+
+ ACQUIRE_GLOBAL_LOCK();
+ bool hasConstraint = self->solver.hasConstraint( cn->constraint );
+ RELEASE_GLOBAL_LOCK();
+
+ return cppy::incref( hasConstraint ? Py_True : Py_False );
}
@@ -107,15 +123,19 @@
Variable* var = reinterpret_cast<Variable*>( pyvar );
try
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.addEditVariable( var->variable, strength );
+ RELEASE_GLOBAL_LOCK();
}
catch( const kiwi::DuplicateEditVariable& )
{
+ RELEASE_GLOBAL_LOCK();
PyErr_SetObject( DuplicateEditVariable, pyvar );
return 0;
}
catch( const kiwi::BadRequiredStrength& e )
{
+ RELEASE_GLOBAL_LOCK();
PyErr_SetString( BadRequiredStrength, e.what() );
return 0;
}
@@ -131,10 +151,13 @@
Variable* var = reinterpret_cast<Variable*>( other );
try
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.removeEditVariable( var->variable );
+ RELEASE_GLOBAL_LOCK();
}
catch( const kiwi::UnknownEditVariable& )
{
+ RELEASE_GLOBAL_LOCK();
PyErr_SetObject( UnknownEditVariable, other );
return 0;
}
@@ -148,7 +171,10 @@
if( !Variable::TypeCheck( other ) )
return cppy::type_error( other, "Variable" );
Variable* var = reinterpret_cast<Variable*>( other );
- return cppy::incref( self->solver.hasEditVariable( var->variable ) ? Py_True : Py_False );
+ ACQUIRE_GLOBAL_LOCK();
+ bool hasEditVariable = self->solver.hasEditVariable( var->variable );
+ RELEASE_GLOBAL_LOCK();
+ return cppy::incref( hasEditVariable ? Py_True : Py_False );
}
@@ -167,10 +193,13 @@
Variable* var = reinterpret_cast<Variable*>( pyvar );
try
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.suggestValue( var->variable, value );
+ RELEASE_GLOBAL_LOCK();
}
catch( const kiwi::UnknownEditVariable& )
{
+ RELEASE_GLOBAL_LOCK();
PyErr_SetObject( UnknownEditVariable, pyvar );
return 0;
}
@@ -181,7 +210,9 @@
PyObject*
Solver_updateVariables( Solver* self )
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.updateVariables();
+ RELEASE_GLOBAL_LOCK();
Py_RETURN_NONE;
}
@@ -189,7 +220,9 @@
PyObject*
Solver_reset( Solver* self )
{
+ ACQUIRE_GLOBAL_LOCK();
self->solver.reset();
+ RELEASE_GLOBAL_LOCK();
Py_RETURN_NONE;
}
@@ -197,7 +230,10 @@
PyObject*
Solver_dump( Solver* self )
{
- cppy::ptr dump_str( PyUnicode_FromString( self->solver.dumps().c_str() ) );
+ ACQUIRE_GLOBAL_LOCK();
+ std::string dumps = self->solver.dumps();
+ RELEASE_GLOBAL_LOCK();
+ cppy::ptr dump_str( PyUnicode_FromString( dumps.c_str() ) );
PyObject_Print( dump_str.get(), stdout, 0 );
Py_RETURN_NONE;
}
@@ -205,7 +241,10 @@
PyObject*
Solver_dumps( Solver* self )
{
- return PyUnicode_FromString( self->solver.dumps().c_str() );
+ ACQUIRE_GLOBAL_LOCK();
+ std::string dumps = self->solver.dumps();
+ RELEASE_GLOBAL_LOCK();
+ return PyUnicode_FromString( dumps.c_str() );
}
static PyMethodDef
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/symbolics.h new/kiwisolver-1.4.8/py/src/symbolics.h
--- old/kiwisolver-1.4.7/py/src/symbolics.h 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/symbolics.h 2024-12-24 18:54:47.000000000 +0100
@@ -579,8 +579,10 @@
cn->expression = reduce_expression( pyexpr.get() );
if( !cn->expression )
return 0;
+ ACQUIRE_GLOBAL_LOCK();
kiwi::Expression expr( convert_to_kiwi_expression( cn->expression ) );
new( &cn->constraint ) kiwi::Constraint( expr, op, kiwi::strength::required );
+ RELEASE_GLOBAL_LOCK();
return pycn.release();
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/term.cpp new/kiwisolver-1.4.8/py/src/term.cpp
--- old/kiwisolver-1.4.7/py/src/term.cpp 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/term.cpp 2024-12-24 18:54:47.000000000 +0100
@@ -78,7 +78,10 @@
{
std::stringstream stream;
stream << self->coefficient << " * ";
- stream << reinterpret_cast<Variable*>( self->variable )->variable.name();
+ ACQUIRE_GLOBAL_LOCK();
+ std::string name = reinterpret_cast<Variable*>( self->variable )->variable.name();
+ RELEASE_GLOBAL_LOCK();
+ stream << name;
return PyUnicode_FromString( stream.str().c_str() );
}
@@ -101,7 +104,10 @@
Term_value( Term* self )
{
Variable* pyvar = reinterpret_cast<Variable*>( self->variable );
- return PyFloat_FromDouble( self->coefficient * pyvar->variable.value() );
+ ACQUIRE_GLOBAL_LOCK();
+ double value = pyvar->variable.value();
+ RELEASE_GLOBAL_LOCK();
+ return PyFloat_FromDouble( self->coefficient * value );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/util.h new/kiwisolver-1.4.8/py/src/util.h
--- old/kiwisolver-1.4.7/py/src/util.h 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/util.h 2024-12-24 18:54:47.000000000 +0100
@@ -7,6 +7,7 @@
|----------------------------------------------------------------------------*/
#pragma once
#include <map>
+#include <mutex>
#include <string>
#include <cppy/cppy.h>
#include <kiwi/kiwi.h>
@@ -16,6 +17,20 @@
namespace kiwisolver
{
+#ifdef Py_GIL_DISABLED
+extern std::recursive_mutex global_lock;
+#define ACQUIRE_GLOBAL_LOCK() global_lock.lock()
+#define RELEASE_GLOBAL_LOCK() global_lock.unlock()
+#else
+#define ACQUIRE_GLOBAL_LOCK()
+#define RELEASE_GLOBAL_LOCK()
+#endif
+
+#ifndef Py_BEGIN_CRITICAL_SECTION
+#define Py_BEGIN_CRITICAL_SECTION(op) {
+#define Py_END_CRITICAL_SECTION() }
+#endif
+
inline bool
convert_to_double( PyObject* obj, double& out )
{
@@ -171,9 +186,15 @@
PyObject* item = PyTuple_GET_ITEM( expr->terms, i );
Term* term = reinterpret_cast<Term*>( item );
Variable* var = reinterpret_cast<Variable*>( term->variable );
- kterms.push_back( kiwi::Term( var->variable, term->coefficient ) );
- }
- return kiwi::Expression( kterms, expr->constant );
+ ACQUIRE_GLOBAL_LOCK();
+ kiwi::Term t( var->variable, term->coefficient );
+ RELEASE_GLOBAL_LOCK();
+ kterms.push_back( t );
+ }
+ ACQUIRE_GLOBAL_LOCK();
+ kiwi::Expression expression( kterms, expr->constant );
+ RELEASE_GLOBAL_LOCK();
+ return expression;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/variable.cpp new/kiwisolver-1.4.8/py/src/variable.cpp
--- old/kiwisolver-1.4.7/py/src/variable.cpp 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/variable.cpp 2024-12-24 18:54:47.000000000 +0100
@@ -46,11 +46,15 @@
std::string c_name;
if( !convert_pystr_to_str(name, c_name) )
return 0; // LCOV_EXCL_LINE
+ ACQUIRE_GLOBAL_LOCK();
new( &self->variable ) kiwi::Variable( c_name );
+ RELEASE_GLOBAL_LOCK();
}
else
{
+ ACQUIRE_GLOBAL_LOCK();
new( &self->variable ) kiwi::Variable();
+ RELEASE_GLOBAL_LOCK();
}
return pyvar.release();
@@ -81,7 +85,9 @@
{
PyObject_GC_UnTrack( self );
Variable_clear( self );
+ ACQUIRE_GLOBAL_LOCK();
self->variable.~Variable();
+ RELEASE_GLOBAL_LOCK();
Py_TYPE( self )->tp_free( pyobject_cast( self ) );
}
@@ -89,14 +95,20 @@
PyObject*
Variable_repr( Variable* self )
{
- return PyUnicode_FromString( self->variable.name().c_str() );
+ ACQUIRE_GLOBAL_LOCK();
+ std::string name = self->variable.name();
+ RELEASE_GLOBAL_LOCK();
+ return PyUnicode_FromString( name.c_str() );
}
PyObject*
Variable_name( Variable* self )
{
- return PyUnicode_FromString( self->variable.name().c_str() );
+ ACQUIRE_GLOBAL_LOCK();
+ std::string name = self->variable.name();
+ RELEASE_GLOBAL_LOCK();
+ return PyUnicode_FromString( name.c_str() );
}
@@ -108,13 +120,17 @@
std::string str;
if( !convert_pystr_to_str( pystr, str ) )
return 0;
- self->variable.setName( str );
+
+ ACQUIRE_GLOBAL_LOCK();
+ self->variable.setName( str );
+ RELEASE_GLOBAL_LOCK();
+
Py_RETURN_NONE;
}
PyObject*
-Variable_context( Variable* self )
+Variable_context_locked( Variable* self )
{
if( self->context )
return cppy::incref( self->context );
@@ -123,14 +139,32 @@
PyObject*
-Variable_setContext( Variable* self, PyObject* value )
+Variable_context( Variable* self )
+{
+ PyObject* context;
+ Py_BEGIN_CRITICAL_SECTION(self);
+ context = Variable_context_locked(self);
+ Py_END_CRITICAL_SECTION();
+ return context;
+}
+
+
+void
+Variable_setContext_locked( Variable* self, PyObject* value )
{
if( value != self->context )
{
- PyObject* temp = self->context;
- self->context = cppy::incref( value );
- Py_XDECREF( temp );
+ Py_XSETREF(self->context, cppy::incref( value ));
}
+}
+
+
+PyObject*
+Variable_setContext( Variable* self, PyObject* value )
+{
+ Py_BEGIN_CRITICAL_SECTION(self);
+ Variable_setContext_locked(self, value);
+ Py_END_CRITICAL_SECTION();
Py_RETURN_NONE;
}
@@ -138,7 +172,10 @@
PyObject*
Variable_value( Variable* self )
{
- return PyFloat_FromDouble( self->variable.value() );
+ ACQUIRE_GLOBAL_LOCK();
+ double value = self->variable.value();
+ RELEASE_GLOBAL_LOCK();
+ return PyFloat_FromDouble( value );
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/py/src/version.h new/kiwisolver-1.4.8/py/src/version.h
--- old/kiwisolver-1.4.7/py/src/version.h 2024-09-04 10:32:27.000000000 +0200
+++ new/kiwisolver-1.4.8/py/src/version.h 2024-12-24 18:54:53.000000000 +0100
@@ -9,5 +9,5 @@
#pragma once
-#define PY_KIWI_VERSION "1.4.7"
+#define PY_KIWI_VERSION "1.4.8"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/pyproject.toml new/kiwisolver-1.4.8/pyproject.toml
--- old/kiwisolver-1.4.7/pyproject.toml 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/pyproject.toml 2024-12-24 18:54:47.000000000 +0100
@@ -10,7 +10,7 @@
name = "kiwisolver"
description = "A fast implementation of the Cassowary constraint solver"
readme = "README.rst"
- requires-python = ">=3.8"
+ requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [{ name = "The Nucleic Development Team", email = "sccolbert(a)gmail.com" }]
maintainers = [{ name = "Matthieu C. Dartiailh", email = "m.dartiailh(a)gmail.com" }]
@@ -18,8 +18,6 @@
"License :: OSI Approved :: BSD License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.8",
- "Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
@@ -40,7 +38,7 @@
"setuptools>=61.2; implementation_name == 'cpython'",
"setuptools>=61.2,<=72.1.0; implementation_name != 'cpython'",
"setuptools_scm[toml]>=3.4.3",
- "cppy>=1.2.0"
+ "cppy>=1.3.0"
]
build-backend = "setuptools.build_meta"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/releasenotes.rst new/kiwisolver-1.4.8/releasenotes.rst
--- old/kiwisolver-1.4.7/releasenotes.rst 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/releasenotes.rst 2024-12-24 18:54:47.000000000 +0100
@@ -1,6 +1,12 @@
Kiwi Release Notes
==================
+Wrappers 1.4.8 | Solver 1.4.2 | 24/12/2024
+------------------------------------------
+- drop support for Python 3.8 and 3.9 PR #189
+- do not link to MSVCP on Windows and drop windows 32 bits support PR #189
+- add support for free-threaded builds on Python 3.13 PR #190 #191
+
Wrappers 1.4.7 | Solver 1.4.2 | 03/09/2024
------------------------------------------
- no library changes only fixes to the build infrastructure
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwisolver-1.4.7/setup.py new/kiwisolver-1.4.8/setup.py
--- old/kiwisolver-1.4.7/setup.py 2024-09-04 10:32:21.000000000 +0200
+++ new/kiwisolver-1.4.8/setup.py 2024-12-24 18:54:47.000000000 +0100
@@ -5,7 +5,6 @@
#
# The full license is in the file LICENSE, distributed with this software.
# --------------------------------------------------------------------------------------
-import os
from setuptools import Extension, setup