Merge pull request #1147 from shdwchn10/deps/sqlx-0.8.1-and-others

Bump sqlx, reqwest and other deps. Also bump MSRV to 1.80
This commit is contained in:
Сырцев Вадим Игоревич 2024-08-24 14:56:00 +00:00 committed by GitHub
commit 38e3f6caa6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 348 additions and 237 deletions

View file

@ -27,7 +27,7 @@ env:
# - down below in a matrix # - down below in a matrix
# - `Cargo.toml` # - `Cargo.toml`
# - **/CHANGELOG.md # - **/CHANGELOG.md
rust_msrv: 1.70.0 rust_msrv: 1.80.0
CI: 1 CI: 1
@ -108,7 +108,7 @@ jobs:
toolchain: nightly-2024-07-03 toolchain: nightly-2024-07-03
features: "--features full nightly" features: "--features full nightly"
- rust: msrv - rust: msrv
toolchain: 1.70.0 toolchain: 1.80.0
features: "--features full" features: "--features full"
steps: steps:
@ -138,9 +138,6 @@ jobs:
- name: Downgrade deps for MSRV - name: Downgrade deps for MSRV
if: ${{ matrix.rust == 'msrv' }} if: ${{ matrix.rust == 'msrv' }}
run: | run: |
cargo update -p sqlx --precise 0.7.3
cargo update -p atomic-write-file --precise 0.1.2
cargo update -p deadpool-runtime --precise 0.1.3
exit 0 exit 0

View file

