Stabilize ordering of import vs. import ... as#293
Merged
ax3l merged 1 commit intopybind:mainfrom Apr 3, 2026
Merged
Conversation
Due to an alias, pytango's stubs include the following lines: ``` from tango._tango import CmdArgType from tango._tango import CmdArgType as ArgType ``` However, pybind11-stubgen doesn't sort these reliably. I noticed this because of a failure from Debian's reproducible builds system (https://reproduce.debian.net/amd64/api/v1/builds/153381/artifacts/383911/diffoscope) showing that those two lines had been generated in the opposite order. The intent seems to be to sort the output predictably, so let's constrain this a little more tightly.
34c7f83 to
0da4818
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Due to an alias, pytango's stubs include the following lines:
However, pybind11-stubgen doesn't sort these reliably. I noticed this because of a failure from Debian's reproducible builds system (https://reproduce.debian.net/amd64/api/v1/builds/153381/artifacts/383911/diffoscope) showing that those two lines had been generated in the opposite order. The intent seems to be to sort the output predictably, so let's constrain this a little more tightly.