forked-synapse/synapse/config
É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
__main__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_base.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_base.pyi Bring auto-accept invite logic into Synapse (#17147) 2024-05-21 20:09:17 +00:00
_util.py import pydantic objects from the _pydantic_compat module (#17667) 2024-09-11 21:01:43 +00:00
account_validity.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
api.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
appservice.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
auth.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
auto_accept_invites.py Bring auto-accept invite logic into Synapse (#17147) 2024-05-21 20:09:17 +00:00
background_updates.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
cache.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
captcha.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
cas.py Allows CAS SSO flow to provide user IDs composed of numbers only (#17098) 2024-05-14 13:55:32 +01:00
consent.py Update license headers 2023-11-21 15:29:58 -05:00
database.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
emailconfig.py Send an email if the address is already bound to an user account (#16819) 2024-04-23 16:45:24 +01:00
experimental.py Stabilise MSC4156: server_name -> via (#17650) 2024-09-05 17:07:39 +01:00
federation.py An federation whitelist query endpoint extension (#16848) 2024-05-13 19:38:45 +00:00
homeserver.py Bring auto-accept invite logic into Synapse (#17147) 2024-05-21 20:09:17 +00:00
jwt.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
key.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
logger.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
metrics.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
modules.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
oembed.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
oidc.py Add OIDC config to add extra parameters to the authorize URL (#16971) 2024-03-22 10:35:11 +00:00
password_auth_providers.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
push.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
ratelimiting.py Ratelimiting of remote media downloads (#17256) 2024-06-05 13:43:36 +01:00
redis.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
registration.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
repository.py Prepare for authenticated media freeze (#17433) 2024-07-22 10:33:17 +01:00
retention.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
room_directory.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
room.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
saml2.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
server_notices.py Merge remote-tracking branch 'gitlab/clokep/license-license' into new_develop 2023-12-13 15:11:56 +00:00
server.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
spam_checker.py Update book location 2023-12-13 16:15:22 +00:00
sso.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
stats.py Update license headers 2023-11-21 15:29:58 -05:00
third_party_event_rules.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
tls.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
tracer.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
user_directory.py Update license headers 2023-11-21 15:29:58 -05:00
voip.py Add config option turn_shared_secret_path (#17690) 2024-09-10 17:27:46 +00:00
workers.py import pydantic objects from the _pydantic_compat module (#17667) 2024-09-11 21:01:43 +00:00