[3.13] gh-124442: make `__static_attributes__` deterministic by sorting (GH-124492) (#124738)

* [3.13] gh-124442: make `__static_attributes__` deterministic by sorting (GH-124492)
(cherry picked from commit 04c837d9d8a474777ef9c1412fbba14f0682366c)

Co-authored-by: Kira <kp2pml30@gmail.com>
Signed-off-by: kp2pml30 <kp2pml30@gmail.com>
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
3 files changed