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

Upgrade pydantic, FastAPI and uvicorn #274

Closed
majsan opened this issue May 17, 2024 · 7 comments
Closed

Upgrade pydantic, FastAPI and uvicorn #274

majsan opened this issue May 17, 2024 · 7 comments

Comments

@majsan
Copy link
Member

majsan commented May 17, 2024

Latest versions did not work out of the box.

Latest uvicorn worked locally, but not on server, which might be due to the server using --root-path.

@nick8325
Copy link
Contributor

Pydantic has quite a lot of breaking changes which might be why it didn't work, see https://docs.pydantic.dev/latest/migration/. For example some methods changed name and the way to configure the model config changed.

@nick8325
Copy link
Contributor

nick8325 commented May 20, 2024

I've upgraded FastAPI and pydantic now

@majsan
Copy link
Member Author

majsan commented May 23, 2024

@nick8325 Generating the documentation does not work now due to errors in unique_id.py:

  File "/home/maria/språkbanken/karp/karp-backend/karp/foundation/value_objects/unique_id.py", line 13, in __get_pydantic_json_schema__
    json_schema = handler(core_schema.str_schema())
                          ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'str_schema

I am trying to fix it, but maybe you have a better idea what's wrong.

@nick8325
Copy link
Contributor

Think I just wrote something stupid :) I can try and fix it.

@nick8325
Copy link
Contributor

Done! I think it was a search and replace that went wrong.

@nick8325 nick8325 reopened this May 23, 2024
@nick8325
Copy link
Contributor

(re-opening because there is still uvicorn to be done, right?)

@majsan
Copy link
Member Author

majsan commented May 24, 2024

I opened a new one #276, so we can close this.

@majsan majsan closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants