whythawk / full-stack-fastapi-postgresql

Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Nuxt3, Docker, automatic HTTPS and more.
MIT License
231 stars 47 forks source link

Upgrade path to Pydantic 2.0 #35

Closed turukawa closed 11 months ago

turukawa commented 1 year ago

Major path updates include:

Review required on the new hatch pyproject.toml file, and to ensure that the environments are stable. @br3ndonland, I'd appreciate your review.

turukawa commented 1 year ago

Getting this error on backend when calling the api:

2023-07-25 10:26:06 Traceback (most recent call last):
2023-07-25 10:26:06   File "<frozen runpy>", line 198, in _run_module_as_main
2023-07-25 10:26:06   File "<frozen runpy>", line 88, in _run_code
2023-07-25 10:26:06   File "/app/inboard/start.py", line 135, in <module>
2023-07-25 10:26:06     start_server(
2023-07-25 10:26:06   File "/app/inboard/start.py", line 123, in start_server
2023-07-25 10:26:06     uvicorn.run(**uvicorn_options)  # type: ignore[arg-type]
2023-07-25 10:26:06     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-07-25 10:26:06   File "/app/.venv/lib/python3.11/site-packages/uvicorn/main.py", line 573, in run
2023-07-25 10:26:06     ChangeReload(config, target=server.run, sockets=[sock]).run()
2023-07-25 10:26:06   File "/app/.venv/lib/python3.11/site-packages/uvicorn/supervisors/basereload.py", line 50, in run
2023-07-25 10:26:06     for changes in self:
2023-07-25 10:26:06   File "/app/.venv/lib/python3.11/site-packages/uvicorn/supervisors/basereload.py", line 69, in __next__
2023-07-25 10:26:06     return self.should_restart()
2023-07-25 10:26:06            ^^^^^^^^^^^^^^^^^^^^^
2023-07-25 10:26:06   File "/app/.venv/lib/python3.11/site-packages/uvicorn/supervisors/statreload.py", line 32, in should_restart
2023-07-25 10:26:06     for file in self.iter_py_files():
2023-07-25 10:26:06   File "/app/.venv/lib/python3.11/site-packages/uvicorn/supervisors/statreload.py", line 52, in iter_py_files
2023-07-25 10:26:06     for path in list(reload_dir.rglob("*.py")):
2023-07-25 10:26:06                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2023-07-25 10:26:06   File "/usr/local/lib/python3.11/pathlib.py", line 968, in rglob
2023-07-25 10:26:06     for p in selector.select_from(self):
2023-07-25 10:26:06   File "/usr/local/lib/python3.11/pathlib.py", line 408, in _select_from
2023-07-25 10:26:06     for p in successor_select(starting_point, is_dir, exists, scandir):
2023-07-25 10:26:06   File "/usr/local/lib/python3.11/pathlib.py", line 356, in _select_from
2023-07-25 10:26:06     entries = list(scandir_it)
2023-07-25 10:26:06               ^^^^^^^^^^^^^^^^
2023-07-25 10:26:06 OSError: [Errno 12] Cannot allocate memory: '/app/app'
turukawa commented 1 year ago

The fix to frontend is related to a Vite error: https://github.com/scj2000/scj2000-web-v2/commit/b923143c106e352954771e19053d8eaddb414dbe