Skip to content

fix: Restore compatibility with newer Python and transformers versions#204

Merged
Eta0 merged 5 commits intomainfrom
eta/compat
Apr 21, 2026
Merged

fix: Restore compatibility with newer Python and transformers versions#204
Eta0 merged 5 commits intomainfrom
eta/compat

Conversation

@Eta0
Copy link
Copy Markdown
Collaborator

@Eta0 Eta0 commented Apr 21, 2026

Compatibility with Python 3.14 & 3.15, and transformers v5

This set of changes provides compatibility with newer Python versions, and improves the test suite's compatibility with transformers v5.

This includes a code version bump to v2.12.1. The changelog is updated accordingly.

Eta0 and others added 5 commits April 20, 2026 23:15
Version 5.0.0 of transformers changed some of the buffers registered on
a model when it is loaded, leading to mismatches when comparing
newly-serialized models' keys against older ones. This change permits
the extra tensors from <5.0.0 as an acceptable deviation when comparing
keys between the deserialized model and reference model, without failing
the test suite.
Python 3.14 switched to evaluating annotations lazily, so accessing
the __annotations__ attribute directly from a metaclass doesn't work
anymore.

Co-authored-by: Neil Schemenauer <nas@arctrix.com>
Python 3.15 is removing the ability to construct NamedTuple classes
using keyword arguments to specify fields and their types, so this
switches to using the still-supported list-of-tuples functional syntax
for it instead.
@Eta0 Eta0 requested a review from shajrawi April 21, 2026 05:05
@Eta0 Eta0 self-assigned this Apr 21, 2026
@Eta0 Eta0 added the bug Something isn't working label Apr 21, 2026
@Eta0 Eta0 merged commit 652d3c0 into main Apr 21, 2026
2 checks passed
@Eta0 Eta0 deleted the eta/compat branch April 21, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants