From 31ad407638254e3a34ae76dcf381f1fac06b2205 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 10:35:37 -0400 Subject: [PATCH 1/8] Try removing subprocess call in conftest --- pandas/_config/localization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/_config/localization.py b/pandas/_config/localization.py index 61d88c43f0e4a..3d94d3ab21167 100644 --- a/pandas/_config/localization.py +++ b/pandas/_config/localization.py @@ -10,7 +10,6 @@ import locale import platform import re -import subprocess from typing import ( TYPE_CHECKING, cast, @@ -142,7 +141,8 @@ def get_locales( """ if platform.system() in ("Linux", "Darwin"): - raw_locales = subprocess.check_output(["locale", "-a"]) + # raw_locales = subprocess.check_output(["locale", "-a"]) + raw_locales = [] else: # Other platforms e.g. windows platforms don't define "locale -a" # Note: is_platform_windows causes circular import here From 7f500435f6aa3c5710dd4317ba21652290a04dfa Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 10:36:57 -0400 Subject: [PATCH 2/8] empty bytes --- pandas/_config/localization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/_config/localization.py b/pandas/_config/localization.py index 3d94d3ab21167..d2be0b5cc6ec6 100644 --- a/pandas/_config/localization.py +++ b/pandas/_config/localization.py @@ -142,7 +142,7 @@ def get_locales( """ if platform.system() in ("Linux", "Darwin"): # raw_locales = subprocess.check_output(["locale", "-a"]) - raw_locales = [] + raw_locales = b"" else: # Other platforms e.g. windows platforms don't define "locale -a" # Note: is_platform_windows causes circular import here From 2f9316db93518fbaf8776f049f128c647f5f5106 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 12:39:34 -0400 Subject: [PATCH 3/8] try non-editable --- .github/workflows/unit-tests.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 855973a22886a..78e029e9443f5 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -34,9 +34,11 @@ jobs: env_file: actions-311-downstream_compat.yaml pattern: "not slow and not network and not single_cpu" pytest_target: "pandas/tests/test_downstream.py" + editable: true - name: "Minimum Versions" env_file: actions-39-minimum_versions.yaml pattern: "not slow and not network and not single_cpu" + editable: true - name: "Locale: it_IT" env_file: actions-311.yaml pattern: "not slow and not network and not single_cpu" @@ -47,6 +49,7 @@ jobs: # Also install it_IT (its encoding is ISO8859-1) but do not activate it. # It will be temporarily activated during tests with locale.setlocale extra_loc: "it_IT" + editable: true - name: "Locale: zh_CN" env_file: actions-311.yaml pattern: "not slow and not network and not single_cpu" @@ -57,22 +60,27 @@ jobs: # Also install zh_CN (its encoding is gb2312) but do not activate it. # It will be temporarily activated during tests with locale.setlocale extra_loc: "zh_CN" + editable: true - name: "Pypy" env_file: actions-pypy-39.yaml pattern: "not slow and not network and not single_cpu" test_args: "--max-worker-restart 0" + editable: true - name: "Numpy Dev" env_file: actions-311-numpydev.yaml pattern: "not slow and not network and not single_cpu" test_args: "-W error::DeprecationWarning -W error::FutureWarning" + editable: true - name: "Pyarrow Nightly" env_file: actions-311-pyarrownightly.yaml pattern: "not slow and not network and not single_cpu" + editable: true - name: "ASAN / UBSAN" env_file: actions-311-sanitizers.yaml pattern: "not slow and not network and not single_cpu and not skip_ubsan" asan_options: "ASAN_OPTIONS=detect_leaks=0" preload: LD_PRELOAD=$(gcc -print-file-name=libasan.so) + editable: false meson_args: --config-settings=setup-args="-Db_sanitize=address,undefined" cflags_adds: -fno-sanitize-recover=all pytest_workers: -1 # disable pytest-xdist as it swallows stderr from ASAN @@ -155,6 +163,7 @@ jobs: id: build uses: ./.github/actions/build_pandas with: + editable: ${{ matrix.editable }} meson_args: ${{ matrix.meson_args }} cflags_adds: ${{ matrix.cflags_adds }} From 08213d310e195e9b35b808730bd5dd184b061404 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 12:54:16 -0400 Subject: [PATCH 4/8] Revert "try non-editable" This reverts commit 2f9316db93518fbaf8776f049f128c647f5f5106. --- .github/workflows/unit-tests.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 78e029e9443f5..855973a22886a 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -34,11 +34,9 @@ jobs: env_file: actions-311-downstream_compat.yaml pattern: "not slow and not network and not single_cpu" pytest_target: "pandas/tests/test_downstream.py" - editable: true - name: "Minimum Versions" env_file: actions-39-minimum_versions.yaml pattern: "not slow and not network and not single_cpu" - editable: true - name: "Locale: it_IT" env_file: actions-311.yaml pattern: "not slow and not network and not single_cpu" @@ -49,7 +47,6 @@ jobs: # Also install it_IT (its encoding is ISO8859-1) but do not activate it. # It will be temporarily activated during tests with locale.setlocale extra_loc: "it_IT" - editable: true - name: "Locale: zh_CN" env_file: actions-311.yaml pattern: "not slow and not network and not single_cpu" @@ -60,27 +57,22 @@ jobs: # Also install zh_CN (its encoding is gb2312) but do not activate it. # It will be temporarily activated during tests with locale.setlocale extra_loc: "zh_CN" - editable: true - name: "Pypy" env_file: actions-pypy-39.yaml pattern: "not slow and not network and not single_cpu" test_args: "--max-worker-restart 0" - editable: true - name: "Numpy Dev" env_file: actions-311-numpydev.yaml pattern: "not slow and not network and not single_cpu" test_args: "-W error::DeprecationWarning -W error::FutureWarning" - editable: true - name: "Pyarrow Nightly" env_file: actions-311-pyarrownightly.yaml pattern: "not slow and not network and not single_cpu" - editable: true - name: "ASAN / UBSAN" env_file: actions-311-sanitizers.yaml pattern: "not slow and not network and not single_cpu and not skip_ubsan" asan_options: "ASAN_OPTIONS=detect_leaks=0" preload: LD_PRELOAD=$(gcc -print-file-name=libasan.so) - editable: false meson_args: --config-settings=setup-args="-Db_sanitize=address,undefined" cflags_adds: -fno-sanitize-recover=all pytest_workers: -1 # disable pytest-xdist as it swallows stderr from ASAN @@ -163,7 +155,6 @@ jobs: id: build uses: ./.github/actions/build_pandas with: - editable: ${{ matrix.editable }} meson_args: ${{ matrix.meson_args }} cflags_adds: ${{ matrix.cflags_adds }} From e4ea69eed81f5471a2ea1a239f67f596345be990 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 12:54:18 -0400 Subject: [PATCH 5/8] Revert "empty bytes" This reverts commit 7f500435f6aa3c5710dd4317ba21652290a04dfa. --- pandas/_config/localization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/_config/localization.py b/pandas/_config/localization.py index d2be0b5cc6ec6..3d94d3ab21167 100644 --- a/pandas/_config/localization.py +++ b/pandas/_config/localization.py @@ -142,7 +142,7 @@ def get_locales( """ if platform.system() in ("Linux", "Darwin"): # raw_locales = subprocess.check_output(["locale", "-a"]) - raw_locales = b"" + raw_locales = [] else: # Other platforms e.g. windows platforms don't define "locale -a" # Note: is_platform_windows causes circular import here From 261d234234d691df45d6c365a4bea893f93d26fa Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 12:54:18 -0400 Subject: [PATCH 6/8] Revert "Try removing subprocess call in conftest" This reverts commit 31ad407638254e3a34ae76dcf381f1fac06b2205. --- pandas/_config/localization.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/_config/localization.py b/pandas/_config/localization.py index 3d94d3ab21167..61d88c43f0e4a 100644 --- a/pandas/_config/localization.py +++ b/pandas/_config/localization.py @@ -10,6 +10,7 @@ import locale import platform import re +import subprocess from typing import ( TYPE_CHECKING, cast, @@ -141,8 +142,7 @@ def get_locales( """ if platform.system() in ("Linux", "Darwin"): - # raw_locales = subprocess.check_output(["locale", "-a"]) - raw_locales = [] + raw_locales = subprocess.check_output(["locale", "-a"]) else: # Other platforms e.g. windows platforms don't define "locale -a" # Note: is_platform_windows causes circular import here From 398e19fc20546f499ad7cfc8572c4e3c7a2af9ce Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 12:54:29 -0400 Subject: [PATCH 7/8] Remove ASAN job --- .github/workflows/unit-tests.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 855973a22886a..b78854c5875e1 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -68,14 +68,6 @@ jobs: - name: "Pyarrow Nightly" env_file: actions-311-pyarrownightly.yaml pattern: "not slow and not network and not single_cpu" - - name: "ASAN / UBSAN" - env_file: actions-311-sanitizers.yaml - pattern: "not slow and not network and not single_cpu and not skip_ubsan" - asan_options: "ASAN_OPTIONS=detect_leaks=0" - preload: LD_PRELOAD=$(gcc -print-file-name=libasan.so) - meson_args: --config-settings=setup-args="-Db_sanitize=address,undefined" - cflags_adds: -fno-sanitize-recover=all - pytest_workers: -1 # disable pytest-xdist as it swallows stderr from ASAN fail-fast: false name: ${{ matrix.name || format('ubuntu-latest {0}', matrix.env_file) }} env: From 9b8dd85aad67580477b942244eb8164da293b131 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Mon, 18 Mar 2024 20:57:04 -0400 Subject: [PATCH 8/8] revert more --- .github/actions/run-tests/action.yml | 9 +------- .github/workflows/unit-tests.yml | 6 ------ ci/deps/actions-311-sanitizers.yaml | 32 ---------------------------- 3 files changed, 1 insertion(+), 46 deletions(-) delete mode 100644 ci/deps/actions-311-sanitizers.yaml diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 4a9fe04a8f5f9..66e4142dc0cbb 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -1,16 +1,9 @@ name: Run tests and report results -inputs: - preload: - description: Preload arguments for sanitizer - required: false - asan_options: - description: Arguments for Address Sanitizer (ASAN) - required: false runs: using: composite steps: - name: Test - run: ${{ inputs.asan_options }} ${{ inputs.preload }} ci/run_tests.sh + run: ci/run_tests.sh shell: bash -el {0} - name: Publish test results diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index b78854c5875e1..f93950224eaae 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -153,18 +153,12 @@ jobs: - name: Test (not single_cpu) uses: ./.github/actions/run-tests if: ${{ matrix.name != 'Pypy' }} - with: - preload: ${{ matrix.preload }} - asan_options: ${{ matrix.asan_options }} env: # Set pattern to not single_cpu if not already set PATTERN: ${{ env.PATTERN == '' && 'not single_cpu' || matrix.pattern }} - name: Test (single_cpu) uses: ./.github/actions/run-tests - with: - preload: ${{ matrix.preload }} - asan_options: ${{ matrix.asan_options }} env: PATTERN: 'single_cpu' PYTEST_WORKERS: 0 diff --git a/ci/deps/actions-311-sanitizers.yaml b/ci/deps/actions-311-sanitizers.yaml deleted file mode 100644 index f5f04c90bffad..0000000000000 --- a/ci/deps/actions-311-sanitizers.yaml +++ /dev/null @@ -1,32 +0,0 @@ -name: pandas-dev -channels: - - conda-forge -dependencies: - - python=3.11 - - # build dependencies - - versioneer[toml] - - cython>=0.29.33 - - meson[ninja]=1.2.1 - - meson-python=0.13.1 - - # test dependencies - - pytest>=7.3.2 - - pytest-cov - - pytest-xdist>=2.2.0 - - pytest-localserver>=0.7.1 - - pytest-qt>=4.2.0 - - boto3 - - hypothesis>=6.46.1 - - pyqt>=5.15.9 - - # required dependencies - - python-dateutil - - numpy - - pytz - - # pandas dependencies - - pip - - - pip: - - "tzdata>=2022.7"