public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-nanobind] rawhide: Update to 3.1.0
@ 2026-10-14 17:09 Tulio Magno Quites Machado Filho
0 siblings, 0 replies; only message in thread
From: Tulio Magno Quites Machado Filho @ 2026-10-14 17:09 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/python-nanobind
Branch : rawhide
Commit : 9b6d84b8681057cf53ab90f1df051f973b2e3227
Author : Tulio Magno Quites Machado Filho <tuliom@redhat.com>
Date : 2026-10-13T15:02:43-03:00
Stats : +64/-3 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/python-nanobind/c/9b6d84b8681057cf53ab90f1df051f973b2e3227?branch=rawhide
Log:
Update to 3.1.0
Apply a patch that fixes issues on i686.
Resolves: rhbz#2490248
---
diff --git a/1453.patch b/1453.patch
new file mode 100644
index 0000000..e1a0c3e
--- /dev/null
+++ b/1453.patch
@@ -0,0 +1,57 @@
+From 07839596d8d42d613f2493c175be881140132aee Mon Sep 17 00:00:00 2001
+From: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
+Date: Tue, 13 Oct 2026 14:55:49 -0300
+Subject: [PATCH] Avoid implicit conversions
+
+Ensure the following conversions are explicit in order to avoid errors
+reported by the compiler, e.g.:
+
+error: implicit conversion changes signedness: 'uint32_t' (aka 'unsigned int') to 'Py_ssize_t' (aka 'int') [-Werror,-Wsign-conversion]
+
+This fixes issues on 32-bit x86.
+---
+ src/nb_func.cpp | 4 ++--
+ src/nb_type.cpp | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/nb_func.cpp b/src/nb_func.cpp
+index 5a98252d..713c7dee 100644
+--- a/src/nb_func.cpp
++++ b/src/nb_func.cpp
+@@ -1666,7 +1666,7 @@ PyObject *nb_func_get_nb_signature(PyObject *self, void *) {
+
+ func_data *f = nb_func_data(self);
+ uint32_t count = (uint32_t) Py_SIZE(self);
+- PyObject *result = PyTuple_New(count);
++ PyObject *result = PyTuple_New((Py_ssize_t) count);
+ if (!result)
+ return nullptr;
+
+@@ -1690,7 +1690,7 @@ PyObject *nb_func_get_nb_signature(PyObject *self, void *) {
+ item = PyTuple_New(3);
+ sigstr = PyUnicode_FromString(buf.get());
+ if (n_default_args) {
+- defaults = PyTuple_New(n_default_args);
++ defaults = PyTuple_New((Py_ssize_t) n_default_args);
+ } else {
+ defaults = none_ref();
+ }
+diff --git a/src/nb_type.cpp b/src/nb_type.cpp
+index 04fe8f88..0fd1d06e 100644
+--- a/src/nb_type.cpp
++++ b/src/nb_type.cpp
+@@ -23,12 +23,12 @@ NAMESPACE_BEGIN(NB_NAMESPACE)
+ NAMESPACE_BEGIN(detail)
+
+ static PyObject **nb_dict_ptr(PyObject *self, PyTypeObject *tp) {
+- Py_ssize_t dictoffset = nb_type_data(tp)->dictoffset;
++ Py_ssize_t dictoffset = (Py_ssize_t) nb_type_data(tp)->dictoffset;
+ return dictoffset ? (PyObject **) ((uint8_t *) self + dictoffset) : nullptr;
+ }
+
+ static PyObject **nb_weaklist_ptr(PyObject *self, PyTypeObject *tp) {
+- Py_ssize_t weaklistoffset = nb_type_data(tp)->weaklistoffset;
++ Py_ssize_t weaklistoffset = (Py_ssize_t) nb_type_data(tp)->weaklistoffset;
+ return weaklistoffset ? (PyObject **) ((uint8_t *) self + weaklistoffset) : nullptr;
+ }
+
diff --git a/python-nanobind.spec b/python-nanobind.spec
index 536964d..e395e01 100644
--- a/python-nanobind.spec
+++ b/python-nanobind.spec
@@ -12,7 +12,7 @@
%global debug_package %{nil}
Name: python-nanobind
-Version: 2.12.0
+Version: 3.1.0
Release: %autorelease
Summary: Tiny and efficient C++/Python bindings
@@ -21,6 +21,10 @@ URL: https://nanobind.readthedocs.org/
VCS: git:%{nanobind_giturl}.git
Source0: %{nanobind_giturl}/archive/v%{version}/%{name}-%{version}.tar.gz
+# Fixes i686 build.
+# https://github.com/wjakob/nanobind/pull/1453
+Patch: 1453.patch
+
BuildRequires: clang
BuildRequires: cmake
BuildRequires: eigen3-devel
@@ -49,7 +53,7 @@ Obsoletes: python%{python3_pkgversion}-nanobind-devel < 2.6.1-4
%prep
-%autosetup -n %{nanobind_src_dir}
+%autosetup -p1 -n %{nanobind_src_dir}
%py3_shebang_fix src/stubgen.py
diff --git a/sources b/sources
index b7f283d..6cf18a3 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (python-nanobind-2.12.0.tar.gz) = a187f0efae1833b2caeaff41074a3d8fbd866ee1874aac088ffd5daf026aeaa6a73a8943b682bd39ef59b755e36b73a221eaf71343a28351dce0c8f284debdd9
+SHA512 (python-nanobind-3.1.0.tar.gz) = 3cbf96c73323dc71bc6fc463e087857493c7711ffcb2a8f4fe2a479bd3f0268d0b3c4bab7138d87e98475ec34a5f51be273d5522cb1ec63d90a1a83badd90a75
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-14 17:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 17:09 [rpms/python-nanobind] rawhide: Update to 3.1.0 Tulio Magno Quites Machado Filho
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox