Skip to content

Commit b1ae36e

Browse files
authored
Update code_report.py (Azure#15806)
* Update code_report.py * Update code_report.py * Update code_report.py * Update code_report.py * Update _aiohttp.py * Update _base.py
1 parent 325c36e commit b1ae36e

File tree

3 files changed

+84
-47
lines changed

3 files changed

+84
-47
lines changed

sdk/core/azure-core/azure/core/pipeline/transport/_aiohttp.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import logging
3030
import asyncio
3131
import aiohttp
32+
from multidict import CIMultiDict
3233

3334
from requests.exceptions import (
3435
ChunkedEncodingError,
@@ -264,7 +265,7 @@ def __init__(self, request: HttpRequest, aiohttp_response: aiohttp.ClientRespons
264265
super(AioHttpTransportResponse, self).__init__(request, aiohttp_response, block_size=block_size)
265266
# https://aiohttp.readthedocs.io/en/stable/client_reference.html#aiohttp.ClientResponse
266267
self.status_code = aiohttp_response.status
267-
self.headers = aiohttp_response.headers
268+
self.headers = CIMultiDict(aiohttp_response.headers)
268269
self.reason = aiohttp_response.reason
269270
self.content_type = aiohttp_response.headers.get('content-type')
270271
self._body = None
@@ -307,6 +308,5 @@ def __getstate__(self):
307308
state = self.__dict__.copy()
308309
# Remove the unpicklable entries.
309310
state['internal_response'] = None # aiohttp response are not pickable (see headers comments)
310-
from multidict import CIMultiDict # I know it's importable since aiohttp is loaded
311311
state['headers'] = CIMultiDict(self.headers) # MultiDictProxy is not pickable
312312
return state

sdk/core/azure-core/azure/core/pipeline/transport/_base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777

7878
if TYPE_CHECKING:
7979
from ..policies import SansIOHTTPPolicy
80+
from collections.abc import MutableMapping
8081

8182
HTTPResponseType = TypeVar("HTTPResponseType")
8283
HTTPRequestType = TypeVar("HTTPRequestType")
@@ -478,7 +479,7 @@ def __init__(self, request, internal_response, block_size=None):
478479
self.request = request
479480
self.internal_response = internal_response
480481
self.status_code = None # type: Optional[int]
481-
self.headers = {} # type: Dict[str, str]
482+
self.headers = {} # type: MutableMapping[str, str]
482483
self.reason = None # type: Optional[str]
483484
self.content_type = None # type: Optional[str]
484485
self.block_size = block_size or 4096 # Default to same as Requests

tools/azure-sdk-tools/packaging_tools/code_report.py

Lines changed: 80 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -153,51 +153,87 @@ def filter_track2_versions(package_name, versions):
153153
from packaging import version
154154
track2_versions = {
155155
'azure-mgmt-appconfiguration': '1.0.0b1',
156-
'azure-mgmt-compute':'17.0.0b1',
157-
'azure-mgmt-eventhub':'8.0.0b1',
158-
'azure-mgmt-keyvault':'7.0.0b1',
159-
'azure-mgmt-monitor':'1.0.0b1',
160-
'azure-mgmt-network':'16.0.0b1',
161-
'azure-mgmt-resource':'15.0.0b1',
162-
'azure-mgmt-storage':'16.0.0b1',
156+
'azure-mgmt-compute': '17.0.0b1',
157+
'azure-mgmt-eventhub': '8.0.0b1',
158+
'azure-mgmt-keyvault': '7.0.0b1',
159+
'azure-mgmt-monitor': '1.0.0b1',
160+
'azure-mgmt-network': '16.0.0b1',
161+
'azure-mgmt-resource': '15.0.0b1',
162+
'azure-mgmt-storage': '16.0.0b1',
163163
'azure-mgmt-containerservice': '14.0.0b1',
164-
'azure-mgmt-web':'1.0.0b1',
165-
'azure-mgmt-authorization':'1.0.0b1',
166-
'azure-mgmt-servicebus':'6.0.0b1',
167-
'azure-mgmt-cosmosdb':'6.0.0b1',
168-
'azure-mgmt-sql':'1.0.0b1',
169-
'azure-mgmt-redis':'12.0.0b1',
170-
'azure-mgmt-containerregistry':'8.0.0b1',
171-
'azure-mgmt-containerinstance':'7.0.0b1',
172-
'azure-mgmt-resourcegraph':'7.0.0b1',
173-
'azure-mgmt-subscription':'1.0.0b1',
174-
'azure-mgmt-operationsmanagement':'1.0.0b1',
175-
'azure-mgmt-datafactory':'1.0.0b1',
176-
'azure-mgmt-rdbms':'8.0.0b1',
177-
'azure-mgmt-loganalytics':'7.0.0b1',
178-
'azure-mgmt-automation':'1.0.0b1',
179-
'azure-mgmt-recoveryservices':'1.0.0b1',
180-
'azure-mgmt-iothub':'1.0.0b1',
181-
'azure-mgmt-logic':'9.0.0b1',
182-
'azure-mgmt-hdinsight':'7.0.0b1',
183-
'azure-mgmt-machinelearningservices':'1.0.0b1',
184-
'azure-mgmt-datalake-store':'1.0.0b1',
185-
'azure-mgmt-cdn':'10.0.0b1',
186-
'azure-mgmt-devtestlabs':'9.0.0b1',
187-
'azure-mgmt-apimanagement':'1.0.0b1',
188-
'azure-mgmt-eventgrid':'8.0.0b1',
189-
'azure-mgmt-consumption':'8.0.0b1',
190-
'azure-mgmt-marketplaceordering':'1.0.0b1',
191-
'azure-mgmt-advisor':'9.0.0b1',
192-
'azure-mgmt-cognitiveservices':'11.0.0b1',
193-
'azure-mgmt-security':'1.0.0b1',
194-
'azure-mgmt-relay':'1.0.0b1',
195-
'azure-mgmt-notificationhubs':'7.0.0b1',
196-
'azure-mgmt-search':'8.0.0b1',
197-
'azure-mgmt-policyinsights':'1.0.0b1',
198-
'azure-mgmt-batch':'14.0.0b1',
199-
'azure-mgmt-scheduler':'7.0.0b1',
200-
'azure-mgmt-commerce':'6.0.0b1'
164+
'azure-mgmt-web': '1.0.0b1',
165+
'azure-mgmt-authorization': '1.0.0b1',
166+
'azure-mgmt-servicebus': '6.0.0b1',
167+
'azure-mgmt-cosmosdb': '6.0.0b1',
168+
'azure-mgmt-sql': '1.0.0b1',
169+
'azure-mgmt-redis': '12.0.0b1',
170+
'azure-mgmt-containerregistry': '8.0.0b1',
171+
'azure-mgmt-containerinstance': '7.0.0b1',
172+
'azure-mgmt-resourcegraph': '7.0.0b1',
173+
'azure-mgmt-subscription': '1.0.0b1',
174+
'azure-mgmt-operationsmanagement': '1.0.0b1',
175+
'azure-mgmt-datafactory': '1.0.0b1',
176+
'azure-mgmt-rdbms': '8.0.0b1',
177+
'azure-mgmt-loganalytics': '7.0.0b1',
178+
'azure-mgmt-automation': '1.0.0b1',
179+
'azure-mgmt-recoveryservices': '1.0.0b1',
180+
'azure-mgmt-iothub': '1.0.0b1',
181+
'azure-mgmt-logic': '9.0.0b1',
182+
'azure-mgmt-hdinsight': '7.0.0b1',
183+
'azure-mgmt-machinelearningservices': '1.0.0b1',
184+
'azure-mgmt-datalake-store': '1.0.0b1',
185+
'azure-mgmt-cdn': '10.0.0b1',
186+
'azure-mgmt-devtestlabs': '9.0.0b1',
187+
'azure-mgmt-apimanagement': '1.0.0b1',
188+
'azure-mgmt-eventgrid': '8.0.0b1',
189+
'azure-mgmt-consumption': '8.0.0b1',
190+
'azure-mgmt-marketplaceordering': '1.0.0b1',
191+
'azure-mgmt-advisor': '9.0.0b1',
192+
'azure-mgmt-cognitiveservices': '11.0.0b1',
193+
'azure-mgmt-security': '1.0.0b1',
194+
'azure-mgmt-relay': '1.0.0b1',
195+
'azure-mgmt-notificationhubs': '7.0.0b1',
196+
'azure-mgmt-search': '8.0.0b1',
197+
'azure-mgmt-policyinsights': '1.0.0b1',
198+
'azure-mgmt-batch': '14.0.0b1',
199+
'azure-mgmt-scheduler': '7.0.0b1',
200+
'azure-mgmt-commerce': '6.0.0b1',
201+
'azure-mgmt-alertsmanagement': '1.0.0b1',
202+
'azure-mgmt-billing': '6.0.0b1',
203+
'azure-mgmt-botservice': '1.0.0b1',
204+
'azure-mgmt-costmanagement': '1.0.0b1',
205+
'azure-mgmt-databox': '1.0.0b1',
206+
'azure-mgmt-databricks': '1.0.0b1',
207+
'azure-mgmt-deploymentmanager': '1.0.0b1',
208+
'azure-mgmt-kusto': '1.0.0b1',
209+
'azure-mgmt-labservices': '1.0.0b1',
210+
'azure-mgmt-maps': '1.0.0b1',
211+
'azure-mgmt-media': '7.0.0b1',
212+
'azure-mgmt-netapp': '1.0.0b1',
213+
'azure-mgmt-powerbidedicated': '1.0.0b1',
214+
'azure-mgmt-servicefabric': '1.0.0b1',
215+
'azure-mgmt-signalr': '1.0.0b1',
216+
'azure-mgmt-support': '6.0.0b1',
217+
'azure-mgmt-storagesync': '1.0.0b1',
218+
'azure-mgmt-appplatform': '6.0.0b1',
219+
'azure-mgmt-attestation': '1.0.0b1',
220+
'azure-mgmt-azurestack': '1.0.0b1',
221+
'azure-mgmt-customproviders': '1.0.0b1',
222+
'azure-mgmt-datashare': '1.0.0b1',
223+
'azure-mgmt-hanaonazure': '1.0.0b1',
224+
'azure-mgmt-healthcareapis': '1.0.0b1',
225+
'azure-mgmt-hybridcompute': '7.0.0b1',
226+
'azure-mgmt-maintenance': '1.0.0b1',
227+
'azure-mgmt-managedservices': '6.0.0b1',
228+
'azure-mgmt-peering': '1.0.0b1',
229+
'azure-mgmt-automanage': '1.0.0b1',
230+
'azure-mgmt-applicationinsights': '1.0.0b1',
231+
'azure-mgmt-azurestackhci': '6.0.0b1',
232+
'azure-mgmt-databoxedge': '1.0.0b1',
233+
'azure-mgmt-hybridkubernetes': '1.0.0b1',
234+
'azure-mgmt-managementgroups': '1.0.0b1',
235+
'azure-mgmt-resourcemover': '1.0.1b1',
236+
'azure-mgmt-synapse': '1.0.0b1'
201237
}
202238
upbound = track2_versions.get(package_name)
203239
if not upbound:

0 commit comments

Comments
 (0)