From f70f9fbd85279725045f7c0af7db32adb1da806d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kriszti=C3=A1n=20Sz=C5=B1cs?= Date: Tue, 24 Sep 2019 19:49:14 +0200 Subject: [PATCH] remove minio-client dependency --- ci/conda_env_python.yml | 1 - python/pyarrow/tests/test_parquet.py | 24 ++++++++++++++++++++---- python/requirements-test.txt | 1 - 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ci/conda_env_python.yml b/ci/conda_env_python.yml index 65ab7d8afb8f6..0e6e5bf8d5c3c 100644 --- a/ci/conda_env_python.yml +++ b/ci/conda_env_python.yml @@ -19,7 +19,6 @@ cython=0.29.7 cloudpickle hypothesis numpy>=1.14 -minio pandas pytest pytest-faulthandler diff --git a/python/pyarrow/tests/test_parquet.py b/python/pyarrow/tests/test_parquet.py index cebb87a9f9bb3..8a8f4dddbe5e3 100644 --- a/python/pyarrow/tests/test_parquet.py +++ b/python/pyarrow/tests/test_parquet.py @@ -1844,12 +1844,28 @@ def test_filters_read_table(tempdir): @pytest.fixture -def s3_example(minio_server, minio_bucket): - s3fs = pytest.importorskip('s3fs') +def s3_bucket(request, minio_server): + boto3 = pytest.importorskip('boto3') + botocore = pytest.importorskip('botocore') address, access_key, secret_key = minio_server - bucket_name = minio_bucket + s3 = boto3.resource('s3', + endpoint_url='http://{}'.format(address), + aws_access_key_id=access_key, + aws_secret_access_key=secret_key, + config=botocore.client.Config(signature_version='s3v4'), + region_name='us-east-1' + ) + bucket = s3.Bucket('test-s3fs') + bucket.create() + return 'test-s3fs' + +@pytest.fixture +def s3_example(minio_server, s3_bucket): + s3fs = pytest.importorskip('s3fs') + + address, access_key, secret_key = minio_server fs = s3fs.S3FileSystem( key=access_key, secret=secret_key, @@ -1859,7 +1875,7 @@ def s3_example(minio_server, minio_bucket): ) test_dir = guid() - bucket_uri = 's3://{0}/{1}'.format(bucket_name, test_dir) + bucket_uri = 's3://{0}/{1}'.format(s3_bucket, test_dir) fs.mkdir(bucket_uri) yield fs, bucket_uri diff --git a/python/requirements-test.txt b/python/requirements-test.txt index 89921fa29f504..10d445cbc442b 100644 --- a/python/requirements-test.txt +++ b/python/requirements-test.txt @@ -1,6 +1,5 @@ cython hypothesis -minio pandas pathlib2; python_version < "3.4" pytest