Taragolis commented on code in PR #39270:
URL: https://github.com/apache/airflow/pull/39270#discussion_r1580581663
##########
tests/operators/test_python.py:
##########
@@ -1159,64 +1201,36 @@ def f(a):
# context using cloudpickle (which is slow apparently).
@pytest.mark.execution_timeout(120)
@pytest.mark.filterwarnings("ignore::airflow.utils.context.AirflowContextDeprecationWarning")
- @pytest.mark.skipif(
- os.environ.get("PYTEST_PLAIN_ASSERTS") != "true",
- reason="assertion rewriting breaks this test because cloudpickle will
try to serialize "
- "AssertRewritingHook including captured stdout and we need to run "
- "it with `--assert=plain`pytest option and PYTEST_PLAIN_ASSERTS=true
.",
+ @pytest.mark.parametrize(
+ "serializer",
+ [
+ pytest.param(
+ "dill",
+ marks=[
+ DILL_MARKER,
+ pytest.mark.xfail(
+ PY311,
+ reason=(
+ "Also this test is failed on Python 3.11 because
of impact of "
+ "regression in Python 3.11 connected likely with
CodeType behaviour "
+ "https://github.com/python/cpython/issues/100316. "
+ "That likely causes that dill is not able to
serialize the `conf` correctly. "
+ "Issue about fixing it is captured in
https://github.com/apache/airflow/issues/35307"
+ ),
+ ),
Review Comment:
I've return back Python 3.11 case, but change it from the skip to xfail.
And interesting moment, that tests on Python 3.12 pass when on Python 3.11,
so maybe we should relax this condition to only include Python 3.11
https://github.com/apache/airflow/blob/8848e91559f195fa2970732954e5cd8a1fe01472/tests/operators/test_python.py#L80
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]