strawberry-graphql 0.271.0__py3-none-any.whl → 0.271.2__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/types/base.py CHANGED
@@ -429,8 +429,10 @@ class StrawberryObjectDefinition(StrawberryType):
429
429
  if hasattr(real_concrete_type, "_enum_definition"):
430
430
  real_concrete_type = real_concrete_type._enum_definition
431
431
 
432
- if isinstance(expected_concrete_type, type) and issubclass(
433
- real_concrete_type, expected_concrete_type
432
+ if (
433
+ isinstance(expected_concrete_type, type)
434
+ and isinstance(real_concrete_type, type)
435
+ and issubclass(real_concrete_type, expected_concrete_type)
434
436
  ):
435
437
  return True
436
438
 
@@ -1,6 +1,6 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import TYPE_CHECKING, Optional, cast
3
+ from typing import TYPE_CHECKING, Optional
4
4
 
5
5
  from graphql.language import OperationDefinitionNode
6
6
 
@@ -27,7 +27,8 @@ def get_operation_type(
27
27
 
28
28
  if operation_name:
29
29
  for d in graphql_document.definitions:
30
- d = cast("OperationDefinitionNode", d)
30
+ if not isinstance(d, OperationDefinitionNode):
31
+ continue
31
32
  if d.name and d.name.value == operation_name:
32
33
  definition = d
33
34
  break
@@ -1,23 +1,17 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: strawberry-graphql
3
- Version: 0.271.0
3
+ Version: 0.271.2
4
4
  Summary: A library for creating GraphQL APIs
5
5
  License: MIT
6
6
  Keywords: graphql,api,rest,starlette,async
7
7
  Author: Patrick Arminio
8
8
  Author-email: patrick.arminio@gmail.com
9
- Requires-Python: >=3.9
9
+ Requires-Python: >=3.9,<4.0
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved :: MIT License
13
- Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.9
15
- Classifier: Programming Language :: Python :: 3.10
16
- Classifier: Programming Language :: Python :: 3.11
17
- Classifier: Programming Language :: Python :: 3.12
18
- Classifier: Programming Language :: Python :: 3.13
19
12
  Classifier: Topic :: Software Development :: Libraries
20
13
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
+ Classifier: License :: OSI Approved :: MIT License
21
15
  Provides-Extra: aiohttp
22
16
  Provides-Extra: asgi
23
17
  Provides-Extra: chalice
@@ -35,31 +29,41 @@ Provides-Extra: pyinstrument
35
29
  Provides-Extra: quart
36
30
  Provides-Extra: sanic
37
31
  Requires-Dist: Django (>=3.2) ; extra == "django"
38
- Requires-Dist: aiohttp (>=3.7.4.post0,<4.0.0) ; extra == "aiohttp"
39
- Requires-Dist: asgiref (>=3.2,<4.0) ; extra == "django" or extra == "channels"
32
+ Requires-Dist: aiohttp (>=3.7.4.post0,<4) ; extra == "aiohttp"
33
+ Requires-Dist: asgiref (>=3.2,<4.0) ; extra == "channels"
34
+ Requires-Dist: asgiref (>=3.2,<4.0) ; extra == "django"
40
35
  Requires-Dist: chalice (>=1.22,<2.0) ; extra == "chalice"
41
36
  Requires-Dist: channels (>=3.0.5) ; extra == "channels"
42
37
  Requires-Dist: fastapi (>=0.65.2) ; extra == "fastapi"
43
38
  Requires-Dist: flask (>=1.1) ; extra == "flask"
44
- Requires-Dist: graphql-core (>=3.2.0,<3.4.0) ; python_version >= "3.9" and python_version < "4.0"
45
- Requires-Dist: libcst (>=0.4.7,<1.8.0) ; extra == "debug" or extra == "debug-server" or extra == "cli"
46
- Requires-Dist: litestar (>=2) ; (python_version >= "3.10" and python_version < "4.0") and (extra == "litestar")
39
+ Requires-Dist: graphql-core (>=3.2.0,<3.4.0)
40
+ Requires-Dist: libcst (>=0.4.7,<1.8.0) ; extra == "cli"
41
+ Requires-Dist: libcst (>=0.4.7,<1.8.0) ; extra == "debug"
42
+ Requires-Dist: libcst (>=0.4.7,<1.8.0) ; extra == "debug-server"
43
+ Requires-Dist: litestar (>=2) ; (python_version ~= "3.10") and (extra == "litestar")
47
44
  Requires-Dist: opentelemetry-api (<2) ; extra == "opentelemetry"
48
45
  Requires-Dist: opentelemetry-sdk (<2) ; extra == "opentelemetry"
49
46
  Requires-Dist: packaging (>=23)
50
47
  Requires-Dist: pydantic (>1.6.1) ; extra == "pydantic"
51
- Requires-Dist: pygments (>=2.3,<3.0) ; extra == "debug-server" or extra == "cli"
48
+ Requires-Dist: pygments (>=2.3,<3.0) ; extra == "cli"
49
+ Requires-Dist: pygments (>=2.3,<3.0) ; extra == "debug-server"
52
50
  Requires-Dist: pyinstrument (>=4.0.0) ; extra == "pyinstrument"
53
- Requires-Dist: python-dateutil (>=2.7.0,<3.0.0)
54
- Requires-Dist: python-multipart (>=0.0.7) ; extra == "asgi" or extra == "debug-server" or extra == "fastapi"
51
+ Requires-Dist: python-dateutil (>=2.7,<3.0)
52
+ Requires-Dist: python-multipart (>=0.0.7) ; extra == "asgi"
53
+ Requires-Dist: python-multipart (>=0.0.7) ; extra == "debug-server"
54
+ Requires-Dist: python-multipart (>=0.0.7) ; extra == "fastapi"
55
55
  Requires-Dist: quart (>=0.19.3) ; extra == "quart"
56
- Requires-Dist: rich (>=12.0.0) ; extra == "debug" or extra == "debug-server" or extra == "cli"
56
+ Requires-Dist: rich (>=12.0.0) ; extra == "cli"
57
+ Requires-Dist: rich (>=12.0.0) ; extra == "debug"
58
+ Requires-Dist: rich (>=12.0.0) ; extra == "debug-server"
57
59
  Requires-Dist: sanic (>=20.12.2) ; extra == "sanic"
58
- Requires-Dist: starlette (>=0.18.0) ; extra == "asgi" or extra == "debug-server"
59
- Requires-Dist: typer (>=0.7.0) ; extra == "debug-server" or extra == "cli"
60
+ Requires-Dist: starlette (>=0.18.0) ; extra == "asgi"
61
+ Requires-Dist: starlette (>=0.18.0) ; extra == "debug-server"
62
+ Requires-Dist: typer (>=0.7.0) ; extra == "cli"
63
+ Requires-Dist: typer (>=0.7.0) ; extra == "debug-server"
60
64
  Requires-Dist: typing-extensions (>=4.5.0)
61
65
  Requires-Dist: uvicorn (>=0.11.6) ; extra == "debug-server"
62
- Requires-Dist: websockets (>=15.0.1,<16.0.0) ; extra == "debug-server"
66
+ Requires-Dist: websockets (>=15.0.1,<16) ; extra == "debug-server"
63
67
  Project-URL: Changelog, https://strawberry.rocks/changelog
64
68
  Project-URL: Documentation, https://strawberry.rocks/
65
69
  Project-URL: Discord, https://discord.com/invite/3uQ2PaY
@@ -166,17 +170,6 @@ urlpatterns = [
166
170
  ]
167
171
  ```
168
172
 
169
- ## WebSockets
170
-
171
- To support graphql Subscriptions over WebSockets you need to provide a WebSocket
172
- enabled server. The debug server can be made to support WebSockets with these
173
- commands:
174
-
175
- ```shell
176
- pip install 'strawberry-graphql[debug-server]'
177
- pip install 'uvicorn[standard]'
178
- ```
179
-
180
173
  ## Examples
181
174
 
182
175
  * [Various examples on how to use Strawberry](https://github.com/strawberry-graphql/examples)
@@ -198,7 +198,7 @@ strawberry/tools/merge_types.py,sha256=hUMRRNM28FyPp70jRA3d4svv9WoEBjaNpihBt3DaY
198
198
  strawberry/types/__init__.py,sha256=baWEdDkkmCcITOhkg2hNUOenrNV1OYdxGE5qgvIRwwU,351
199
199
  strawberry/types/arguments.py,sha256=DVouyH70uvTcFP3PmRzo8QdMThoqXdigJbWE9Lgn5pU,9849
200
200
  strawberry/types/auto.py,sha256=WZ2cQAI8nREUigBzpzFqIKGjJ_C2VqpAPNe8vPjTciM,3007
201
- strawberry/types/base.py,sha256=tZSqxtrxXa1Y964HS2uakCbCgLyGO9A4WpODiegWzF8,15122
201
+ strawberry/types/base.py,sha256=Bfa-5Wen8qR7m6tlSMRRGlGE-chRGMHjQMopfNdbbrk,15197
202
202
  strawberry/types/cast.py,sha256=fx86MkLW77GIximBAwUk5vZxSGwDqUA6XicXvz8EXwQ,916
203
203
  strawberry/types/enum.py,sha256=IcCz0FLswJtDC_bU8aG1cjreawcqHywAzzVRBZUSAqs,6229
204
204
  strawberry/types/execution.py,sha256=Ylc0lH0nyHyQW509mVqBh2sIN5qpf4cJtt8QhVmWGgI,3749
@@ -227,11 +227,11 @@ strawberry/utils/graphql_lexer.py,sha256=JUVJrJ6Ax0t7m6-DTWFzf4cvXrC02VPmL1NS2zM
227
227
  strawberry/utils/importer.py,sha256=NtTgNaNSW4TnlLo_S34nxXq14RxUAec-QlEZ0LON28M,629
228
228
  strawberry/utils/inspect.py,sha256=-aFT65PkQ9KXo5w8Q2uveBJ8jEpi40sTqRipRQVdYR8,3406
229
229
  strawberry/utils/logging.py,sha256=U1cseHGquN09YFhFmRkiphfASKCyK0HUZREImPgVb0c,746
230
- strawberry/utils/operation.py,sha256=s7ajvLg_q6v2mg47kEMQPjO_J-XluMKTCwo4d47mGvE,1195
230
+ strawberry/utils/operation.py,sha256=CCIREeh3-CzjvjyjhmYPRCVDZUX36jAxF6LbK8r5wEw,1222
231
231
  strawberry/utils/str_converters.py,sha256=-eH1Cl16IO_wrBlsGM-km4IY0IKsjhjnSNGRGOwQjVM,897
232
232
  strawberry/utils/typing.py,sha256=SDvX-Du-9HAV3-XXjqi7Q5f5qPDDFd_gASIITiwBQT4,14073
233
- strawberry_graphql-0.271.0.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
234
- strawberry_graphql-0.271.0.dist-info/METADATA,sha256=IMDTxh0PwC-tCi621n_zT2Y7m5-hkdc4qN6Xp3opVa4,7757
235
- strawberry_graphql-0.271.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
236
- strawberry_graphql-0.271.0.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
237
- strawberry_graphql-0.271.0.dist-info/RECORD,,
233
+ strawberry_graphql-0.271.2.dist-info/LICENSE,sha256=m-XnIVUKqlG_AWnfi9NReh9JfKhYOB-gJfKE45WM1W8,1072
234
+ strawberry_graphql-0.271.2.dist-info/METADATA,sha256=euNsglms3bL5HtvD7KdxfohprfZjy9n1GIt3-lqQCvo,7444
235
+ strawberry_graphql-0.271.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
236
+ strawberry_graphql-0.271.2.dist-info/entry_points.txt,sha256=Nk7-aT3_uEwCgyqtHESV9H6Mc31cK-VAvhnQNTzTb4k,49
237
+ strawberry_graphql-0.271.2.dist-info/RECORD,,