mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-19 04:32:34 +02:00
https://github.com/fastapi/sqlmodel/releases/tag/0.0.38 https://github.com/fastapi/sqlmodel/releases Resolves test error with pydantic >=2.12. ``` tests/test_enums.py:8: in <module> from . import test_enums_models <frozen importlib._bootstrap>:1371: in _find_and_load ??? <frozen importlib._bootstrap>:1342: in _find_and_load_unlocked ??? <frozen importlib._bootstrap>:938: in _load_unlocked ??? /usr/lib/python3.14/site-packages/_pytest/assertion/rewrite.py:197: in exec_module exec(co, module.__dict__) tests/test_enums_models.py:17: in <module> class BaseModel(SQLModel): sqlmodel/main.py:536: in __new__ new_cls = super().__new__(cls, name, bases, dict_used, **config_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ /usr/lib/python3.14/site-packages/pydantic/_internal/_model_construction.py:132: in __new__ private_attributes = inspect_namespace( /usr/lib/python3.14/site-packages/pydantic/_internal/_model_construction.py:477: in inspect_namespace raise PydanticUserError( E pydantic.errors.PydanticUserError: Field 'id' requires a type annotation E E For further information visit https://errors.pydantic.dev/2.12/u/model-field-missing-annotation ``` Ref: https://gitlab.alpinelinux.org/alpine/aports/-/issues/18025
59 lines
1.4 KiB
Plaintext
59 lines
1.4 KiB
Plaintext
# Contributor: Noel Kuntze <noel.kuntze@thermi.consulting>
|
|
# Maintainer: Noel Kuntze <noel.kuntze@thermi.consulting>
|
|
pkgname=py3-sqlmodel
|
|
pkgver=0.0.38
|
|
pkgrel=0
|
|
pkgdesc="SQL databases in Python, designed for simplicity, compatibility, and robustness"
|
|
url="https://sqlmodel.tiangolo.com"
|
|
arch="noarch"
|
|
license="MIT"
|
|
depends="
|
|
py3-pydantic
|
|
py3-sqlalchemy
|
|
py3-typing-extensions
|
|
pre-commit
|
|
"
|
|
makedepends="
|
|
py3-gpep517
|
|
py3-wheel
|
|
py3-pdm-backend
|
|
"
|
|
checkdepends="
|
|
py3-coverage
|
|
py3-dirty-equals
|
|
py3-fastapi
|
|
py3-httpx
|
|
py3-pytest
|
|
"
|
|
subpackages="$pkgname-pyc"
|
|
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/fastapi/sqlmodel/archive/refs/tags/$pkgver.tar.gz"
|
|
|
|
builddir="$srcdir/sqlmodel-$pkgver"
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
|
|
python3 -m installer -d test_dir dist/*.whl
|
|
export PYTHONPATH="$PWD/test_dir/$_site_packages:$PYTHONPATH"
|
|
|
|
# Remove failing tests relying on old python versions
|
|
rm -rf tests/test_select_gen.py \
|
|
tests/test_tutorial/test_create_db_and_table/test_tutorial001*.py
|
|
|
|
pytest -vv tests/
|
|
}
|
|
|
|
package() {
|
|
python -m installer -d "$pkgdir" dist/*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
c838864a13dfa937d441e2ae7a2700e5bc6fafa1721fe0cc9df9050e6cffe52da47bcd9511530474d6be3909e517886e4e1922b3c24ebdbeaaeadb8ab23a9858 py3-sqlmodel-0.0.38.tar.gz
|
|
"
|