strawberry-graphql 0.265.0__py3-none-any.whl → 0.265.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
strawberry/sanic/utils.py CHANGED
@@ -1,6 +1,5 @@
1
1
  from __future__ import annotations
2
2
 
3
- from io import BytesIO
4
3
  from typing import TYPE_CHECKING, Any, Optional, Union, cast
5
4
 
6
5
  if TYPE_CHECKING:
@@ -8,7 +7,7 @@ if TYPE_CHECKING:
8
7
 
9
8
 
10
9
  def convert_request_to_files_dict(request: Request) -> dict[str, Any]:
11
- """Converts the request.files dictionary to a dictionary of BytesIO objects.
10
+ """Converts the request.files dictionary to a dictionary of sanic Request objects.
12
11
 
13
12
  `request.files` has the following format, even if only a single file is uploaded:
14
13
 
@@ -27,12 +26,12 @@ def convert_request_to_files_dict(request: Request) -> dict[str, Any]:
27
26
  if not request_files:
28
27
  return {}
29
28
 
30
- files_dict: dict[str, Union[BytesIO, list[BytesIO]]] = {}
29
+ files_dict: dict[str, Union[File, list[File]]] = {}
31
30
 
32
31
  for field_name, file_list in request_files.items():
33
32
  assert len(file_list) == 1
34
33
 
35
- files_dict[field_name] = BytesIO(file_list[0].body)
34
+ files_dict[field_name] = file_list[0]
36
35
 
37
36
  return files_dict
38
37
 
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import TYPE_CHECKING, Optional, Tuple, Union, cast
3
+ from typing import TYPE_CHECKING, Optional, Union, cast
4
4
  from typing_extensions import Protocol
5
5
 
6
6
  from strawberry.directive import StrawberryDirective
@@ -106,7 +106,7 @@ class NameConverter:
106
106
  return union.graphql_name
107
107
 
108
108
  name = ""
109
- types: Tuple[StrawberryType, ...] = union.types
109
+ types: tuple[StrawberryType, ...] = union.types
110
110
 
111
111
  if union.concrete_of and union.concrete_of.graphql_name:
112
112
  concrete_of_types = set(union.concrete_of.types)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: strawberry-graphql
3
- Version: 0.265.0
3
+ Version: 0.265.1
4
4
  Summary: A library for creating GraphQL APIs
5
5
  License: MIT
6
6
  Keywords: graphql,api,rest,starlette,async
@@ -158,7 +158,7 @@ strawberry/relay/utils.py,sha256=-QxroxkSYtFnMYsJyTyfIi0I1fLtjnt6siW0kLNiyfs,590
158
158
  strawberry/resolvers.py,sha256=Vdidc3YFc4-olSQZD_xQ1icyAFbyzqs_8I3eSpMFlA4,260
159
159
  strawberry/sanic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
160
160
  strawberry/sanic/context.py,sha256=qN7I9K_qIqgdbG_FbDl8XMb9aM1PyjIxSo8IAg2Uq8o,844
161
- strawberry/sanic/utils.py,sha256=DiHWMfaulaP2QSi79NwI847xkUiBybvLdr0VSbKAwNQ,1044
161
+ strawberry/sanic/utils.py,sha256=XjUVBFuBWfECBCZbx_YtrjQnFTUyIGTo7aISIeB22Gc,1007
162
162
  strawberry/sanic/views.py,sha256=F5ZrKt-R3135evKLfhQuPd1isOexI0Lrzevm_6Te4Eg,7069
163
163
  strawberry/scalars.py,sha256=FcFTbu-yKbBfPCuAfXNa6DbTbEzF3eiQHs5nlt6GJdM,2234
164
164
  strawberry/schema/__init__.py,sha256=u1QCyDVQExUVDA20kyosKPz3TS5HMCN2NrXclhiFAL4,92
@@ -166,7 +166,7 @@ strawberry/schema/base.py,sha256=q5UAw6do4Ele5Cf8dNAouiPjNmZoCBNFqh5Vl05caCI,386
166
166
  strawberry/schema/compat.py,sha256=9qJ0lhYJeaN43ayFgVz708ZMvedBhofiTSw9kpFqmjU,1830
167
167
  strawberry/schema/config.py,sha256=6BpCbNNCuekGgiKEPt2mliMqLH_wIjJmSW0tLbnJwk4,924
168
168
  strawberry/schema/exceptions.py,sha256=rqVNb_oYrKM0dHPgvAemqCG6Um282LPPu4zwQ5cZqs4,584
169
- strawberry/schema/name_converter.py,sha256=MK4CqCtboyWnjIwit0tx9VCoS75LYTz4O5YAL3HBpiA,6952
169
+ strawberry/schema/name_converter.py,sha256=xFOXEgqldFkxXRkIQvsJN1dPkWbEUaIrTYNOMYSEVwQ,6945
170
170
  strawberry/schema/schema.py,sha256=qthZttzb9a0GEcwh7trqBKHmuPXOgQlnceqiCRPj4_s,34566
171
171
  strawberry/schema/schema_converter.py,sha256=OkJaYrWKGqcxdhoTeuf0aGqiTnWtDuZwYddY5uBlf8Q,37521
172
172
  strawberry/schema/types/__init__.py,sha256=oHO3COWhL3L1KLYCJNY1XFf5xt2GGtHiMC-UaYbFfnA,68
@@ -228,8 +228,8 @@ strawberry/utils/logging.py,sha256=U1cseHGquN09YFhFmRkiphfASKCyK0HUZREImPgVb0c,7
228
228
  strawberry/utils/operation.py,sha256=s7ajvLg_q6v2mg47kEMQPjO_J-XluMKTCwo4d47mGvE,1195
229
229
  strawberry/utils/str_converters.py,sha256=-eH1Cl16IO_wrBlsGM-km4IY0IKsjhjnSNGRGOwQjVM,897
230
230
  strawberry/utils/typing.py,sha256=Xmnhwvnw8RIQVIc5D5iI4_9qM4Thpk7tWx8xf-RW_So,13383
231
- strawberry_graphql-0.265.0.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
232
- strawberry_graphql-0.265.0.dist-info/METADATA,sha256=Ds08QsahrOH09gzBALiyESIbKiVn8CHMnsf-OLW_kLk,7679
233
- strawberry_graphql-0.265.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
234
- strawberry_graphql-0.265.0.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
235
- strawberry_graphql-0.265.0.dist-info/RECORD,,
231
+ strawberry_graphql-0.265.1.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
232
+ strawberry_graphql-0.265.1.dist-info/METADATA,sha256=tKLR23Ny7gQstdF5V-53xqdtPjsciPtA44Jqab3DLmI,7679
233
+ strawberry_graphql-0.265.1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
234
+ strawberry_graphql-0.265.1.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
235
+ strawberry_graphql-0.265.1.dist-info/RECORD,,