forked-synapse/synapse/rest/client
Éloi Rivard ebad618bf0
import pydantic objects from the _pydantic_compat module (#17667)
This PR changes `from pydantic import BaseModel` to `from
synapse._pydantic_compat import BaseModel` (as well as `constr`,
`conbytes`, `conint`, `confloat`).

It allows `check_pydantic_models.py` to mock those pydantic objects only
in the synapse module, and not interfere with pydantic objects in
external dependencies.

This should solve the CI problems for #17144, which breaks because
`check_pydantic_models.py` patches pydantic models from
[scim2-models](https://scim2-models.readthedocs.io/).

/cc @DMRobertson @gotmax23
fixes #17659 


### Pull Request Checklist

<!-- Please read
https://element-hq.github.io/synapse/latest/development/contributing_guide.html
before submitting your pull request -->

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
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.
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))
2024-09-11 21:01:43 +00:00
..
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_base.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
account_data.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
account_validity.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
account.py import pydantic objects from the _pydantic_compat module (#17667) 2024-09-11 21:01:43 +00:00
appservice_ping.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
auth_issuer.py MSC3861: load the issuer and account management URLs from OIDC discovery (#17407) 2024-08-30 14:04:08 +00:00
auth.py MSC3861: load the issuer and account management URLs from OIDC discovery (#17407) 2024-08-30 14:04:08 +00:00
capabilities.py Update license headers 2023-11-21 15:29:58 -05:00
devices.py import pydantic objects from the _pydantic_compat module (#17667) 2024-09-11 21:01:43 +00:00
directory.py import pydantic objects from the _pydantic_compat module (#17667) 2024-09-11 21:01:43 +00:00
events.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
filter.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
initial_sync.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
keys.py MSC3861: load the issuer and account management URLs from OIDC discovery (#17407) 2024-08-30 14:04:08 +00:00
knock.py Stabilise MSC4156: server_name -> via (#17650) 2024-09-05 17:07:39 +01:00
login_token_request.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
login.py MSC3861: load the issuer and account management URLs from OIDC discovery (#17407) 2024-08-30 14:04:08 +00:00
logout.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
media.py Enable guest access on new media endpoints, per MSC4189 (#17675) 2024-09-10 18:29:24 +01:00
mutual_rooms.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
notifications.py Require the 'from' parameter for /notifications be an integer (#17283) 2024-06-19 10:05:39 +01:00
openid.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
password_policy.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
presence.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
profile.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
push_rule.py Fixups to new push stream (#17038) 2024-03-28 16:29:23 +00:00
pusher.py Finish up work to allow per-user feature flags (#17392) 2024-07-05 13:02:35 +01:00
read_marker.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
receipts.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
register.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
relations.py Stabliize support for MSC3981: recurse /relations (#17023) 2024-04-09 17:11:08 +01:00
rendezvous.py Add note about MSC3886 being closed (#17151) 2024-05-08 12:49:32 +01:00
reporting.py import pydantic objects from the _pydantic_compat module (#17667) 2024-09-11 21:01:43 +00:00
room_keys.py Update license headers 2023-11-21 15:29:58 -05:00
room_upgrade_rest_servlet.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
room.py Stabilise MSC4156: server_name -> via (#17650) 2024-09-05 17:07:39 +01:00
sendtodevice.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
sync.py Sliding Sync: Speed up incremental sync by avoiding extra work (#17665) 2024-09-09 10:36:22 +01:00
tags.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
thirdparty.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
tokenrefresh.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
transactions.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
user_directory.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
versions.py Add a flag to /versions about SSS support (#17571) 2024-08-16 08:54:57 +01:00
voip.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00