Skip to content

[v3-3-test] Add support for pandas 3 based xcoms in airflow (#71103) - #71169

Merged
vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-4091ccf-v3-3-test
Aug 5, 2026
Merged

[v3-3-test] Add support for pandas 3 based xcoms in airflow (#71103)#71169
vatsrahul1001 merged 1 commit into
v3-3-testfrom
backport-4091ccf-v3-3-test

Conversation

@amoghrajesh

Copy link
Copy Markdown
Contributor
  • Keep DataFrame XComs working on pandas 3

pandas 3 exposes its public classes from the pandas namespace, so a DataFrame is now qualified as pandas.DataFrame rather than pandas.core.frame.DataFrame. The serializer was registered only under the old name, so pushing a DataFrame through XCom raised "cannot serialize object of type <class 'pandas.DataFrame'>". Both names are registered so values written by either version stay readable.

pandas 3 also infers a str column where it used to infer object, and keeps its missing values as NA instead of stringifying them, which the amazon and salesforce tests asserted on.

  • Document pandas 3 impact on DataFrame XComs

Deployments need to know that every component has to carry the pandas 3 support before pandas 3 reaches any worker, that a rollback strands the XComs written in the meantime, and that a pulled DataFrame now takes its dtypes from the reader's pandas version.

  • Name the pandas 3 newsfragment after its own pull request

  • Add regression test for the pandas 2/3 cross-version registry lookup

  • rename newsfragment file


(cherry picked from commit 4091ccf)


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@vatsrahul1001 vatsrahul1001 added this to the Airflow 3.3.1 milestone Aug 5, 2026
@vatsrahul1001 vatsrahul1001 added the type:misc/internal Changelog: Misc changes that should appear in change log label Aug 5, 2026
@amoghrajesh amoghrajesh changed the title Add support for pandas 3 based xcoms in airflow (#71103) [v3-3-test] Add support for pandas 3 based xcoms in airflow (#71103) Aug 5, 2026
vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
Backport of #71100, which reverted "Limit pandas to < 3 for DataFrame XComs"
(#70791) on main. v3-3-test carried the cap via the #70912 backport; reverting
that commit removes the cap here too so the release branch matches main. The
pandas-3 XCom serializer support lands separately in #71169 (the #71103
backport) -- the same order main used (#71100 before #71103). uv.lock
regenerated with uv 0.12.1 to drop the pandas <3 specifier.
* Keep DataFrame XComs working on pandas 3

pandas 3 exposes its public classes from the `pandas` namespace, so a
DataFrame is now qualified as `pandas.DataFrame` rather than
`pandas.core.frame.DataFrame`. The serializer was registered only under the
old name, so pushing a DataFrame through XCom raised "cannot serialize
object of type <class 'pandas.DataFrame'>". Both names are registered so
values written by either version stay readable.

pandas 3 also infers a str column where it used to infer object, and keeps
its missing values as NA instead of stringifying them, which the amazon and
salesforce tests asserted on.

* Document pandas 3 impact on DataFrame XComs

Deployments need to know that every component has to carry the pandas 3
support before pandas 3 reaches any worker, that a rollback strands the
XComs written in the meantime, and that a pulled DataFrame now takes its
dtypes from the reader's pandas version.

* Name the pandas 3 newsfragment after its own pull request

* Add regression test for the pandas 2/3 cross-version registry lookup

* rename newsfragment file

---------

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
(cherry picked from commit 4091ccf)
@vatsrahul1001
vatsrahul1001 force-pushed the backport-4091ccf-v3-3-test branch from 6c9832f to f1ab6ec Compare August 5, 2026 15:54
@vatsrahul1001
vatsrahul1001 merged commit f34ccea into v3-3-test Aug 5, 2026
90 of 91 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-4091ccf-v3-3-test branch August 5, 2026 17:02
vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
Backport of #71100, which reverted "Limit pandas to < 3 for DataFrame XComs"
(#70791) on main. v3-3-test carried the cap via the #70912 backport; reverting
that commit removes the cap here too so the release branch matches main. The
pandas-3 XCom serializer support lands separately in #71169 (the #71103
backport) -- the same order main used (#71100 before #71103). uv.lock
regenerated with uv 0.12.1 to drop the pandas <3 specifier.
vatsrahul1001 pushed a commit that referenced this pull request Aug 5, 2026
* Keep DataFrame XComs working on pandas 3

pandas 3 exposes its public classes from the `pandas` namespace, so a
DataFrame is now qualified as `pandas.DataFrame` rather than
`pandas.core.frame.DataFrame`. The serializer was registered only under the
old name, so pushing a DataFrame through XCom raised "cannot serialize
object of type <class 'pandas.DataFrame'>". Both names are registered so
values written by either version stay readable.

pandas 3 also infers a str column where it used to infer object, and keeps
its missing values as NA instead of stringifying them, which the amazon and
salesforce tests asserted on.

* Document pandas 3 impact on DataFrame XComs

Deployments need to know that every component has to carry the pandas 3
support before pandas 3 reaches any worker, that a rollback strands the
XComs written in the meantime, and that a pulled DataFrame now takes its
dtypes from the reader's pandas version.

* Name the pandas 3 newsfragment after its own pull request

* Add regression test for the pandas 2/3 cross-version registry lookup

* rename newsfragment file

---------


(cherry picked from commit 4091ccf)

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:providers area:task-sdk provider:amazon AWS/Amazon - related issues provider:salesforce type:misc/internal Changelog: Misc changes that should appear in change log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants