Skip to content

BUG: HDF5 pandas_version attr now reflects actual pandas version (GH-62792)#65606

Open
jbrockmendel wants to merge 2 commits into
pandas-dev:mainfrom
jbrockmendel:bug-62792
Open

BUG: HDF5 pandas_version attr now reflects actual pandas version (GH-62792)#65606
jbrockmendel wants to merge 2 commits into
pandas-dev:mainfrom
jbrockmendel:bug-62792

Conversation

@jbrockmendel
Copy link
Copy Markdown
Member

Summary

Previously to_hdf always wrote the hardcoded string "0.15.2" to the HDF5 pandas_version attribute, regardless of the installed pandas version. The constant has been pinned since 2014 (GH-8793) and was effectively a stand-in for a storage-schema version, but the attribute name leads users to expect the actual pandas version — see GH-62792 and GH-19314.

This PR writes pd.__version__ instead, and tightens the reader's version parser so the existing is_old_version check (which only triggers below 0.10.1) still works with version strings like "3.1.0.dev0+abc" or "2.3.3rc1".

No whatsnew entry — single-attribute behavior tweak, intentionally omitted.

…62792)

Previously `to_hdf` always wrote the hardcoded string "0.15.2" to the
HDF5 `pandas_version` attribute, regardless of the installed pandas
version. Write the actual `pd.__version__` instead, and make the
reader's version parser tolerant of non-numeric trailing components
(e.g. ".dev0+abc") so the existing `is_old_version` check still works.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: HDF5 file stores hardcoded pandas version "0.15.2" instead of actual pandas version

1 participant