Skip to content

Python 3.13 compat fixes#116

Open
durin42 wants to merge 3 commits intomautrix:masterfrom
durin42:push-zlwpukokorkx
Open

Python 3.13 compat fixes#116
durin42 wants to merge 3 commits intomautrix:masterfrom
durin42:push-zlwpukokorkx

Conversation

@durin42
Copy link
Copy Markdown
Contributor

@durin42 durin42 commented Apr 1, 2026

Nothing here is terribly exciting. I know the Go bridge is the future but since the docs still point to this one it was worth contributing these fixes upstream.

Checklist

This was new in 3.11 so realistically everyone should have it.
@amstan
Copy link
Copy Markdown

amstan commented Apr 1, 2026

Thank you for this. I might find it useful next time i touch my bridge. I had to fix that enum in a super hacky way myself so it started on python 3.13.

@durin42 durin42 force-pushed the push-zlwpukokorkx branch 2 times, most recently from dec3544 to 8657629 Compare April 1, 2026 03:09
@durin42 durin42 force-pushed the push-zlwpukokorkx branch from 8657629 to 8054c4c Compare April 1, 2026 03:11
At least, that's what I think happened here. This fixes things so it works again.
@durin42 durin42 force-pushed the push-zlwpukokorkx branch from 8054c4c to 8e76c06 Compare April 1, 2026 03:13
@amstan
Copy link
Copy Markdown

amstan commented Apr 1, 2026

Have you not had problems with the protobuf code too?

I had to change maugclib/pblite.py

-if field.label == FieldDescriptor.LABEL_REPEATED:
+if field.is_repeated:
...
-for field_descriptor, field_value in message.ListFields():
+for field_descriptor, field_value in message.ListFields():

@durin42
Copy link
Copy Markdown
Contributor Author

durin42 commented Apr 1, 2026

I didn't have to touch that. 🤷

This PR is all the patches I needed to make things run fine against my Python 3.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants