Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to sqlalchemy version 2 #222

Merged
merged 7 commits into from
Oct 8, 2024
Merged

Migration to sqlalchemy version 2 #222

merged 7 commits into from
Oct 8, 2024

Conversation

stephen-riggs
Copy link
Collaborator

This implements the minimum changes to update sqlalchemy to version 2.
I've currently set the requirement as sqlalchemy>=2, but it's possible this would still work in version 1.4

The breaking changes from earlier versions are:

  • declarative_base has moved
  • Table loads need to be attributes not strings

A more complete migration of the API query functions should be done in future, but the legacy methods still currently work.

Copy link

codecov bot commented Oct 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.99%. Comparing base (6e83211) to head (9e1a582).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #222      +/-   ##
==========================================
- Coverage   91.99%   91.99%   -0.01%     
==========================================
  Files          26       26              
  Lines        3736     3735       -1     
  Branches      252      252              
==========================================
- Hits         3437     3436       -1     
  Misses        206      206              
  Partials       93       93              

pyproject.toml Outdated Show resolved Hide resolved
requirements_orm.txt Outdated Show resolved Hide resolved
Copy link
Member

@KarlLevik KarlLevik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ndevenish ndevenish merged commit 79c4e13 into main Oct 8, 2024
32 checks passed
@ndevenish ndevenish deleted the sqlalchemy2 branch October 8, 2024 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants