Skip to content

Conversation

ianhi
Copy link

@ianhi ianhi commented Sep 24, 2025

Backports #60726 to the 2.3 series to alleviate some downstream issues in geopandas and xarray see #60726 (comment)

  • [NA?] closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • [i hope! ] All code checks passed.
  • [NA] Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

tested the new test locally:

(pandas-dev) ➜  pandas git:(backport-60726-to-2.3.x) ✗ python -m pytest pandas/tests/frame/test_subclass.py::test_constructor_with_metadata_from_records -v
/Users/ian/miniforge3/envs/pandas-dev/lib/python3.10/site-packages/pytest_cython/__init__.py:2: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  from pkg_resources import get_distribution
+ /Users/ian/miniforge3/envs/pandas-dev/bin/ninja
[1/1] Generating write_version_file with a custom command
========================================================= test session starts =========================================================
platform darwin -- Python 3.10.18, pytest-8.4.2, pluggy-1.6.0 -- /Users/ian/miniforge3/envs/pandas-dev/bin/python
cachedir: .pytest_cache
hypothesis profile 'ci' -> deadline=None, suppress_health_check=(HealthCheck.too_slow, HealthCheck.differing_executors)
PyQt5 5.15.11 -- Qt runtime 5.15.15 -- Qt compiled 5.15.15
rootdir: /Users/ian/Documents/dev/pandas
configfile: pyproject.toml
plugins: anyio-4.11.0, hypothesis-6.140.2, xdist-3.8.0, qt-4.5.0, cython-0.3.1, cov-7.0.0
collected 1 item

pandas/tests/frame/test_subclass.py::test_constructor_with_metadata_from_records PASSED

---------------------------------- generated xml file: /Users/ian/Documents/dev/pandas/test-data.xml ----------------------------------
======================================================== slowest 30 durations =========================================================

(3 durations < 0.005s hidden.  Use -vv to show these durations.)
========================================================== 1 passed in 0.03s ==========================================================

…0726)

* REGR: from_records not initializing subclasses properly

* Move whatsnew
@ianhi
Copy link
Author

ianhi commented Sep 24, 2025

The pre-commit.ci check seems to have been passing but eventually timed out. Not really sure what to do about that

@mroeschke mroeschke added the Constructors Series/DataFrame/Index/pd.array Constructors label Sep 24, 2025
@mroeschke mroeschke merged commit e0fe9a0 into pandas-dev:2.3.x Sep 24, 2025
54 of 55 checks passed
@mroeschke
Copy link
Member

Thanks @ianhi

@ianhi ianhi deleted the backport-60726-to-2.3.x branch September 25, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants