Skip to content

Commit

Permalink
feat: require pyo3>=0.23 (#56)
Browse files Browse the repository at this point in the history
* feat: require `pyo3>=0.23`
  • Loading branch information
mkniewallner authored Nov 24, 2024
1 parent b62a250 commit 5d76c34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ rust-version = "1.56.0"
arc-swap = "~1"
# It's OK to ask for std on log, because pyo3 needs it too.
log = { version = "~0.4.4", default-features = false, features = ["std"] }
pyo3 = { version = ">=0.21, <0.23", default-features = false }
pyo3 = { version = ">=0.23, <0.24", default-features = false }

[dev-dependencies]
pyo3 = { version = ">=0.21, <0.23", default-features = false, features = ["auto-initialize", "macros"] }
pyo3 = { version = ">=0.23, <0.24", default-features = false, features = ["auto-initialize", "macros"] }

# `pyo3-macros` is lying about the minimal version for its `syn` dependency.
# Because we're testing with `-Zminimal-versions`, we need to explicitly set it here.
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ impl Logger {
///
/// It defaults to having a filter for [`Debug`][LevelFilter::Debug].
pub fn new(py: Python<'_>, caching: Caching) -> PyResult<Self> {
let logging = py.import_bound("logging")?;
let logging = py.import("logging")?;
Ok(Self {
top_filter: LevelFilter::Debug,
filters: HashMap::new(),
Expand Down Expand Up @@ -439,8 +439,8 @@ impl Logger {
record.file(),
record.line().unwrap_or_default(),
msg,
PyTuple::empty_bound(py), // args
&none, // exc_info
PyTuple::empty(py), // args
&none, // exc_info
),
)?;
logger.call_method1("handle", (record,))?;
Expand Down

0 comments on commit 5d76c34

Please sign in to comment.