Skip to content

Commit

Permalink
trim now unneeded usage of botocore.compat shim
Browse files Browse the repository at this point in the history
  • Loading branch information
a-detiste committed Feb 9, 2025
1 parent c70be78 commit cfbce6b
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
from io import BytesIO
from subprocess import PIPE, Popen
from unittest import mock
from urllib.parse import parse_qs, urlparse

from dateutil.tz import tzlocal

import botocore.loaders
import botocore.session
from botocore import credentials, utils
from botocore.awsrequest import AWSResponse
from botocore.compat import HAS_CRT, parse_qs, urlparse
from botocore.compat import HAS_CRT
from botocore.configprovider import create_botocore_default_config_mapping
from botocore.httpchecksum import _CHECKSUM_CLS, DEFAULT_CHECKSUM_ALGORITHM
from botocore.stub import Stubber
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/auth/test_signers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
import io
import json
import time
from urllib.parse import parse_qs, urlsplit

import botocore.auth
import botocore.credentials
from botocore.awsrequest import AWSRequest
from botocore.compat import HTTPHeaders, parse_qs, urlsplit
from botocore.compat import HTTPHeaders
from tests import mock, unittest


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/auth/test_sigv4.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
import os
import re
from http.server import BaseHTTPRequestHandler
from urllib.parse import parse_qsl, urlsplit

import pytest

import botocore.auth
from botocore.awsrequest import AWSRequest
from botocore.compat import parse_qsl, urlsplit
from botocore.credentials import Credentials
from tests import FreezeTime

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/docs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
import os
import shutil
import tempfile
from collections import OrderedDict

from botocore.client import ClientCreator
from botocore.compat import OrderedDict
from botocore.configprovider import ConfigValueStore
from botocore.docs.bcdoc.restdoc import DocumentStructure
from botocore.hooks import HierarchicalEmitter
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/docs/test_sharedexample.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
from botocore.compat import OrderedDict
from collections import OrderedDict

from botocore.docs.sharedexample import (
SharedExampleDocumenter,
document_shared_examples,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_credentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
import json
import os
import shutil
import subprocess
Expand All @@ -25,7 +26,6 @@
import botocore.exceptions
import botocore.session
from botocore import credentials
from botocore.compat import json
from botocore.configprovider import ConfigValueStore
from botocore.credentials import (
AssumeRoleProvider,
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@
import json
import logging
import os
from collections import OrderedDict
from urllib.parse import quote

import pytest

import botocore
import botocore.session
from botocore import handlers
from botocore.awsrequest import AWSRequest
from botocore.compat import OrderedDict, quote
from botocore.config import Config
from botocore.credentials import Credentials
from botocore.docs.bcdoc.restdoc import DocumentStructure
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/test_model.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from collections import OrderedDict

import pytest

from botocore import model
from botocore.compat import OrderedDict
from tests import unittest


Expand Down
4 changes: 3 additions & 1 deletion tests/unit/test_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,18 @@
"""

import copy
import json
import os
from base64 import b64decode
from calendar import timegm
from collections import OrderedDict
from enum import Enum
from urllib.parse import urlsplit

import pytest
from dateutil.tz import tzutc

from botocore.awsrequest import HeadersDict, prepare_request_dict
from botocore.compat import OrderedDict, json, urlsplit
from botocore.eventstream import EventStream
from botocore.model import NoShapeFoundError, OperationModel, ServiceModel
from botocore.parsers import (
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_s3_addressing.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
# language governing permissions and limitations under the License.

import os
from collections import OrderedDict

from botocore.compat import OrderedDict
from botocore.handlers import set_list_objects_encoding_type_url
from tests import BaseSessionTest, ClientHTTPStubber

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import copy
import datetime
import io
import json
import operator
from contextlib import contextmanager
from sys import getrefcount
Expand All @@ -23,7 +24,6 @@
import botocore
from botocore import xform_name
from botocore.awsrequest import AWSRequest, HeadersDict
from botocore.compat import json
from botocore.config import Config
from botocore.endpoint_provider import RuleSetEndpoint
from botocore.exceptions import (
Expand Down

0 comments on commit cfbce6b

Please sign in to comment.