0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 17:43:52 +01:00
synapse/scripts-dev
É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
..
build_debian_packages.py Build Debian packages for Ubuntu 23.10 Mantic Minotaur (#16524) 2023-10-19 21:53:05 +01:00
check-newsfragment.sh Update book location 2023-12-13 16:15:22 +00:00
check_line_terminators.sh Update license headers 2023-11-21 15:29:58 -05:00
check_locked_deps_have_sdists.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
check_pydantic_models.py import pydantic objects from the _pydantic_compat module (#17667) 2024-09-11 21:01:43 +00:00
check_schema_delta.py Run pyupgrade for python 3.7 & 3.8. (#16110) 2023-08-15 08:11:20 -04:00
complement.sh Include user membership on events (#17282) 2024-06-13 21:45:54 +00:00
config-lint.sh Fix Shellcheck SC2006: Use $(...) notation 2021-10-22 23:08:55 +01:00
database-save.sh Drop unused table presence (#14825) 2023-01-13 14:17:03 +00:00
docker_update_debian_changelog.sh Update license headers 2023-11-21 15:29:58 -05:00
dump_macaroon.py Change the format of access tokens away from macaroons (#5588) 2021-05-12 15:04:51 +01:00
federation_client.py Replace deprecated HTTPAdapter.get_connection method with get_connection_with_tls_context (#17536) 2024-08-08 14:59:37 +01:00
generate_sample_config.sh Add suffices to scripts in scripts-dev (#12137) 2022-03-02 18:00:26 +00:00
lint.sh Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
make_full_schema.sh Make it easier to use DataGrip w/ Synapse's schema (#14982) 2023-02-15 13:51:37 +00:00
mypy_synapse_plugin.py Sliding Sync: Make PerConnectionState immutable (#17600) 2024-08-29 16:22:57 +01:00
next_github_number.sh Fix typo 2023-12-13 16:37:10 +00:00
release.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
schema_versions.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
sign_json.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00