File tree 6 files changed +8
-8
lines changed
tests/integrations/cloud_resource_context
6 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 11
11
import sphinx .builders .texinfo
12
12
import sphinx .builders .text
13
13
import sphinx .ext .autodoc
14
+ import urllib3 .exceptions
14
15
15
16
typing .TYPE_CHECKING = True
16
17
Original file line number Diff line number Diff line change 1
1
import json
2
- import urllib3 # type: ignore
2
+ import urllib3
3
3
4
4
from sentry_sdk .integrations import Integration
5
5
from sentry_sdk .api import set_context
@@ -80,7 +80,7 @@ def _is_aws(cls):
80
80
if r .status != 200 :
81
81
return False
82
82
83
- cls .aws_token = r .data
83
+ cls .aws_token = r .data . decode ()
84
84
return True
85
85
86
86
except Exception :
Original file line number Diff line number Diff line change 26
26
from sentry_sdk .utils import Dsn
27
27
from sentry_sdk ._types import TYPE_CHECKING
28
28
29
- from urllib3 .util import parse_url as urlparse # type: ignore
29
+ from urllib3 .util import parse_url as urlparse
30
30
31
31
if TYPE_CHECKING :
32
32
from typing import Any
Original file line number Diff line number Diff line change 1
1
from __future__ import print_function
2
2
3
3
import io
4
- import urllib3 # type: ignore
4
+ import urllib3
5
5
import certifi
6
6
import gzip
7
7
import time
26
26
from typing import Union
27
27
from typing import DefaultDict
28
28
29
- from urllib3 .poolmanager import PoolManager # type: ignore
29
+ from urllib3 .poolmanager import PoolManager
30
30
from urllib3 .poolmanager import ProxyManager
31
31
32
32
from sentry_sdk ._types import Event , EndpointType
@@ -186,7 +186,7 @@ def record_lost_event(
186
186
self ._discarded_events [data_category , reason ] += quantity
187
187
188
188
def _update_rate_limits (self , response ):
189
- # type: (urllib3.HTTPResponse ) -> None
189
+ # type: (urllib3.BaseHTTPResponse ) -> None
190
190
191
191
# new sentries with more rate limit insights. We honor this header
192
192
# 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):
41
41
'urllib3>=1.25.7; python_version<="3.4"' ,
42
42
'urllib3>=1.26.9; python_version=="3.5"' ,
43
43
'urllib3>=1.26.11; python_version >="3.6"' ,
44
- 'urllib3<2.0.0' ,
45
44
"certifi" ,
46
45
],
47
46
extras_require = {
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ def test_is_aws_ok():
136
136
CloudResourceContextIntegration .http .request = MagicMock (return_value = response )
137
137
138
138
assert CloudResourceContextIntegration ._is_aws () is True
139
- assert CloudResourceContextIntegration .aws_token == b "something"
139
+ assert CloudResourceContextIntegration .aws_token == "something"
140
140
141
141
CloudResourceContextIntegration .http .request = MagicMock (
142
142
side_effect = Exception ("Test" )
You can’t perform that action at this time.
0 commit comments