Repository navigation
Fix 500 when filtering the dataset list by data_id - #382
Akshats-git wants to merge 1 commit into
Conversation
bindparams() returns a new clause, but the result was discarded, so the id list was passed to the driver as a plain parameter. PyMySQL 1.2.4 no longer escapes lists, which turns this into a TypeError. Fixes openml#381
|
No actionable comments were generated in the recent review. WalkthroughWhen Change: Bug fix · Severity of issue fixed: Medium Merge Risk:
|
Description
list_datasetsdiscarded the result ofbindparams(), so thedata_idlist went to the driver as a plain parameter. With PyMySQL 1.2.4 that's aTypeErrorand a 500. Assigning the result fixes it, the same waytasks.pydoes it.Fixes: #381
Tested against the test database with PyMySQL 1.2.4 and SQLAlchemy 2.1.9, running all four CI marker groups on
mainand on this branch:test_list_data_id: 4 failed onmain, 4 pass heredata_idfilters, the Python response matches PHP for[61],[61, 130],[1, 2, 3]and[1, 2, 3, 130], with no key,normaluserandnormaluser2One unrelated thing:
test_list_data_identicalfails onmaintoo. It sends"status": null, and current FastAPI rejects that with a 422. I left it out of this PR.Checklist
Always:
Required for code changes:
If applicable:
/docs) (N/A)Extra context: