lol

Merge pull request #301220 from edef1c/parquet-tools/moto-5

parquet-tools: support Moto 5.x

authored by

Florian Klink and committed by
GitHub
33fcd9cf facc1761

+34
+6
pkgs/tools/misc/parquet-tools/default.nix
··· 18 18 hash = "sha256-2jIwDsxB+g37zV9hLc2VNC5YuZXTpTmr2aQ72AeHYJo="; 19 19 }; 20 20 21 + patches = [ 22 + # support Moto 5.x 23 + # https://github.com/ktrueda/parquet-tools/pull/55 24 + ./moto5.patch 25 + ]; 26 + 21 27 postPatch = '' 22 28 substituteInPlace tests/test_inspect.py \ 23 29 --replace "parquet-cpp-arrow version 5.0.0" "parquet-cpp-arrow version ${pyarrow.version}" \
+28
pkgs/tools/misc/parquet-tools/moto5.patch
··· 1 + diff --git a/tests/fixtures/aws.py b/tests/fixtures/aws.py 2 + index 7eea4bd..9fb3345 100644 3 + --- a/tests/fixtures/aws.py 4 + +++ b/tests/fixtures/aws.py 5 + @@ -1,15 +1,17 @@ 6 + import boto3 7 + -from moto import mock_s3 8 + import pytest 9 + 10 + +try: 11 + + # Moto 4.x 12 + + from moto import mock_s3 13 + +except ImportError: 14 + + # Moto 5.x 15 + + from moto import mock_aws as mock_s3 16 + 17 + @pytest.fixture 18 + def aws_session(): 19 + - mock_s3_server = mock_s3() 20 + - mock_s3_server.start() 21 + - yield boto3.Session() 22 + - mock_s3_server.stop() 23 + - 24 + + with mock_s3(): 25 + + yield boto3.Session() 26 + 27 + @pytest.fixture 28 + def aws_s3_bucket(aws_session):