Repository: pydantic/pydantic

Issue:
Cannot generate a JSON schema for a models with `Deque` field
### Checks

* [x] I added a descriptive title to this issue
* [x] I have searched (google, github) for similar issues and couldn't find anything
* [x] I have read and followed [the docs](https://pydantic-docs.helpmanual.io/) and still think this is a bug

<!-- Sorry to sound so draconian, but every second saved replying to issues is time spend improving pydantic :-) -->

# Bug

Output of `python -c "import pydantic.utils; print(pydantic.utils.version_info())"`:
```
             pydantic version: 1.8.2
            pydantic compiled: False
                 install path: /home/sergej/Projects/pydantic/pydantic
               python version: 3.8.5 (default, Jan 27 2021, 15:41:15)  [GCC 9.3.0]
                     platform: Linux-5.4.0-72-generic-x86_64-with-glibc2.29
     optional deps. installed: ['devtools', 'dotenv', 'email-validator', 'typing-extensions']
```
<!-- or if you're using pydantic prior to v1.3, manually include: OS, python version and pydantic version -->

<!-- Please read the [docs](https://pydantic-docs.helpmanual.io/) and search through issues to
confirm your bug hasn't already been reported. -->

<!-- Where possible please include a self-contained code snippet describing your bug: -->

### Description

The `AssertionError` occurs on JSON schema generation if `Deque` field used in the Pydantic model.

### Example

```python
from typing import Deque

from pydantic import BaseModel


class Model(BaseModel):
    a: Deque[str]


Model.schema()
```

### Output

```python
Traceback (most recent call last):
  File "/home/sergej/Projects/pydantic/test_deque.py", line 10, in <module>
    Model.schema()
  File "/home/sergej/Projects/pydantic/pydantic/main.py", line 720, in schema
    s = model_schema(cls, by_alias=by_alias, ref_template=ref_template)
  File "/home/sergej/Projects/pydantic/pydantic/schema.py", line 168, in model_schema
    m_schema, m_definitions, nested_models = model_process_schema(
  File "/home/sergej/Projects/pydantic/pydantic/schema.py", line 557, in model_process_schema
    m_schema, m_definitions, nested_models = model_type_schema(
  File "/home/sergej/Projects/pydantic/pydantic/schema.py", line 598, in model_type_schema
    f_schema, f_definitions, f_nested_models = field_schema(
  File "/home/sergej/Projects/pydantic/pydantic/schema.py", line 242, in field_schema
    f_schema, f_definitions, f_nested_models = field_type_schema(
  File "/home/sergej/Projects/pydantic/pydantic/schema.py", line 503, in field_type_schema
    assert field.shape in {SHAPE_SINGLETON, SHAPE_GENERIC}, field.shape
AssertionError: 11
```


Discussion:

Resolving patch:
diff --git a/pydantic/schema.py b/pydantic/schema.py
--- a/pydantic/schema.py
+++ b/pydantic/schema.py
@@ -31,6 +31,7 @@
 
 from .fields import (
     MAPPING_LIKE_SHAPES,
+    SHAPE_DEQUE,
     SHAPE_FROZENSET,
     SHAPE_GENERIC,
     SHAPE_ITERABLE,
@@ -437,7 +438,15 @@ def field_type_schema(
     definitions = {}
     nested_models: Set[str] = set()
     f_schema: Dict[str, Any]
-    if field.shape in {SHAPE_LIST, SHAPE_TUPLE_ELLIPSIS, SHAPE_SEQUENCE, SHAPE_SET, SHAPE_FROZENSET, SHAPE_ITERABLE}:
+    if field.shape in {
+        SHAPE_LIST,
+        SHAPE_TUPLE_ELLIPSIS,
+        SHAPE_SEQUENCE,
+        SHAPE_SET,
+        SHAPE_FROZENSET,
+        SHAPE_ITERABLE,
+        SHAPE_DEQUE,
+    }:
         items_schema, f_definitions, f_nested_models = field_singleton_schema(
             field,
             by_alias=by_alias,


Test patch:
diff --git a/tests/test_schema.py b/tests/test_schema.py
--- a/tests/test_schema.py
+++ b/tests/test_schema.py
@@ -10,6 +10,7 @@
 from typing import (
     Any,
     Callable,
+    Deque,
     Dict,
     FrozenSet,
     Generic,
@@ -556,6 +557,18 @@ class Model(BaseModel):
     assert Model.schema() == base_schema
 
 
+def test_deque():
+    class Model(BaseModel):
+        a: Deque[str]
+
+    assert Model.schema() == {
+        'title': 'Model',
+        'type': 'object',
+        'properties': {'a': {'title': 'A', 'type': 'array', 'items': {'type': 'string'}}},
+        'required': ['a'],
+    }
+
+
 def test_bool():
     class Model(BaseModel):
         a: bool