Skip to content

Commit

Permalink
Merge pull request #73 from scrapy/test-pydatic-less-than-2
Browse files Browse the repository at this point in the history
Test with pydantic<2, update readme
  • Loading branch information
wRAR authored Jul 5, 2023
2 parents bff7a0c + 5265b76 commit ca28ce6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Currently supported types are:
* [`dict`](https://docs.python.org/3/library/stdtypes.html#dict)
* [`dataclass`](https://docs.python.org/3/library/dataclasses.html)-based classes
* [`attrs`](https://www.attrs.org)-based classes
* [`pydantic`](https://pydantic-docs.helpmanual.io/)-based classes
* [`pydantic`](https://pydantic-docs.helpmanual.io/)-based classes (`pydantic>=2` not yet supported)

Additionally, interaction with arbitrary types is supported, by implementing
a pre-defined interface (see [extending `itemadapter`](#extending-itemadapter)).
Expand All @@ -27,7 +27,8 @@ a pre-defined interface (see [extending `itemadapter`](#extending-itemadapter)).
* Python 3.7+
* [`scrapy`](https://scrapy.org/): optional, needed to interact with `scrapy` items
* [`attrs`](https://pypi.org/project/attrs/): optional, needed to interact with `attrs`-based items
* [`pydantic`](https://pypi.org/project/pydantic/): optional, needed to interact with `pydantic`-based items
* [`pydantic`](https://pypi.org/project/pydantic/): optional, needed to interact with
`pydantic`-based items (`pydantic>=2` not yet supported)

---

Expand Down
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
attrs
pydantic
pydantic<2
pytest-cov>=2.8
pytest>=5.4
scrapy>=2.0
2 changes: 1 addition & 1 deletion tests/test_adapter_pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
)


class DataclassTestCase(unittest.TestCase):
class PydanticTestCase(unittest.TestCase):
def test_false(self):
from itemadapter.adapter import PydanticAdapter

Expand Down

0 comments on commit ca28ce6

Please sign in to comment.