request for help upgrading the cookiecutter to support sqlalchemy 2.0

Skip to first unread message

Michael Merickel

Jan 29, 2024, 1:51:38 AMJan 29
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.

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.


- Michael

Laurent Daverio

Jan 29, 2024, 5:08:54 AMJan 29
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).


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
To view this discussion on the web visit
Message has been deleted

Jonathan Vanasco

Feb 5, 2024, 4:55:19 PMFeb 5
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

Feb 5, 2024, 8:40:23 PMFeb 5
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
- 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 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.



Reply all
Reply to author
0 new messages