Skip to content

Conversation

@Lee-W
Copy link
Member

@Lee-W Lee-W commented Oct 28, 2025

Why

The test cases in #57334 won't pass in 3.13 with the following error.

ERROR task-sdk/tests/task_sdk/api/test_client.py::TestSSLContextCaching::test_cache_hit_on_same_parameters - AttributeError: '_MethodRope' object has no attribute 'cache_clear'
ERROR task-sdk/tests/task_sdk/api/test_client.py::TestSSLContextCaching::test_cache_miss_on_different_parameters - AttributeError: '_MethodRope' object has no attribute 'cache_clear'

What

Make _get_ssl_context_cached a static method as cls is not accessed and change the order of @lru_cache and @staticmethod (main issue of the error)


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@Lee-W Lee-W added the all versions If set, the CI build will be forced to use all versions of Python/K8S/DBs label Oct 28, 2025
@Lee-W Lee-W changed the title fix: make _get_ssl_context_cached a static method fix: change the decorated order of _get_ssl_context_cached Oct 28, 2025
@potiuk
Copy link
Member

potiuk commented Oct 28, 2025

Nice!

@potiuk potiuk added this to the Airflow 3.1.2 milestone Oct 28, 2025
@potiuk potiuk added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Oct 28, 2025
@potiuk potiuk closed this Oct 28, 2025
@potiuk potiuk reopened this Oct 28, 2025
@potiuk
Copy link
Member

potiuk commented Oct 28, 2025

The tests for 3.13 passed. Merging.

@potiuk potiuk merged commit 04c30dc into apache:main Oct 28, 2025
193 of 209 checks passed
github-actions bot pushed a commit that referenced this pull request Oct 28, 2025
(cherry picked from commit 04c30dc)

Co-authored-by: Wei Lee <weilee.rx@gmail.com>
@github-actions
Copy link

Backport successfully created: v3-1-test

Status Branch Result
v3-1-test PR Link

potiuk pushed a commit that referenced this pull request Oct 28, 2025
#57403)

(cherry picked from commit 04c30dc)

Co-authored-by: Wei Lee <weilee.rx@gmail.com>
@Lee-W Lee-W deleted the make-_get_ssl_context_cached-a-static-method branch December 31, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

all versions If set, the CI build will be forced to use all versions of Python/K8S/DBs area:task-sdk backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants