Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

BUG: Return a copy from single-table vstack#20097

Draft
nomad3 wants to merge 2 commits into
astropy:mainastropy/astropy:mainfrom
nomad3:fix-18910-copy-single-vstacknomad3/astropy:fix-18910-copy-single-vstackCopy head branch name to clipboard
Draft

BUG: Return a copy from single-table vstack#20097
nomad3 wants to merge 2 commits into
astropy:mainastropy/astropy:mainfrom
nomad3:fix-18910-copy-single-vstacknomad3/astropy:fix-18910-copy-single-vstackCopy head branch name to clipboard

Conversation

@nomad3

@nomad3 nomad3 commented Jul 19, 2026

Copy link
Copy Markdown

Description

This changes the single-table fast path in vstack to return a normal table copy instead of the input object itself. That makes the implementation match the documented new-table contract and prevents mutations to the result from silently changing the input.

The regression test covers Table and QTable, both as a direct input and a one-item list, and verifies class/value preservation plus independent data and metadata.

This targets main only; no behavioral backport is requested.

Fixes #18910

Tests

  • pytest astropy/table/tests/test_operations.py — 238 passed, 8 skipped, 11 xfailed
  • pytest astropy/table/tests — 2382 passed, 183 skipped, 14 xfailed
  • ruff check astropy/table/operations.py astropy/table/tests/test_operations.py
  • ruff format --check astropy/table/operations.py astropy/table/tests/test_operations.py

@github-actions github-actions Bot added the table label Jul 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@pllim pllim added this to the v8.1.0 milestone Jul 20, 2026
@pllim
pllim requested a review from mwcraig July 20, 2026 15:32
@pllim pllim added the Bug label Jul 20, 2026
nomad3 added 2 commits July 26, 2026 23:57
Signed-off-by: Simon Aguilera <saguilera1608@gmail.com>
Signed-off-by: Simon Aguilera <saguilera1608@gmail.com>
@nomad3
nomad3 force-pushed the fix-18910-copy-single-vstack branch from ecb197b to 631b048 Compare July 27, 2026 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contradiction between Returns section of table operations like vstack and what is returned.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.