1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-31 03:45:13 +00:00
Commit graph

28 commits

Author SHA1 Message Date
reivilibre
69aceef8f6
Actually fix CI build wheels. ()
Follows: 

---------

Signed-off-by: Olivier 'reivilibre <oliverw@matrix.org>
2025-03-05 14:20:17 +00:00
V02460
068e22b4b7
Cleanup Python 3.8 leftovers ()
Some small cleanups after Python3.8 became EOL.

- Move some type imports from `typing_extensions` to `typing`
- Remove the `abi3-py38` feature from pyo3

### 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))

---------

Co-authored-by: Quentin Gliech <quenting@element.io>
2025-02-10 16:53:24 +00:00
V02460
a58f09acc7
Bump pyo3 to v0.23.2 ()
Keep up-to-date with pyo3 releases. This bump enables Python 3.13
support and resolves deprecations.

Links for quick reference:
https://github.com/PyO3/pyo3/releases
https://github.com/davidhewitt/pythonize/releases
https://github.com/vorner/pyo3-log
2024-11-27 10:46:00 +00:00
Erik Johnston
414ddcd457
Update PyO3 to 0.21 ()
This version change requires a migration to a new API. See
https://pyo3.rs/v0.21.2/migration#from-020-to-021

This will fix the annoying warnings added when using the recent rust
nightly:

> warning: non-local `impl` definition, they should be avoided as they
go against expectation
2024-05-08 14:30:06 +01:00
Quentin Gliech
2e92b718d5
MSC4108 implementation ()
Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Andrew Morgan <1342360+anoadragon453@users.noreply.github.com>
2024-04-25 12:50:12 +00:00
Quentin Gliech
09f0957b36
Helpers to transform Twisted requests to Rust http Requests/Responses ()
This adds functions to transform a Twisted request to the
`http::Request`, and then to send back an `http::Response` through it.

It also imports the SynapseError exception so that we can throw that
from Rust code directly

Example usage of this would be:

```rust
use crate::http::{http_request_from_twisted, http_response_to_twisted, HeaderMapPyExt};

fn handler(twisted_request: &PyAny) -> PyResult<()> {
    let request = http_request_from_twisted(twisted_request)?;

    let ua: headers::UserAgent = request.headers().typed_get_required()?;

    if whatever {
        return Err((crate::errors::SynapseError::new(
            StatusCode::UNAUTHORIZED,
            "Whatever".to_owned
            "M_UNAUTHORIZED",
            None,
            None,
        )));
    }

    let response = Response::new("hello".as_bytes());
    http_response_to_twisted(twisted_request, response)?;

    Ok(())
}
```
2024-04-18 12:20:30 +02:00
Quentin Gliech
28f5ad07d3
Bump minimum required Rust version to 1.66.0 () 2024-04-17 15:44:40 +02:00
Erik Johnston
3fefb15fef
Bump minimum Rust version to 1.65.0 ()
The ecosystem e.g. regex crate, have bumped up their MSRV to 1.65.0,
which was released Nov 2022. In line with our policy, let's bump to
match.
2024-01-22 11:11:52 +00:00
V02460
f2430b16d1
Bump pyo3 (0.20), pythonize (0.20), pyo3-log (0.9) ()
Signed-off-by: Kai A. Hiller <V02460@gmail.com>
2023-11-22 14:55:43 +00:00
V02460
5946074d69
Bump pyo3 from 0.17.1 to 0.19.2 ()
Signed-off-by: Kai A. Hiller <V02460@gmail.com>
2023-10-06 11:27:59 +01:00
Patrick Cloke
c690fd16c4
Use modern config for maturin. ()
This allows maturin >= 0.15 to build the properly named
shared library object.

For now the old configuration is also kept to allow for
older maturin installs to be used.
2023-09-28 07:01:16 -04:00
Erik Johnston
dfcfa9f0ed
Bump minimum supported Rust version to 1.61.0 () 2023-09-05 13:12:50 +01:00
Erik Johnston
ba97b39881
Bump minimum supported Rust version ()
Important crates such as `log` and `regex` have bumped theirs to 1.60.0
as well.
2023-06-12 13:27:11 +00:00
V02460
bac123c9d3
Update pyo3-log to v0.8.1 ()
Signed-off-by: Kai A. Hiller <V02460@gmail.com>
2023-02-13 12:25:56 +00:00
Patrick Cloke
da8a957113
Make extension-module optional, but default. () 2023-02-01 19:01:06 -05:00
Erik Johnston
6816300588
Make Dependabot only bump Rust deps in the lock file ()
This is to help downstream packagers.
2022-11-14 14:45:17 +00:00
dependabot[bot]
fec1e2cb52
Bump blake2 from 0.10.4 to 0.10.5 ()
* Bump blake2 from 0.10.4 to 0.10.5

Bumps [blake2](https://github.com/RustCrypto/hashes) from 0.10.4 to 0.10.5.
- [Release notes](https://github.com/RustCrypto/hashes/releases)
- [Commits](https://github.com/RustCrypto/hashes/compare/blake2-v0.10.4...blake2-v0.10.5)

---
updated-dependencies:
- dependency-name: blake2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2022-11-14 10:39:55 +00:00
dependabot[bot]
b03b5a5a4f
Bump pyo3 from 0.17.2 to 0.17.3 ()
* Bump pyo3 from 0.17.2 to 0.17.3

Bumps [pyo3](https://github.com/pyo3/pyo3) from 0.17.2 to 0.17.3.
- [Release notes](https://github.com/pyo3/pyo3/releases)
- [Changelog](https://github.com/PyO3/pyo3/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pyo3/pyo3/compare/v0.17.2...v0.17.3)

---
updated-dependencies:
- dependency-name: pyo3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2022-11-07 10:28:19 +00:00
dependabot[bot]
1df4260620
Bump regex from 1.6.0 to 1.7.0 ()
* Bump regex from 1.6.0 to 1.7.0

Bumps [regex](https://github.com/rust-lang/regex) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.6.0...1.7.0)

---
updated-dependencies:
- dependency-name: regex
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Changelog

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2022-11-07 10:28:08 +00:00
dependabot[bot]
872ea2f4de
Bump serde_json from 1.0.86 to 1.0.87 () 2022-10-24 14:08:22 +01:00
dependabot[bot]
5f06488418
Bump anyhow from 1.0.65 to 1.0.66 () 2022-10-24 10:20:13 +01:00
dependabot[bot]
278b530875
Bump serde from 1.0.145 to 1.0.147 () 2022-10-24 10:19:55 +01:00
Erik Johnston
ebd9e2dac6
Implement push rule evaluation in Rust. () 2022-09-29 16:12:09 +01:00
Erik Johnston
c9316f9f76 Merge branch 'release-v1.68' into develop 2022-09-23 10:43:06 +01:00
Erik Johnston
b7508b1538
Lower minimum rustc version to 1.58.1 () 2022-09-21 09:42:03 +00:00
Erik Johnston
42d261c32f
Port the push rule classes to Rust. () 2022-09-20 12:10:31 +01:00
Erik Johnston
ebfeac7c5d
Check if Rust lib needs rebuilding. ()
This protects against the common mistake of failing to remember to rebuild Rust code after making changes.
2022-09-12 10:03:42 +00:00
Erik Johnston
c9b7e97355
Add a stub Rust crate () 2022-09-06 19:01:37 +01:00