Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.13"
jobs:
pre_build:
- curl https://radia.run | bash -s readthedocs
Expand Down
4 changes: 2 additions & 2 deletions pykern/sql_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,8 @@ def select_one_or_none(self, table_or_stmt, where=None):
def __conn(self):
if self._conn is None:
self._conn = self.meta._engine.connect()
self._conn.execute("PRAGMA foreign_keys = ON;")
self._txn = self._conn.begin()
self._conn.execute(sqlalchemy.text("PRAGMA foreign_keys = ON;"))
return self._conn

def __execute_table_or_stmt(self, method, table_or_stmt, where):
Expand Down Expand Up @@ -374,7 +374,7 @@ def fixup_post_insert(self, db, values, inserted_primary_key):
"""
# we do not handle multi column inserted_primary_keys
if self.has_primary_id and inserted_primary_key is not None:
values[self.primary_id] = inserted_primary_key[self.primary_id]
values[self.primary_id] = inserted_primary_key._mapping[self.primary_id]
return values

def fixup_pre_insert(self, session, values):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ dependencies = [
"setuptools>=66",
"six>=1.9",
"Sphinx>=1.3.5",
"SQLAlchemy>=1.4,<2",
"SQLAlchemy",
"toml>=0.10",
"tornado",
"urllib3",
Expand Down