This was originally five patches, but they are all needed to pass
any of the test jobs now, so they have been squashed into one:
Co-Authored-By: Dan Smith (dms@danplanet.com)
First:
The autoload argument was removed[1] in SQLAlchemy and only
the autoload_with argument should be passed.
The autoload argument is set according to the autoload_with argument
automatically even in SQLAlchemy 1.x[2] so is not at all needed.
[1] c932123bac
[2] ad8f921e96
Second:
Remove _warn_on_bytestring for newer SA, AFAICT, this flag has been
removed from SQLAlchemy and that is why watcher-db-manage fails to
initialize the DB for me on jammy. This migration was passing the
default value (=False) anyway, so I assume this is the right "fix".
Third:
Fix joinedload passing string attribute names
Fourth:
Fix engine.select pattern to use begin() per the migration guide.
Fifth:
Override the apscheduler get_next_run_time() which appears to be
trivially not compatible with SQLAlchemy 2.0 because of a return type
from scalar().
Change-Id: I000e5e78f97f82ed4ea64d42f1c38354c3252e08