Skip to content

Migrate to PEP 621 and format codebase with ruff - #367

Merged
josecsotomorales merged 4 commits into
sqlalchemy-continuum:masterfrom
josecsotomorales:migrate-to-ruff
Aug 21, 2025
Merged

josecsotomorales merged 4 commits into
sqlalchemy-continuum:masterfrom
josecsotomorales:migrate-to-ruff

Conversation

@josecsotomorales

Copy link
Copy Markdown
Collaborator

No description provided.

@josecsotomorales
josecsotomorales merged commit be8026f into sqlalchemy-continuum:master Aug 21, 2025
@marksteward

Copy link
Copy Markdown
Collaborator

Thanks for all this, I'd read through it all earlier this week, so sorry for not updating your PR.

I've updated CHANGES.rst because I had a bunch of uncommitted stuff and I think your copilot got the ordering wrong.

I think dropping 3.8 support means we need to do a version bump, should we go for 1.5, or sync to 2.0 with sqla?

@josecsotomorales

Copy link
Copy Markdown
Collaborator Author

Thank you, @marksteward! The changes I've added to CHANGES.rst were just a guess based on commit history to try to populate older versions, glad you corrected them

@josecsotomorales

Copy link
Copy Markdown
Collaborator Author

@marksteward I'm going to work on cleaning up some warnings, fix the docs, and will take a look at this PR to remove the direct dependency of sqlalchemy-utils, then we can release 2.0. What do you think about this for next steps?

@marksteward

marksteward commented Aug 22, 2025 •

Copy link
Copy Markdown
Collaborator

I just ran ruff locally and it's pulled out a change that isn't mechanical:

@@ -321,8 +324,11 @@ class VersioningManager(object):
                 uow = self.units_of_work[conn.engine]
             except KeyError:
                 for connection in self.units_of_work.keys():
-                    if not connection.closed and connection.connection is conn.connection:
-                        uow = self.unit_of_work(session)
+                    if (
+                        not connection.closed
+                        and connection.connection is conn.connection
+                    ):
+                        uow = self.units_of_work[connection]
                         break  # The ConnectionFairy is the same, this connection is a clone

I think that's a bug from when I pulled out _uow_from_conn (214cd5a), but it needs a different fix.

@marksteward

Copy link
Copy Markdown
Collaborator

OK, fixed in 4d46c2d - this is why it's useful to double-check that running tools multiple times gives the same result!

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