Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

request for help upgrading the cookiecutter to support sqlalchemy 2.0

72 views
Skip to first unread message

Michael Merickel

unread,
Jan 29, 2024, 1:51:38 AM1/29/24
to pylons-...@googlegroups.com
Hey folks,

I'd really appreciate it if someone was willing to take the time to upgrade the pyramid-cookiecutter-starter to use SQLAlchemy 2.0 best practices. Things like rewriting the queries away from Query to simple select(), and using the more modern declarative mapper that is typing friendly.

https://github.com/Pylons/pyramid-cookiecutter-starter/tree/main

Once we get that upgraded, we'd need to fix up the wiki2 tutorial to reference the updated files accurately - but first step is just getting the cookiecutter updated.


Thanks!

- Michael

Laurent Daverio

unread,
Jan 29, 2024, 5:08:54 AM1/29/24
to pylons-...@googlegroups.com
Hello list,

I think I could do that, unless someone has volunteered already (I have A LOT to do these days, wouldn't want to duplicate someone else's work).

Laurent.


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/54913600-1D9F-47E9-B991-136D0B5A73F3%40gmail.com.
Message has been deleted

Jonathan Vanasco

unread,
Feb 5, 2024, 4:55:19 PM2/5/24
to pylons-discuss
I don't have time to do this, but would be happy to be looped in for code review if there is another PR.

It looks like you've gotten most things done already.

I think the alembic integration may be out of date, as those files haven't been touched for a while.  I can ask Federico on the SqlAlchemy team to take a look at the current setup, he's been the main force behind maintaining and expanding Alembic.  The core devs meet on Wednesdays on gitter. 

Michael Merickel

unread,
Feb 5, 2024, 8:40:23 PM2/5/24
to pylons-...@googlegroups.com
I've chatted a little bit with Laurent Daverio on the side but yeah for the most part:

- I upgraded the cookiecutter-starter to use pyproject.toml and SQLAlchemy 2.0 patterns. That branch is here https://github.com/Pylons/pyramid-cookiecutter-starter/tree/main
- I skimmed alembic changes and didn't see something worth fixing in our setup, but open to feedback.
- I upgraded the wiki2 tutorial in Pyramid to use the new SQLA 2.0 patterns. That PR is here https://github.com/Pylons/pyramid/pull/3747 and I left it open for a bit in case someone wanted to look.

I would love if someone synced the pyproject.toml and SQLA changes into the quick tutorial and the zodb tutorial (should be a lot easier than the wiki2 tutorial I did above).

Other than that - I'm trying to evaluate the feasibility of making pkg_resources optional in Pyramid before cutting a new release. My ramblings about that topic are here if you want to track it for any reason. https://github.com/Pylons/pyramid/issues/3731

Thanks!



--

Michael
Reply all
Reply to author
Forward
0 new messages