@@ -27,7 +27,6 @@
Loading
27 27
28 28
import dateutil.parser
29 29
from dateutil.tz import tzutc
30 -
from urllib3.util.url import IPV6_ADDRZ_RE
31 30
32 31
import botocore
33 32
import botocore.awsrequest
@@ -141,6 +140,38 @@
Loading
141 140
    "tagging": "resource-groups-tagging-api"
142 141
}
143 142
143 +
# Vendoring IPv6 validation regex patterns from urllib3
144 +
# https://github.com/urllib3/urllib3/blob/7e856c0/src/urllib3/util/url.py
145 +
IPV4_PAT = r"(?:[0-9]{1,3}\.){3}[0-9]{1,3}"
146 +
HEX_PAT = "[0-9A-Fa-f]{1,4}"
147 +
LS32_PAT = "(?:{hex}:{hex}|{ipv4})".format(hex=HEX_PAT, ipv4=IPV4_PAT)
148 +
_subs = {"hex": HEX_PAT, "ls32": LS32_PAT}
149 +
_variations = [
150 +
    #                            6( h16 ":" ) ls32
151 +
    "(?:%(hex)s:){6}%(ls32)s",
152 +
    #                       "::" 5( h16 ":" ) ls32
153 +
    "::(?:%(hex)s:){5}%(ls32)s",
154 +
    # [               h16 ] "::" 4( h16 ":" ) ls32
155 +
    "(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)s",
156 +
    # [ *1( h16 ":" ) h16 ] "::" 3( h16 ":" ) ls32
157 +
    "(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)s",
158 +
    # [ *2( h16 ":" ) h16 ] "::" 2( h16 ":" ) ls32
159 +
    "(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)s",
160 +
    # [ *3( h16 ":" ) h16 ] "::"    h16 ":"   ls32
161 +
    "(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)s",
162 +
    # [ *4( h16 ":" ) h16 ] "::"              ls32
163 +
    "(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)s",
164 +
    # [ *5( h16 ":" ) h16 ] "::"              h16
165 +
    "(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)s",
166 +
    # [ *6( h16 ":" ) h16 ] "::"
167 +
    "(?:(?:%(hex)s:){0,6}%(hex)s)?::",
168 +
]
169 +
170 +
UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~"
171 +
IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")"
172 +
ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+"
173 +
IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]"
174 +
IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$")
144 175
145 176
def ensure_boolean(val):
146 177
    """Ensures a boolean value if a string or boolean is provided
@@ -317,7 +348,7 @@
Loading
317 348
        else:
318 349
            chosen_base_url = METADATA_BASE_URL
319 350
320 -
        logger.info("IMDS ENDPOINT: %s" % chosen_base_url)
351 +
        logger.debug("IMDS ENDPOINT: %s" % chosen_base_url)
321 352
        if not is_valid_uri(chosen_base_url):
322 353
            raise InvalidIMDSEndpointError(endpoint=chosen_base_url)
323 354

@@ -16,7 +16,7 @@
Loading
16 16
import re
17 17
import logging
18 18
19 -
__version__ = '1.19.6'
19 +
__version__ = '1.19.7'
20 20
21 21
22 22
class NullHandler(logging.Handler):
Files Coverage
botocore 98.19%
Project Totals (58 files) 98.19%
7640.6
TRAVIS_PYTHON_VERSION=3.8
TRAVIS_OS_NAME=linux
7640.5
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
7638.2
TRAVIS_PYTHON_VERSION=3.4
TRAVIS_OS_NAME=linux
7638.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
7638.4
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
7638.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
7638.6
TRAVIS_PYTHON_VERSION=3.8
TRAVIS_OS_NAME=linux
7638.5
TRAVIS_PYTHON_VERSION=3.7
TRAVIS_OS_NAME=linux
7640.2
TRAVIS_PYTHON_VERSION=3.4
TRAVIS_OS_NAME=linux
7640.1
TRAVIS_PYTHON_VERSION=2.7
TRAVIS_OS_NAME=linux
7640.3
TRAVIS_PYTHON_VERSION=3.5
TRAVIS_OS_NAME=linux
7640.4
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
1
ignore:
2
  - "botocore/vendored"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading