Skip to content

Conversation

V02460
Copy link
Contributor

@V02460 V02460 commented Oct 17, 2025

Update Pydantic to v2.

Steps I took to create this change:

  1. Remove import indirection
  2. Run the Pydantic migration tool
  3. Fix remaining issues
  4. Enable strict mode and remove check_pydantic_models.py

Notable changes are

  1. differing return type for threepid requests with an invalid email
  2. changed logic for _metadata_url and _introspection_endpoint
  3. changed definition of AnyEventId
  4. Disabled strict mode for tuple and set types

Closes #15858
Closes #15979

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct (run the linters)

@V02460 V02460 requested a review from a team as a code owner October 17, 2025 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update pydantic to >= 2 Synapse does not take advantage of Pydantic 2.0

1 participant