Skip to content

Commit ea2af44

Browse files
authored
Merge pull request #64 from a1phyr/pyo3_0.25
Allow Pyo3 0.25
2 parents 9686105 + c607a27 commit ea2af44

3 files changed

Lines changed: 10 additions & 18 deletions

File tree

.github/workflows/test.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@ jobs:
2323
- beta
2424
- nightly
2525
python-version:
26-
- "3.7"
2726
- "3.8"
2827
- "3.9"
2928
- "3.10"
3029
- "3.11"
30+
- "3.12"
31+
- "3.13"
3132

3233
runs-on: ${{ matrix.os }}
3334

@@ -44,7 +45,6 @@ jobs:
4445
uses: actions/setup-python@v5
4546
with:
4647
python-version: ${{ matrix.python-version }}
47-
architecture: x64
4848

4949
- name: Restore cache
5050
uses: Swatinem/rust-cache@v2
@@ -60,18 +60,14 @@ jobs:
6060
uses: actions/checkout@v4
6161

6262
- name: Install Rust
63-
uses: actions-rs/toolchain@v1
63+
uses: dtolnay/rust-toolchain@master
6464
with:
65-
# MSRV as set in Cargo.toml
66-
toolchain: 1.56.0
67-
default: true
68-
profile: minimal
65+
toolchain: "1.63"
6966

7067
- name: Install Python
7168
uses: actions/setup-python@v5
7269
with:
73-
python-version: "3.7"
74-
architecture: x64
70+
python-version: "3.13"
7571

7672
- name: Restore cache
7773
uses: Swatinem/rust-cache@v2

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ keywords = ["pyo3", "python", "logging"]
1010
categories = ["development-tools::debugging"]
1111
edition = "2018"
1212
license = "Apache-2.0 OR MIT"
13-
rust-version = "1.56.0"
13+
rust-version = "1.63"
1414

1515
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1616

1717
[dependencies]
1818
arc-swap = "~1"
1919
# It's OK to ask for std on log, because pyo3 needs it too.
2020
log = { version = "~0.4.4", default-features = false, features = ["std"] }
21-
pyo3 = { version = ">=0.23, <0.25", default-features = false }
21+
pyo3 = { version = ">=0.23, <0.26", default-features = false }
2222

2323
[dev-dependencies]
24-
pyo3 = { version = ">=0.23, <0.25", default-features = false, features = ["auto-initialize", "macros"] }
24+
pyo3 = { version = ">=0.23, <0.26", default-features = false, features = ["auto-initialize", "macros"] }
2525

2626
# `pyo3-macros` is lying about the minimal version for its `syn` dependency.
2727
# Because we're testing with `-Zminimal-versions`, we need to explicitly set it here.

src/lib.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ impl ResetHandle {
214214
/// What the [`Logger`] can cache.
215215
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
216216
#[non_exhaustive]
217+
#[derive(Default)]
217218
pub enum Caching {
218219
/// Disables caching.
219220
///
@@ -234,15 +235,10 @@ pub enum Caching {
234235
/// Therefore, once a `Logger` has been cached, it is possible to decide on the Rust side if a
235236
/// message would get logged or not. If the message is not to be logged, no Python code is
236237
/// called and the GIL doesn't have to be acquired.
238+
#[default]
237239
LoggersAndLevels,
238240
}
239241

240-
impl Default for Caching {
241-
fn default() -> Self {
242-
Caching::LoggersAndLevels
243-
}
244-
}
245-
246242
#[derive(Debug)]
247243
struct CacheEntry {
248244
filter: LevelFilter,

0 commit comments

Comments
 (0)