python-sqlalchemy: bump to 2.0.49
authorAlexandru Ardelean <redacted>
Sat, 4 Apr 2026 18:22:25 +0000 (21:22 +0300)
committerAlexandru Ardelean <redacted>
Sun, 5 Apr 2026 16:56:43 +0000 (19:56 +0300)
Changelog: https://docs.sqlalchemy.org/en/20/changelog/changelog_20.html

Patch release (resets PKG_RELEASE to 1).
Add test.sh to verify ORM and core SQL functionality.

Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-sqlalchemy/Makefile
lang/python/python-sqlalchemy/test.sh [new file with mode: 0755]

index 15a73a3dd8dc8ae29e0e7ef9b6dc43ee1fa5e6b6..e2d08e1d568dbc209acb57d1b2060ec2109e0da3 100644 (file)
@@ -8,11 +8,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-sqlalchemy
-PKG_VERSION:=2.0.44
-PKG_RELEASE:=2
+PKG_VERSION:=2.0.49
+PKG_RELEASE:=1
 
 PYPI_NAME:=sqlalchemy
-PKG_HASH:=0ae7454e1ab1d780aee69fd2aae7d6b8670a581d8847f2d1e0f7ddfbf47e5a22
+PKG_HASH:=d15950a57a210e36dd4cec1aac22787e2a4d57ba9318233e2ef8b2daf9ff2d5f
 
 PKG_MAINTAINER:=Josef Schlehofer <pepe.schlehofer@gmail.com>
 PKG_LICENSE:=MIT
diff --git a/lang/python/python-sqlalchemy/test.sh b/lang/python/python-sqlalchemy/test.sh
new file mode 100755 (executable)
index 0000000..4e102c3
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+[ "$1" = python3-sqlalchemy ] || exit 0
+python3 - << 'EOF'
+import sqlalchemy
+assert sqlalchemy.__version__, "sqlalchemy version is empty"
+
+from sqlalchemy import create_engine, Column, Integer, String, text
+from sqlalchemy.orm import DeclarativeBase, Session
+
+engine = create_engine("sqlite:///:memory:")
+
+class Base(DeclarativeBase):
+    pass
+
+class User(Base):
+    __tablename__ = "users"
+    id = Column(Integer, primary_key=True)
+    name = Column(String)
+
+Base.metadata.create_all(engine)
+
+with Session(engine) as session:
+    session.add(User(name="Alice"))
+    session.add(User(name="Bob"))
+    session.commit()
+    users = session.query(User).order_by(User.name).all()
+    assert len(users) == 2
+    assert users[0].name == "Alice"
+    assert users[1].name == "Bob"
+
+with engine.connect() as conn:
+    result = conn.execute(text("SELECT count(*) FROM users"))
+    count = result.scalar()
+    assert count == 2, f"Expected 2, got {count}"
+EOF
git clone https://git.99rst.org/PROJECT