From 701807a771d2e410a24ef01fa01566a9774d8ba9 Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Tue, 12 Mar 2024 14:46:17 +0100 Subject: [PATCH 1/6] Unpin pytest, fix s3_example_fs and remove --disable-warnings --- ci/conda_env_python.txt | 2 +- docker-compose.yml | 7 +++---- python/pyarrow/tests/parquet/conftest.py | 1 + python/requirements-test.txt | 2 +- python/requirements-wheel-test.txt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ci/conda_env_python.txt b/ci/conda_env_python.txt index 19e94d7d3e5..4366e300103 100644 --- a/ci/conda_env_python.txt +++ b/ci/conda_env_python.txt @@ -23,7 +23,7 @@ cloudpickle fsspec hypothesis numpy>=1.16.6 -pytest<8 +pytest pytest-faulthandler s3fs>=2023.10.0 setuptools diff --git a/docker-compose.yml b/docker-compose.yml index 26a42fa1394..2b46dbdb4f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1208,10 +1208,9 @@ services: LANG: "C.UTF-8" BUILD_DOCS_CPP: "ON" BUILD_DOCS_PYTHON: "ON" - # GH-31506/GH-33609: Remove --disable-warnings once - # https://github.com/lgpage/pytest-cython/issues/24 is resolved - # and a new version that includes the fix is released. - PYTEST_ARGS: "--doctest-modules --doctest-cython --disable-warnings" + # Temporarily removed --doctest-cython + # https://github.com/lgpage/pytest-cython/issues/58 + PYTEST_ARGS: "--doctest-modules" volumes: *conda-volumes command: ["/arrow/ci/scripts/cpp_build.sh /arrow /build && diff --git a/python/pyarrow/tests/parquet/conftest.py b/python/pyarrow/tests/parquet/conftest.py index 461c24af22a..767e7f6b69d 100644 --- a/python/pyarrow/tests/parquet/conftest.py +++ b/python/pyarrow/tests/parquet/conftest.py @@ -81,6 +81,7 @@ def s3_example_fs(s3_server): host, port, access_key, secret_key = s3_server['connection'] uri = ( "s3://{}:{}@mybucket/data.parquet?scheme=http&endpoint_override={}:{}" + "&allow_bucket_creation=True" .format(access_key, secret_key, host, port) ) fs, path = FileSystem.from_uri(uri) diff --git a/python/requirements-test.txt b/python/requirements-test.txt index 2108d70a543..975477c4223 100644 --- a/python/requirements-test.txt +++ b/python/requirements-test.txt @@ -1,5 +1,5 @@ cffi hypothesis pandas -pytest<8 +pytest pytz diff --git a/python/requirements-wheel-test.txt b/python/requirements-wheel-test.txt index a1046bc18c7..46bedc13ba1 100644 --- a/python/requirements-wheel-test.txt +++ b/python/requirements-wheel-test.txt @@ -1,7 +1,7 @@ cffi cython hypothesis -pytest<8 +pytest pytz tzdata; sys_platform == 'win32' From 5ccb996cf036fa60880f9a24e6aa22ab88392c96 Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Mon, 18 Mar 2024 09:32:53 +0100 Subject: [PATCH 2/6] Add pytest pin to conda-python-docs job and keep doctest-cython check --- docker-compose.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2b46dbdb4f5..8f4d9f30a54 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1208,14 +1208,13 @@ services: LANG: "C.UTF-8" BUILD_DOCS_CPP: "ON" BUILD_DOCS_PYTHON: "ON" - # Temporarily removed --doctest-cython - # https://github.com/lgpage/pytest-cython/issues/58 - PYTEST_ARGS: "--doctest-modules" + PYTEST_ARGS: "--doctest-modules --doctest-cython" volumes: *conda-volumes command: ["/arrow/ci/scripts/cpp_build.sh /arrow /build && /arrow/ci/scripts/python_build.sh /arrow /build && pip install -e /arrow/dev/archery[numpydoc] && + pip install "pytest<8" && archery numpydoc --allow-rule GL10,PR01,PR03,PR04,PR05,PR10,RT03,YD01 && /arrow/ci/scripts/python_test.sh /arrow"] From 262e64aadf2060fa627968990388341e93ad6005 Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Mon, 18 Mar 2024 09:39:00 +0100 Subject: [PATCH 3/6] Remove double quotes --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8f4d9f30a54..a2b45c95419 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1214,7 +1214,7 @@ services: ["/arrow/ci/scripts/cpp_build.sh /arrow /build && /arrow/ci/scripts/python_build.sh /arrow /build && pip install -e /arrow/dev/archery[numpydoc] && - pip install "pytest<8" && + pip install pytest<8 && archery numpydoc --allow-rule GL10,PR01,PR03,PR04,PR05,PR10,RT03,YD01 && /arrow/ci/scripts/python_test.sh /arrow"] From 40c3e2c71e0d18d125debd1508d4162943f9ed47 Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Tue, 19 Mar 2024 12:02:31 +0100 Subject: [PATCH 4/6] Use ~=7 and add comment --- docker-compose.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index a2b45c95419..4ae8aaff7fe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1210,11 +1210,15 @@ services: BUILD_DOCS_PYTHON: "ON" PYTEST_ARGS: "--doctest-modules --doctest-cython" volumes: *conda-volumes + # pytest is installed with an upper pin of 8.0.0 because + # newe version breaks cython doctesting, see: + # https://github.com/lgpage/pytest-cython/issues/58 + # Remove pip install pytest~=7 when upstream issue is resolved command: ["/arrow/ci/scripts/cpp_build.sh /arrow /build && /arrow/ci/scripts/python_build.sh /arrow /build && pip install -e /arrow/dev/archery[numpydoc] && - pip install pytest<8 && + pip install pytest~=7 && archery numpydoc --allow-rule GL10,PR01,PR03,PR04,PR05,PR10,RT03,YD01 && /arrow/ci/scripts/python_test.sh /arrow"] From e4fd086dfb014638d3b6cec7ecd5051699e4469e Mon Sep 17 00:00:00 2001 From: AlenkaF Date: Tue, 19 Mar 2024 12:03:20 +0100 Subject: [PATCH 5/6] Fix typo --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4ae8aaff7fe..c6d6eec81c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1211,7 +1211,7 @@ services: PYTEST_ARGS: "--doctest-modules --doctest-cython" volumes: *conda-volumes # pytest is installed with an upper pin of 8.0.0 because - # newe version breaks cython doctesting, see: + # newer version breaks cython doctesting, see: # https://github.com/lgpage/pytest-cython/issues/58 # Remove pip install pytest~=7 when upstream issue is resolved command: From d5b4d403429c28b54b03cf86a8e2774eaa5f78ef Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Tue, 19 Mar 2024 13:52:38 +0100 Subject: [PATCH 6/6] Update docker-compose.yml --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index c6d6eec81c4..301cb7eda74 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1218,7 +1218,7 @@ services: ["/arrow/ci/scripts/cpp_build.sh /arrow /build && /arrow/ci/scripts/python_build.sh /arrow /build && pip install -e /arrow/dev/archery[numpydoc] && - pip install pytest~=7 && + pip install pytest~=7.4 && archery numpydoc --allow-rule GL10,PR01,PR03,PR04,PR05,PR10,RT03,YD01 && /arrow/ci/scripts/python_test.sh /arrow"]