@ -12,6 +12,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add `filter_mention_command` filter to `HandlerExt` trait ([issue #494](https://github.com/teloxide/teloxide/issues/494)) - Add `filter_mention_command` filter to `HandlerExt` trait ([issue #494](https://github.com/teloxide/teloxide/issues/494))
- Add `filter_business_connection`, `filter_business_message`, `filter_edited_business_message`, and `filter_deleted_business_messages` filters to update filters ([PR 1146](https://github.com/teloxide/teloxide/pull/1146)) - Add `filter_business_connection`, `filter_business_message`, `filter_edited_business_message`, and `filter_deleted_business_messages` filters to update filters ([PR 1146](https://github.com/teloxide/teloxide/pull/1146))
### Changed
- Environment bumps: ([#1147][pr1147])
- MSRV (Minimal Supported Rust Version) was bumped from `1.70.0` to `1.80.0`
- Some dependencies was bumped: `sqlx` to `0.8.1`, `tower` to `0.5.0`, `reqwest` to `0.12.7`
- `tokio` version was explicitly specified as `1.39`
[pr1147]: https://github.com/teloxide/teloxide/pull/1147
## 0.13.0 - 2024-08-16 ## 0.13.0 - 2024-08-16
### Added ### Added

515
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@ resolver = "2"
# The settings below will be applied to all crates in the workspace # The settings below will be applied to all crates in the workspace
[workspace.package] [workspace.package]
# MSRV (minimal supported Rust version). # MSRV (minimal supported Rust version).
rust-version = "1.70" rust-version = "1.80"
edition = "2021" edition = "2021"
license = "MIT" license = "MIT"

View file

@ -56,7 +56,7 @@ $ set TELOXIDE_TOKEN=<Your token here>
$ $env:TELOXIDE_TOKEN=<Your token here> $ $env:TELOXIDE_TOKEN=<Your token here>
``` ```
4. Make sure that your Rust compiler is up to date (`teloxide` currently requires rustc at least version 1.70): 4. Make sure that your Rust compiler is up to date (`teloxide` currently requires rustc at least version 1.80):
```bash ```bash
# If you're using stable # If you're using stable
$ rustup update stable $ rustup update stable

View file

@ -45,6 +45,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- `MaybeAnonymousUser` type introduced, which replaced `PollAnswer::voter: Voter` and `MessageReactionUpdated::{user, actor_chat}` in `MessageReactionUpdated`([#1134][pr1134]) - `MaybeAnonymousUser` type introduced, which replaced `PollAnswer::voter: Voter` and `MessageReactionUpdated::{user, actor_chat}` in `MessageReactionUpdated`([#1134][pr1134])
- Environment bumps: ([#1147][pr1147])
- MSRV (Minimal Supported Rust Version) was bumped from `1.70.0` to `1.80.0`
- Some dependencies was bumped: `reqwest` to `0.12.7` and `ron` to `0.8.1`
- `tokio` version was explicitly specified as `1.39` and feature `io-util` was enabled for it
- Support for TBA 7.2 ([#1146](pr1146)) - Support for TBA 7.2 ([#1146](pr1146))
- Remove `flags` field from `StickerSet` struct - Remove `flags` field from `StickerSet` struct
@ -55,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[pr1131]: https://github.com/teloxide/teloxide/pull/1131 [pr1131]: https://github.com/teloxide/teloxide/pull/1131
[pr1134]: https://github.com/teloxide/teloxide/pull/1134 [pr1134]: https://github.com/teloxide/teloxide/pull/1134
[pr1146]: https://github.com/teloxide/teloxide/pull/1146 [pr1146]: https://github.com/teloxide/teloxide/pull/1146
[pr1147]: https://github.com/teloxide/teloxide/pull/1147
### Removed ### Removed

View file

@ -49,11 +49,11 @@ full = ["throttle", "trace_adaptor", "erased", "cache_me"]
[dependencies] [dependencies]
futures = "0.3.5" futures = "0.3.5"
tokio = { version = "1.12.0", features = ["fs"] } tokio = { version = "1.39", features = ["fs", "io-util"] }
tokio-util = { version = "0.7.0", features = ["codec"] } tokio-util = { version = "0.7.0", features = ["codec"] }
pin-project = "1.0.12" pin-project = "1.0.12"
bytes = "1.0.0" bytes = "1.0.0"
reqwest = { version = "0.11.10", features = [ reqwest = { version = "0.12.7", features = [
"json", "json",
"stream", "stream",
"multipart", "multipart",
@ -91,7 +91,7 @@ tokio = { version = "1.8.0", features = [
cool_asserts = "2.0.3" cool_asserts = "2.0.3"
xshell = "0.2" xshell = "0.2"
ron = "0.7" ron = "0.8.1"
indexmap = { version = "1.9", features = ["serde-1"] } indexmap = { version = "1.9", features = ["serde-1"] }
aho-corasick = "0.7" aho-corasick = "0.7"
itertools = "0.10" itertools = "0.10"

View file

@ -27,7 +27,7 @@
```toml ```toml
teloxide-core = "0.10.1" teloxide-core = "0.10.1"
``` ```
_Compiler support: requires rustc 1.68+_. _Compiler support: requires rustc 1.80+_.
[`teloxide`]: https://docs.rs/teloxide [`teloxide`]: https://docs.rs/teloxide
[Telegram Bot API]: https://core.telegram.org/bots/api [Telegram Bot API]: https://core.telegram.org/bots/api

View file

@ -7,7 +7,7 @@
//!```toml //!```toml
//! teloxide-core = "0.10.1" //! teloxide-core = "0.10.1"
//! ``` //! ```
//! _Compiler support: requires rustc 1.70+_. //! _Compiler support: requires rustc 1.80+_.
//! //!
//! ``` //! ```
//! # async { //! # async {

View file

@ -6,6 +6,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## unreleased ## unreleased
### Changed
- Environment bumps: ([#1147][pr1147])
- MSRV (Minimal Supported Rust Version) was bumped from `1.70.0` to `1.80.0`
- Dependency `heck` was bumped to `0.5.0`
[pr1147]: https://github.com/teloxide/teloxide/pull/1147
## 0.8.0 - 2024-08-16 ## 0.8.0 - 2024-08-16
### Added ### Added

View file

@ -20,7 +20,7 @@ proc-macro = true
quote = "1.0.7" quote = "1.0.7"
proc-macro2 = "1.0.67" proc-macro2 = "1.0.67"
syn = { version = "1.0.13", features = ["full", "extra-traits"] } syn = { version = "1.0.13", features = ["full", "extra-traits"] }
heck = "0.4.0" heck = "0.5.0"
[package.metadata.release] [package.metadata.release]
tag-prefix = "macros-" tag-prefix = "macros-"

View file

@ -89,7 +89,7 @@ dptree = "0.3.0"
# Uncomment this if you want to test teloxide with a specific dptree commit # Uncomment this if you want to test teloxide with a specific dptree commit
# dptree = { git = "https://github.com/teloxide/dptree", rev = "df578e4" } # dptree = { git = "https://github.com/teloxide/dptree", rev = "df578e4" }
tokio = { version = "1.8", features = ["fs"] } tokio = { version = "1.39", features = ["fs"] }
tokio-util = "0.7" tokio-util = "0.7"
tokio-stream = "0.1.8" tokio-stream = "0.1.8"
@ -105,7 +105,7 @@ pin-project = "1.0"
aquamarine = "0.5.0" aquamarine = "0.5.0"
either = "1.9.0" either = "1.9.0"
sqlx = { version = "0.7.3", optional = true, default-features = false, features = [ sqlx = { version = "0.8.1", optional = true, default-features = false, features = [
"macros", "macros",
"sqlite", "sqlite",
"postgres" "postgres"
@ -114,7 +114,7 @@ deadpool-redis = { version = "0.14", features = ["rt_tokio_1"], optional = true
serde_cbor = { version = "0.11", optional = true } serde_cbor = { version = "0.11", optional = true }
bincode = { version = "1.3", optional = true } bincode = { version = "1.3", optional = true }
axum = { version = "0.7.0", optional = true } axum = { version = "0.7.0", optional = true }
tower = { version = "0.4.13", optional = true } tower = { version = "0.5.0", optional = true }
tower-http = { version = "0.5.2", features = ["trace"], optional = true } tower-http = { version = "0.5.2", features = ["trace"], optional = true }
rand = { version = "0.8.5", optional = true } rand = { version = "0.8.5", optional = true }
@ -123,8 +123,8 @@ rand = "0.8.3"
pretty_env_logger = "0.5.0" pretty_env_logger = "0.5.0"
serde = "1" serde = "1"
serde_json = "1" serde_json = "1"
tokio = { version = "1.8", features = ["fs", "rt-multi-thread", "macros"] } tokio = { version = "1.39", features = ["fs", "rt-multi-thread", "macros"] }
reqwest = "0.11.11" reqwest = "0.12.7"
chrono = "0.4" chrono = "0.4"
tokio-stream = "0.1" tokio-stream = "0.1"

View file

@ -54,18 +54,12 @@ where
tokio::spawn(async move { tokio::spawn(async move {
let tcp_listener = tokio::net::TcpListener::bind(address) let tcp_listener = tokio::net::TcpListener::bind(address)
.await .await
.map_err(|err| { .inspect_err(|_| stop_token.stop())
stop_token.stop();
err
})
.expect("Couldn't bind to the address"); .expect("Couldn't bind to the address");
axum::serve(tcp_listener, app) axum::serve(tcp_listener, app)
.with_graceful_shutdown(stop_flag) .with_graceful_shutdown(stop_flag)
.await .await
.map_err(|err| { .inspect_err(|_| stop_token.stop())
stop_token.stop();
err
})
.expect("Axum server error"); .expect("Axum server error");
}); });

View file

@ -122,10 +122,7 @@ impl DispatcherState {
.map(ShutdownState::from_u8) .map(ShutdownState::from_u8)
.map_err(ShutdownState::from_u8) .map_err(ShutdownState::from_u8)
// FIXME: `Result::inspect` when :( // FIXME: `Result::inspect` when :(
.map(|st| { .inspect(|_| self.notify.notify_waiters())
self.notify.notify_waiters();
st
})
} }
} }