Skip to content

added support for sqlalchemy2 #120

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

Merged
merged 9 commits into from
Feb 6, 2023
Merged

Conversation

the-vty
Copy link
Contributor

@the-vty the-vty commented Feb 1, 2023

Hi Samuel,

I noticed that the debug stopped working on sqlalchemy 2.0. Here is the PR that solves it for me.

Thanks!

@the-vty the-vty closed this Feb 1, 2023
@samuelcolvin
Copy link
Owner

did you mean to close this?

@the-vty
Copy link
Contributor Author

the-vty commented Feb 1, 2023

I closed this because the tests were broken and I have no idea at the moment how to arrange the tests against the different sqlalchemy versions. Sorry for that.

@samuelcolvin
Copy link
Owner

Then best to leave the PR open and we can work together to fix tests.

Looks to me like a warning from usage of declarative_base in a test, we can either ignore that warning, or use whatever sqlalchemy recommends instead of declarative_base.

@samuelcolvin samuelcolvin reopened this Feb 1, 2023
@codecov
Copy link

codecov bot commented Feb 1, 2023

Codecov Report

Merging #120 (234b029) into main (8811bfe) will decrease coverage by 0.75%.
The diff coverage is 75.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #120      +/-   ##
===========================================
- Coverage   100.00%   99.25%   -0.75%     
===========================================
  Files            4        7       +3     
  Lines          279      537     +258     
  Branches        38       75      +37     
===========================================
+ Hits           279      533     +254     
- Misses           0        2       +2     
- Partials         0        2       +2     
Impacted Files Coverage Δ
devtools/prettier.py 98.95% <75.00%> (ø)
devtools/utils.py 96.72% <75.00%> (ø)
devtools/__init__.py 100.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8811bfe...234b029. Read the comment docs.

@the-vty
Copy link
Contributor Author

the-vty commented Feb 1, 2023

I added support for models defined using declarative_base in sqlalchemy 2.0 as well.

Copy link
Owner

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

Otherwise LGTM

Copy link
Owner

@samuelcolvin samuelcolvin left a comment

Choose a reason for hiding this comment

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

I'm happy with the result, but I think there's a more elegant way to do this.

@samuelcolvin samuelcolvin merged commit abed0a5 into samuelcolvin:main Feb 6, 2023
@samuelcolvin
Copy link
Owner

great, thanks so much.

@the-vty
Copy link
Contributor Author

the-vty commented Feb 6, 2023 via email

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.

2 participants