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

SQLAlchemy 1.4 support #51

Merged
merged 1 commit into from
Jul 23, 2021
Merged

Conversation

dwreeves
Copy link
Contributor

@dwreeves dwreeves commented Jul 7, 2021

Fixes issue #50.

@dgipps
Copy link

dgipps commented Jul 20, 2021

Anything I can do to help get this merged? This is currently blocking us from upgrading to SQLAlchemy 1.4.

@dwreeves
Copy link
Contributor Author

@dgipps Aside from tagging @jeancochrane and praying, I'm not sure what else to do. 😬

@jeancochrane
Copy link
Owner

Thanks for this @dwreeves @dgipps ! I appreciate the mention, my repo notifications are kind of a mess right now. This seems reasonable to me but it looks like something is up with our pytest configuration. If you want to try to figure it out you're welcome to, otherwise I'll try to dig in later this week.

@dwreeves dwreeves force-pushed the master branch 2 times, most recently from 08af303 to 7b2041c Compare July 22, 2021 01:10
@dwreeves
Copy link
Contributor Author

dwreeves commented Jul 22, 2021

OK my previous commit was extremely lazy. I dug into it a bit more and found out that there is a lot of reliance on deprecated things:

contextual_connect is totally removed in 1.4, so I deleted it. The _engine fixture mocking connect is sufficient.

The tests failing to even start is due to this:

Backward Incompatibilities

  • Removed init_postgresql_database and drop_postgresql_database functions. They were long deprecated and their role perfectly covered by DatabaseJanitor class.

So swapping to that works.


Here is my run of this workflow, everything passes.

Can you approve this workflow? https://github.com/jeancochrane/pytest-flask-sqlalchemy/actions/runs/1054560707

Thanks @jeancochrane!

(Edit: Accidentally deleted 1.4.x from main.yml. Added it back in. URL for my workflow references most recent version.)

@jeancochrane
Copy link
Owner

Thanks for digging in here @dwreeves, this looks great to me 🙏🏻 @dgipps Can you use changes from the main branch for now? I'd like to do a little more testing before cutting a release, but I'm going to aim for next week.

@jeancochrane jeancochrane merged commit ea5c5ee into jeancochrane:master Jul 23, 2021
@dwreeves
Copy link
Contributor Author

dwreeves commented Jul 23, 2021

Thanks for the review, and thank you for creating and maintaining this project @jeancochrane. This package has been extremely useful for me; glad to contribute to it.

@bbtdev
Copy link

bbtdev commented Aug 4, 2021

can we update the documentation as well?
NameError: name 'init_postgresql_database' is not defined

@jeancochrane
Copy link
Owner

Thanks for the flag @bbtdev, will update this weekend 👍🏻

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.

None yet

4 participants