Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Modules fail due to pydantic 'deprecated' issues #492

Open
dgraeber opened this issue Feb 5, 2024 · 2 comments
Open

[BUG] Modules fail due to pydantic 'deprecated' issues #492

dgraeber opened this issue Feb 5, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@dgraeber
Copy link
Contributor

dgraeber commented Feb 5, 2024

When updating to SeedFarmer~=3.1.0, my modules that were deploying correctly now fail with the following:

ImportError: cannot import name 'deprecated' from 'typing_extensions' (/root/.venv/lib/python3.10/site-packages/typing_extensions.py)

the version of typing-extensions is 4.5.0 (sometimes less than that depending on the module)

How can we correct this?

@dgraeber dgraeber added the bug Something isn't working label Feb 5, 2024
@dgraeber
Copy link
Contributor Author

dgraeber commented Feb 5, 2024

This is due to a change to seedfarmer when updating to v2 of pydantic. There is a dependency of pydantic v2 on the typing-extensions library, which has modified it's package structure. In order to get your module working again, in the module itself, update the requirements.txt file :
RECOMMENDED
typing-extensions~=4.6.3

You can also directly install this library in your deployspec.yaml with pip:

2nd Choice

deploy:
  phases:
    install:
      commands:
      - npm install -g [email protected]
      - pip install -r requirements.txt
      - pip install --upgrade typing-extensions==4.6.3

@dgraeber
Copy link
Contributor Author

dgraeber commented Feb 5, 2024

We will add to our docs that this is the minimum version going forward

@dgraeber dgraeber changed the title [BUG] Modules fail due to pydantic 'depricated' issues [BUG] Modules fail due to pydantic 'deprecated' issues Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant