Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / streaming-form-data / drop-smart-open.patch
blob6c0946c926ecb7a8300758f9eb1634fd7e020a80
1 diff --git a/streaming_form_data/targets.py b/streaming_form_data/targets.py
2 index a399f3a..b816714 100644
3 --- a/streaming_form_data/targets.py
4 +++ b/streaming_form_data/targets.py
5 @@ -1,6 +1,5 @@
6 import hashlib
7 from pathlib import Path
8 -import smart_open # type: ignore
9 from typing import Callable, List, Optional
12 @@ -164,6 +163,7 @@ class S3Target(BaseTarget):
13 S3Target enables chunked uploads to S3 buckets (using smart_open)"""
15 def __init__(self, file_path, mode, transport_params=None, **kwargs):
16 + raise Exception("Nixpkgs: disabled")
17 super().__init__(**kwargs)
19 self._file_path = file_path
20 diff --git a/tests/test_targets.py b/tests/test_targets.py
21 index 0cc79ab..78ab40b 100644
22 --- a/tests/test_targets.py
23 +++ b/tests/test_targets.py
24 @@ -2,8 +2,6 @@ import os.path
25 import tempfile
27 import pytest
28 -from moto import mock_s3
29 -import boto3
31 from streaming_form_data.targets import (
32 BaseTarget,
33 @@ -271,6 +269,7 @@ def mock_client():
34 yield client
37 +@pytest.mark.skip
38 def test_s3_upload(mock_client):
39 test_key = "test.txt"
40 path = f"s3://{BUCKET_NAME}/{test_key}"