public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/python-partd] rawhide: Backport upstream patch for compatibility with pandas 3
Date: Mon, 08 Jun 2026 19:11:36 GMT [thread overview]
Message-ID: <178094589671.1.11974624627891152809.rpms-python-partd-a8296f0dbd8b@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-partd
Branch : rawhide
Commit : a8296f0dbd8bbf75128318692753a2dd0caca76b
Author : Tomáš Hrnčiar <thrnciar@redhat.com>
Date : 2026-06-08T15:37:43+02:00
Stats : +38/-0 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-partd/c/a8296f0dbd8bbf75128318692753a2dd0caca76b?branch=rawhide
Log:
Backport upstream patch for compatibility with pandas 3
---
diff --git a/83.patch b/83.patch
new file mode 100644
index 0000000..bee0795
--- /dev/null
+++ b/83.patch
@@ -0,0 +1,35 @@
+From 3efd8ec7e35a7c0aa1ba15ba2cf0766af99d3c21 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <tomas.hrnciar@me.com>
+Date: Mon, 8 Jun 2026 15:24:18 +0200
+Subject: [PATCH] Fix PandasColumns compatibility with pandas 3.0 StringDtype
+
+In pandas 3.0, string columns default to StringDtype instead of
+object dtype. PandasColumns.append() passes column .values to the Numpy backend, which calls serialize_dtype(dt) -> dt.str.encode().
+StringDtype (an ExtensionDtype) does not have a .str attribute,
+causing AttributeError.
+
+Use .to_numpy() instead of .values to ensure extension arrays are converted to numpy arrays before serialization. Pandas 3.0 re-infers StringDtype when reconstructing DataFrames, preserving round-trip correctness.
+
+Fixes: https://github.com/dask/partd/issues/82
+Assisted-by: Claude Opus 4.6
+---
+ partd/pandas.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/partd/pandas.py b/partd/pandas.py
+index 36c1b01..e0fac96 100644
+--- a/partd/pandas.py
++++ b/partd/pandas.py
+@@ -47,10 +47,10 @@ def append(self, data, **kwargs):
+
+ # TODO: don't use values, it does some work. Look at _blocks instead
+ # pframe/cframe do this well
+- arrays = {extend(k, col): df[col].values
++ arrays = {extend(k, col): df[col].to_numpy()
+ for k, df in data.items()
+ for col in df.columns}
+- arrays.update({extend(k, '.index'): df.index.values
++ arrays.update({extend(k, '.index'): df.index.to_numpy()
+ for k, df in data.items()})
+ # TODO: handle categoricals
+ self.partd.append(arrays, **kwargs)
diff --git a/python-partd.spec b/python-partd.spec
index 9a8d96e..2bd64d9 100644
--- a/python-partd.spec
+++ b/python-partd.spec
@@ -9,6 +9,9 @@ License: BSD-3-Clause
URL: https://github.com/dask/partd
Source: %pypi_source %{srcname}
+# Fix PandasColumns compatibility with pandas 3.0 StringDtype
+Patch: https://github.com/dask/partd/pull/83.patch
+
BuildArch: noarch
# Needed for the zeromq test
reply other threads:[~2026-06-08 19:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178094589671.1.11974624627891152809.rpms-python-partd-a8296f0dbd8b@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox