Skip to content

Commit

Permalink
Upgrade pydantic
Browse files Browse the repository at this point in the history
Resolves issue found when using improved type annotations.

Looks like this may be the cause: pydantic/pydantic#2060

$ ./update_prevalence.py
Traceback (most recent call last):
  File "/Users/broz/src/microCOVID/./update_prevalence.py", line 367, in <module>
    class Place(pydantic.BaseModel):
  File "/Users/broz/src/microCOVID/.venv/lib/python3.10/site-packages/pydantic/main.py", line 299, in __new__
    fields[ann_name] = ModelField.infer(
  File "/Users/broz/src/microCOVID/.venv/lib/python3.10/site-packages/pydantic/fields.py", line 411, in infer
    return cls(
  File "/Users/broz/src/microCOVID/.venv/lib/python3.10/site-packages/pydantic/fields.py", line 342, in __init__
    self.prepare()
  File "/Users/broz/src/microCOVID/.venv/lib/python3.10/site-packages/pydantic/fields.py", line 451, in prepare
    self._type_analysis()
  File "/Users/broz/src/microCOVID/.venv/lib/python3.10/site-packages/pydantic/fields.py", line 604, in _type_analysis
    self.type_ = get_args(self.type_)[1]
IndexError: tuple index out of range
$
  • Loading branch information
apiology committed May 22, 2022
1 parent f5bc857 commit e09de83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion requirements-manual.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pydantic==1.8.2
pydantic==1.9.1
requests==2.25.1
types_requests==2.27.25
black==21.8b0
Expand Down

0 comments on commit e09de83

Please sign in to comment.