diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d3a1391..7da4402 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -191,6 +191,7 @@ jobs: # windows - os: windows target: x86_64 + interpreter: 3.10 3.11 3.12 3.13 3.13t 3.14 3.14t - os: windows target: i686 interpreter: 3.10 3.11 3.12 3.13 3.14 diff --git a/Cargo.lock b/Cargo.lock index 1166350..5d51c70 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -292,15 +292,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "indoc" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" -dependencies = [ - "rustversion", -] - [[package]] name = "itoa" version = "1.0.15" @@ -350,15 +341,6 @@ version = "2.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -412,27 +394,24 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab53c047fcd1a1d2a8820fe84f05d6be69e9526be40cb03b73f86b6b03e6d87d" +checksum = "cf85e27e86080aafd5a22eae58a162e133a589551542b3e5cee4beb27e54f8e1" dependencies = [ "chrono", - "indoc", "libc", - "memoffset", "once_cell", "portable-atomic", "pyo3-build-config", "pyo3-ffi", "pyo3-macros", - "unindent", ] [[package]] name = "pyo3-build-config" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b455933107de8642b4487ed26d912c2d899dec6114884214a0b3bb3be9261ea6" +checksum = "8bf94ee265674bf76c09fa430b0e99c26e319c945d96ca0d5a8215f31bf81cf7" dependencies = [ "python3-dll-a", "target-lexicon", @@ -440,9 +419,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c85c9cbfaddf651b1221594209aed57e9e5cff63c4d11d1feead529b872a089" +checksum = "491aa5fc66d8059dd44a75f4580a2962c1862a1c2945359db36f6c2818b748dc" dependencies = [ "libc", "pyo3-build-config", @@ -450,8 +429,8 @@ dependencies = [ [[package]] name = "pyo3-file" -version = "0.14.0" -source = "git+https://github.com/omerbenamram/pyo3-file.git?rev=92e0f505825ea0d33184af35b6c677bda04929bd#92e0f505825ea0d33184af35b6c677bda04929bd" +version = "0.15.0" +source = "git+https://github.com/dimastbk/pyo3-file.git?rev=b0a5b260d13c6df14ea021b06c071a6f389fa805#b0a5b260d13c6df14ea021b06c071a6f389fa805" dependencies = [ "pyo3", "skeptic", @@ -459,9 +438,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a5b10c9bf9888125d917fb4d2ca2d25c8df94c7ab5a52e13313a07e050a3b02" +checksum = "f5d671734e9d7a43449f8480f8b38115df67bef8d21f76837fa75ee7aaa5e52e" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -471,9 +450,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.27.2" +version = "0.28.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b51720d314836e53327f5871d4c0cfb4fb37cc2c4a11cc71907a86342c40f9" +checksum = "22faaa1ce6c430a1f71658760497291065e6450d7b5dc2bcf254d49f66ee700a" dependencies = [ "heck", "proc-macro2", @@ -689,12 +668,6 @@ version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" -[[package]] -name = "unindent" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" - [[package]] name = "version_check" version = "0.9.5" diff --git a/Cargo.toml b/Cargo.toml index 643d3f3..a166a85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,13 +9,13 @@ crate-type = ["cdylib"] [dependencies] calamine = { version = "0.33.0", features = ["chrono"] } -pyo3 = { version = "0.27.1", features = [ +pyo3 = { version = "0.28.2", features = [ "extension-module", "chrono", "generate-import-lib", ] } chrono = { version = "0.4.42", features = ["serde"] } -pyo3-file = { git = "https://github.com/omerbenamram/pyo3-file.git", rev = "92e0f505825ea0d33184af35b6c677bda04929bd" } +pyo3-file = { git = "https://github.com/dimastbk/pyo3-file.git", rev = "b0a5b260d13c6df14ea021b06c071a6f389fa805" } [build-dependencies] -pyo3-build-config = "0.27.1" +pyo3-build-config = "0.28.2" diff --git a/pyproject.toml b/pyproject.toml index 1da2098..71ec2e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ dev = [ "pre-commit~=4.3", "mypy~=1.19.0", "pytest~=9.0", - "pandas[excel]~=3.0", + "pandas[excel]>=2.2", ] [project.urls] diff --git a/src/lib.rs b/src/lib.rs index f969bf9..5ae3e19 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,7 +17,7 @@ fn load_workbook( CalamineWorkbook::from_object(py, path_or_filelike, load_tables) } -#[pymodule(gil_used = false)] +#[pymodule] fn _python_calamine(py: Python, m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_function(wrap_pyfunction!(load_workbook, m)?)?; m.add_class::()?; diff --git a/src/types/sheet.rs b/src/types/sheet.rs index ec2c5b6..dd237dd 100644 --- a/src/types/sheet.rs +++ b/src/types/sheet.rs @@ -8,7 +8,7 @@ use pyo3::types::PyList; use crate::CellValue; -#[pyclass(eq, eq_int)] +#[pyclass(eq, eq_int, from_py_object)] #[derive(Clone, Debug, PartialEq)] pub enum SheetTypeEnum { /// WorkSheet @@ -41,7 +41,7 @@ impl From for SheetTypeEnum { } } -#[pyclass(eq, eq_int)] +#[pyclass(eq, eq_int, from_py_object)] #[derive(Clone, Debug, PartialEq)] pub enum SheetVisibleEnum { /// Visible @@ -70,7 +70,7 @@ impl From for SheetVisibleEnum { type MergedCellRange = ((u32, u32), (u32, u32)); -#[pyclass] +#[pyclass(from_py_object)] #[derive(Clone, PartialEq)] pub struct SheetMetadata { #[pyo3(get)] diff --git a/src/types/table.rs b/src/types/table.rs index 0bf72ac..c64a788 100644 --- a/src/types/table.rs +++ b/src/types/table.rs @@ -6,7 +6,7 @@ use pyo3::types::PyList; use crate::CellValue; -#[pyclass] +#[pyclass(from_py_object)] #[derive(Clone, PartialEq)] pub struct CalamineTable { #[pyo3(get)]