alembic / sphinx puzzler

James Addison james at
Tue Feb 14 18:08:51 UTC 2023

Hi folks,

I noticed what _seemed_ like a quick reproducible-build fix for alembic (a
database migration framework written in Python).  A few hours later though,
I'm still puzzled.

The problem appears in a similar pattern across various architectures in
the diffoscope results for alembic -- both amd64[1] and arm64[2], for
example.  It looks like the variations are in sphinx-generated
documentation where the ordering of collection elements -- like the items
in this attribute definition[3] -- differs in the output.

My understanding is that sphinx is using Python 3.11's built-in AST parser,
which doesn't provide parse-tree traversal order guarantees, during these
builds - and that'd seem to make sense as a cause.

Also: this might be the same issue as described in

Does anyone have suggestions about how to proceed?  I'll likely take more
of a look again tomorrow.


(note: posting from my work email, because some of my work infrastructure
uses alembic, and so I think there's a clear, if small, work-related
motivation for this)

[1] -

[2] -

[3] -

[4] -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rb-general mailing list