mirror of
http://shenjack.top:5100/shenjack/icalingua-python-bot.git
synced 2025-04-20 05:59:53 +08:00
Compare commits
No commits in common. "15f08a8cfb016f439e8b69e18d0c01f3f475335d" and "65b8e92ce14ccfe11c82d57ff2ebc293c819b686" have entirely different histories.
15f08a8cfb
...
65b8e92ce1
51
Cargo.lock
generated
51
Cargo.lock
generated
|
@ -693,7 +693,7 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ica-rs"
|
name = "ica-rs"
|
||||||
version = "0.8.3"
|
version = "0.8.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
|
@ -927,6 +927,16 @@ version = "0.7.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
|
checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "lock_api"
|
||||||
|
version = "0.4.12"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
"scopeguard",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.25"
|
version = "0.4.25"
|
||||||
|
@ -1101,6 +1111,29 @@ version = "0.1.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parking_lot"
|
||||||
|
version = "0.12.3"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
||||||
|
dependencies = [
|
||||||
|
"lock_api",
|
||||||
|
"parking_lot_core",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "parking_lot_core"
|
||||||
|
version = "0.9.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"redox_syscall",
|
||||||
|
"smallvec",
|
||||||
|
"windows-targets",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "percent-encoding"
|
name = "percent-encoding"
|
||||||
version = "2.3.1"
|
version = "2.3.1"
|
||||||
|
@ -1267,6 +1300,15 @@ dependencies = [
|
||||||
"getrandom 0.2.15",
|
"getrandom 0.2.15",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "redox_syscall"
|
||||||
|
version = "0.5.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest"
|
name = "reqwest"
|
||||||
version = "0.12.12"
|
version = "0.12.12"
|
||||||
|
@ -1465,6 +1507,12 @@ dependencies = [
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "scopeguard"
|
||||||
|
version = "1.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "security-framework"
|
name = "security-framework"
|
||||||
version = "2.11.1"
|
version = "2.11.1"
|
||||||
|
@ -1808,6 +1856,7 @@ dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"libc",
|
"libc",
|
||||||
"mio",
|
"mio",
|
||||||
|
"parking_lot",
|
||||||
"pin-project-lite",
|
"pin-project-lite",
|
||||||
"signal-hook-registry",
|
"signal-hook-registry",
|
||||||
"socket2",
|
"socket2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "ica-rs"
|
name = "ica-rs"
|
||||||
version = "0.8.3"
|
version = "0.8.2"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
@ -40,7 +40,7 @@ toml_edit = "0.22"
|
||||||
colored = "3.0"
|
colored = "3.0"
|
||||||
|
|
||||||
# runtime
|
# runtime
|
||||||
tokio = { version = "1.43", features = ["rt-multi-thread", "time", "signal", "macros"] }
|
tokio = { version = "1.43", features = ["full"] }
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
pyo3 = { version = "0.23", features = ["experimental-async", "py-clone"] }
|
pyo3 = { version = "0.23", features = ["experimental-async", "py-clone"] }
|
||||||
anyhow = { version = "1.0", features = ["backtrace"] }
|
anyhow = { version = "1.0", features = ["backtrace"] }
|
||||||
|
|
|
@ -9,7 +9,6 @@ mod data_struct;
|
||||||
mod error;
|
mod error;
|
||||||
mod py;
|
mod py;
|
||||||
mod status;
|
mod status;
|
||||||
mod wasms;
|
|
||||||
|
|
||||||
#[cfg(feature = "ica")]
|
#[cfg(feature = "ica")]
|
||||||
mod ica;
|
mod ica;
|
||||||
|
@ -80,7 +79,7 @@ pub fn version_str() -> String {
|
||||||
|
|
||||||
/// 是否为稳定版本
|
/// 是否为稳定版本
|
||||||
/// 会在 release 的时候设置为 true
|
/// 会在 release 的时候设置为 true
|
||||||
pub const STABLE: bool = false;
|
pub const STABLE: bool = true;
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
macro_rules! async_callback_with_state {
|
macro_rules! async_callback_with_state {
|
||||||
|
|
|
@ -246,23 +246,12 @@ fn set_str_cfg_default_plugin(
|
||||||
// 给到 on config
|
// 给到 on config
|
||||||
if let Ok(attr) = module.getattr(intern!(module.py(), ON_CONFIG_FUNC_NAME)) {
|
if let Ok(attr) = module.getattr(intern!(module.py(), ON_CONFIG_FUNC_NAME)) {
|
||||||
if !attr.is_callable() {
|
if !attr.is_callable() {
|
||||||
event!(
|
event!(Level::WARN, "Python 插件 {:?} 的 {} 函数不是 Callable", path, ON_CONFIG_FUNC_NAME);
|
||||||
Level::WARN,
|
|
||||||
"Python 插件 {:?} 的 {} 函数不是 Callable",
|
|
||||||
path,
|
|
||||||
ON_CONFIG_FUNC_NAME
|
|
||||||
);
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
let args = (config_str.as_bytes(),);
|
let args = (config_str.as_bytes(), );
|
||||||
if let Err(e) = attr.call1(args) {
|
if let Err(e) = attr.call1(args) {
|
||||||
event!(
|
event!(Level::WARN, "Python 插件 {:?} 的 {} 函数返回了一个报错 {}", path, ON_CONFIG_FUNC_NAME, e);
|
||||||
Level::WARN,
|
|
||||||
"Python 插件 {:?} 的 {} 函数返回了一个报错 {}",
|
|
||||||
path,
|
|
||||||
ON_CONFIG_FUNC_NAME,
|
|
||||||
e
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,23 +305,12 @@ fn set_bytes_cfg_default_plugin(
|
||||||
// 给到 on config
|
// 给到 on config
|
||||||
if let Ok(attr) = module.getattr(intern!(module.py(), ON_CONFIG_FUNC_NAME)) {
|
if let Ok(attr) = module.getattr(intern!(module.py(), ON_CONFIG_FUNC_NAME)) {
|
||||||
if !attr.is_callable() {
|
if !attr.is_callable() {
|
||||||
event!(
|
event!(Level::WARN, "Python 插件 {:?} 的 {} 函数不是 Callable", path, ON_CONFIG_FUNC_NAME);
|
||||||
Level::WARN,
|
|
||||||
"Python 插件 {:?} 的 {} 函数不是 Callable",
|
|
||||||
path,
|
|
||||||
ON_CONFIG_FUNC_NAME
|
|
||||||
);
|
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
let args = (&config_vec,);
|
let args = (&config_vec, );
|
||||||
if let Err(e) = attr.call1(args) {
|
if let Err(e) = attr.call1(args) {
|
||||||
event!(
|
event!(Level::WARN, "Python 插件 {:?} 的 {} 函数返回了一个报错 {}", path, ON_CONFIG_FUNC_NAME, e);
|
||||||
Level::WARN,
|
|
||||||
"Python 插件 {:?} 的 {} 函数返回了一个报错 {}",
|
|
||||||
path,
|
|
||||||
ON_CONFIG_FUNC_NAME,
|
|
||||||
e
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
|
|
Loading…
Reference in New Issue
Block a user