Skip to content

Commit

Permalink
Update pydantic recipe
Browse files Browse the repository at this point in the history
There is [incompatibility](huggingface/transformers#8638) between python > 3.6 and package `dataclasses`.

This error was happening after my compilations: `AttributeError: module 'typing' has no attribute '_ClassVar'`

The fix is removing `dataclasses` from `python_depends`.

I also updated the pydantic version to the newest release `1.10.4`, it can be checked [here](https://github.com/pydantic/pydantic/releases) and its url.

I already compiled my app after applying these changes, and the compilation is working successfully again.
  • Loading branch information
FilipeMarch authored Feb 1, 2023
1 parent e393a9e commit 391af5e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pythonforandroid/recipes/pydantic/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@


class PydanticRecipe(PythonRecipe):
version = '1.8.2'
url = 'https://github.com/samuelcolvin/pydantic/archive/refs/tags/v{version}.zip'
version = '1.10.4'
url = 'https://github.com/pydantic/pydantic/archive/refs/tags/v{version}.zip'
depends = ['setuptools']
python_depends = ['Cython', 'devtools', 'email-validator', 'dataclasses', 'typing-extensions', 'python-dotenv']
python_depends = ['Cython', 'devtools', 'email-validator', 'typing-extensions', 'python-dotenv']
call_hostpython_via_targetpython = False


Expand Down

0 comments on commit 391af5e

Please sign in to comment.