File tree Expand file tree Collapse file tree 6 files changed +8
-8
lines changed
tests/integrations/cloud_resource_context Expand file tree Collapse file tree 6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1111import sphinx .builders .texinfo
1212import sphinx .builders .text
1313import sphinx .ext .autodoc
14+ import urllib3 .exceptions
1415
1516typing .TYPE_CHECKING = True
1617
Original file line number Diff line number Diff line change 11import json
2- import urllib3 # type: ignore
2+ import urllib3
33
44from sentry_sdk .integrations import Integration
55from sentry_sdk .api import set_context
@@ -80,7 +80,7 @@ def _is_aws(cls):
8080 if r .status != 200 :
8181 return False
8282
83- cls .aws_token = r .data
83+ cls .aws_token = r .data . decode ()
8484 return True
8585
8686 except Exception :
Original file line number Diff line number Diff line change 2626from sentry_sdk .utils import Dsn
2727from sentry_sdk ._types import TYPE_CHECKING
2828
29- from urllib3 .util import parse_url as urlparse # type: ignore
29+ from urllib3 .util import parse_url as urlparse
3030
3131if TYPE_CHECKING :
3232 from typing import Any
Original file line number Diff line number Diff line change 11from __future__ import print_function
22
33import io
4- import urllib3 # type: ignore
4+ import urllib3
55import certifi
66import gzip
77import time
2626 from typing import Union
2727 from typing import DefaultDict
2828
29- from urllib3 .poolmanager import PoolManager # type: ignore
29+ from urllib3 .poolmanager import PoolManager
3030 from urllib3 .poolmanager import ProxyManager
3131
3232 from sentry_sdk ._types import Event , EndpointType
@@ -186,7 +186,7 @@ def record_lost_event(
186186 self ._discarded_events [data_category , reason ] += quantity
187187
188188 def _update_rate_limits (self , response ):
189- # type: (urllib3.HTTPResponse ) -> None
189+ # type: (urllib3.BaseHTTPResponse ) -> None
190190
191191 # new sentries with more rate limit insights. We honor this header
192192 # no matter of the status code to update our internal rate limits.
Original file line number Diff line number Diff line change @@ -41,7 +41,6 @@ def get_file_text(file_name):
4141 'urllib3>=1.25.7; python_version<="3.4"' ,
4242 'urllib3>=1.26.9; python_version=="3.5"' ,
4343 'urllib3>=1.26.11; python_version >="3.6"' ,
44- 'urllib3<2.0.0' ,
4544 "certifi" ,
4645 ],
4746 extras_require = {
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ def test_is_aws_ok():
136136 CloudResourceContextIntegration .http .request = MagicMock (return_value = response )
137137
138138 assert CloudResourceContextIntegration ._is_aws () is True
139- assert CloudResourceContextIntegration .aws_token == b "something"
139+ assert CloudResourceContextIntegration .aws_token == "something"
140140
141141 CloudResourceContextIntegration .http .request = MagicMock (
142142 side_effect = Exception ("Test" )
You can’t perform that action at this time.
0 commit comments