From ea15fb687d4ea3ff228c542305f55473fb75d68d Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sun, 13 Mar 2022 11:14:40 -0700 Subject: [PATCH 1/8] CI: Debug Windows stack overflow --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index e6de5caf955fc..32556b9a0e399 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -24,7 +24,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then XVFB="xvfb-run " fi -PYTEST_CMD="${XVFB}pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" +PYTEST_CMD="${XVFB}pytest -r fEs -v -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" if [[ "$PATTERN" ]]; then PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\"" From f04542124c1a340d781c80ca70926793ddb383fe Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sun, 13 Mar 2022 16:02:11 -0700 Subject: [PATCH 2/8] Set recursion limit for some tests --- pandas/tests/extension/json/test_json.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/pandas/tests/extension/json/test_json.py b/pandas/tests/extension/json/test_json.py index d530a75b74c8f..f13ef65267304 100644 --- a/pandas/tests/extension/json/test_json.py +++ b/pandas/tests/extension/json/test_json.py @@ -1,5 +1,6 @@ import collections import operator +import sys import pytest @@ -163,12 +164,24 @@ def test_from_dtype(self, data): @pytest.mark.xfail(reason="RecursionError, GH-33900") def test_series_constructor_no_data_with_index(self, dtype, na_value): # RecursionError: maximum recursion depth exceeded in comparison - super().test_series_constructor_no_data_with_index(dtype, na_value) + rec_limit = sys.getrecursionlimit() + try: + # Limit to avoid stack overflow on Windows CI + sys.setrecursionlimit(100) + super().test_series_constructor_no_data_with_index(dtype, na_value) + finally: + sys.setrecursionlimit(rec_limit) @pytest.mark.xfail(reason="RecursionError, GH-33900") def test_series_constructor_scalar_na_with_index(self, dtype, na_value): # RecursionError: maximum recursion depth exceeded in comparison - super().test_series_constructor_scalar_na_with_index(dtype, na_value) + rec_limit = sys.getrecursionlimit() + try: + # Limit to avoid stack overflow on Windows CI + sys.setrecursionlimit(100) + super().test_series_constructor_scalar_na_with_index(dtype, na_value) + finally: + sys.setrecursionlimit(rec_limit) @pytest.mark.xfail(reason="collection as scalar, GH-33901") def test_series_constructor_scalar_with_index(self, data, dtype): From ec8ac8f99419eb4b47ccab25dbf4e1056d0195c3 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sun, 13 Mar 2022 17:13:57 -0700 Subject: [PATCH 3/8] Remove pytest azurepipelines causing issues with 32 bit build? --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index e6dc98179b7d6..1b0ae40949d5b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,7 +45,7 @@ jobs: /opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \ . ~/virtualenvs/pandas-dev/bin/activate && \ python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \ - pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \ + pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis && \ python setup.py build_ext -q -j2 && \ python -m pip install --no-build-isolation -e . && \ pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml" From 891630b7a0ded1de394e7861b5612526136e2c55 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sun, 13 Mar 2022 18:53:32 -0700 Subject: [PATCH 4/8] Remove -v --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 32556b9a0e399..e6de5caf955fc 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -24,7 +24,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then XVFB="xvfb-run " fi -PYTEST_CMD="${XVFB}pytest -r fEs -v -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" +PYTEST_CMD="${XVFB}pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" if [[ "$PATTERN" ]]; then PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\"" From e2b351050f757a83a1c4176d94c3e8a89b1beab3 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sun, 13 Mar 2022 20:37:33 -0700 Subject: [PATCH 5/8] Debug again --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index e6de5caf955fc..808be2dd0bcb9 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -24,7 +24,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then XVFB="xvfb-run " fi -PYTEST_CMD="${XVFB}pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" +PYTEST_CMD="${XVFB}pytest -r -v fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" if [[ "$PATTERN" ]]; then PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\"" From 7c50cf8218064b3ac8f9b6b1da91afab25c144fc Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Mon, 14 Mar 2022 10:36:12 -0700 Subject: [PATCH 6/8] Fix invocation --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 808be2dd0bcb9..32556b9a0e399 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -24,7 +24,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then XVFB="xvfb-run " fi -PYTEST_CMD="${XVFB}pytest -r -v fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" +PYTEST_CMD="${XVFB}pytest -r fEs -v -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" if [[ "$PATTERN" ]]; then PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\"" From 3fb7f920de7393b8c23b1d6a1f942c9fe56cfe3c Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Mon, 14 Mar 2022 14:21:13 -0700 Subject: [PATCH 7/8] TestReduceBoolean causing this? --- pandas/tests/extension/arrow/test_bool.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pandas/tests/extension/arrow/test_bool.py b/pandas/tests/extension/arrow/test_bool.py index bdfbbef937019..0205b8aad9431 100644 --- a/pandas/tests/extension/arrow/test_bool.py +++ b/pandas/tests/extension/arrow/test_bool.py @@ -1,6 +1,11 @@ import numpy as np import pytest +from pandas.compat import ( + is_ci_environment, + is_platform_windows, +) + import pandas as pd import pandas._testing as tm from pandas.api.types import is_bool_dtype @@ -82,6 +87,10 @@ def test_reduce_series_boolean(self): pass +@pytest.mark.skipif( + is_ci_environment() and is_platform_windows(), + reason="Causes stack overflow on Windows CI", +) class TestReduceBoolean(base.BaseBooleanReduceTests): pass From 0e79a6d7d17dcea9b6e477d9d881d58f0952649a Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Mon, 14 Mar 2022 15:52:58 -0700 Subject: [PATCH 8/8] Remove -v --- ci/run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/run_tests.sh b/ci/run_tests.sh index 32556b9a0e399..e6de5caf955fc 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -24,7 +24,7 @@ if [[ $(uname) == "Linux" && -z $DISPLAY ]]; then XVFB="xvfb-run " fi -PYTEST_CMD="${XVFB}pytest -r fEs -v -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" +PYTEST_CMD="${XVFB}pytest -r fEs -n $PYTEST_WORKERS --dist=loadfile $TEST_ARGS $COVERAGE $PYTEST_TARGET" if [[ "$PATTERN" ]]; then PYTEST_CMD="$PYTEST_CMD -m \"$PATTERN\""