From ca71dc0df7fcf3adb96c32b9969ad010a8bf5ce3 Mon Sep 17 00:00:00 2001 From: Dmitry Dygalo Date: Mon, 4 Dec 2023 22:38:01 +0100 Subject: [PATCH] chore(python): Update dependencies --- bindings/python/CHANGELOG.md | 2 ++ bindings/python/Cargo.toml | 4 ++-- bindings/python/build.rs | 7 +------ bindings/python/src/lib.rs | 3 ++- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/bindings/python/CHANGELOG.md b/bindings/python/CHANGELOG.md index 018420ec..7da592d5 100644 --- a/bindings/python/CHANGELOG.md +++ b/bindings/python/CHANGELOG.md @@ -8,6 +8,8 @@ - Update `cssparser` to `0.31.2`. - Update `selectors` to `0.25`. - Bump MSRV to `1.65`. +- Update `PyO3` to `0.20.0`. +- Update `built` to `0.7.1`. ### Fixed diff --git a/bindings/python/Cargo.toml b/bindings/python/Cargo.toml index 242f5442..76b3cf01 100644 --- a/bindings/python/Cargo.toml +++ b/bindings/python/Cargo.toml @@ -11,7 +11,7 @@ name = "css_inline" crate-type = ["cdylib"] [build-dependencies] -built = { version = "0.6", features = ["chrono"] } +built = { version = "0.7.1", features = ["cargo-lock", "chrono"] } [dependencies.css-inline] path = "../../css-inline" @@ -22,7 +22,7 @@ features = ["http", "file"] [dependencies] url = "2" rayon = "1" -pyo3 = { version = "0.19.0", features = ["extension-module", "abi3-py37"] } +pyo3 = { version = "0.20.0", features = ["extension-module", "abi3-py37"] } pyo3-built = "0.4" [profile.release] diff --git a/bindings/python/build.rs b/bindings/python/build.rs index 606eb1eb..d8f91cb9 100644 --- a/bindings/python/build.rs +++ b/bindings/python/build.rs @@ -1,8 +1,3 @@ fn main() { - let src = std::env::var("CARGO_MANIFEST_DIR").unwrap(); - let dst = std::path::Path::new(&std::env::var("OUT_DIR").unwrap()).join("built.rs"); - let mut opts = built::Options::default(); - opts.set_dependencies(true).set_compiler(true).set_env(true); - built::write_built_file_with_opts(&opts, std::path::Path::new(&src), &dst) - .expect("Failed to acquire build-time information"); + built::write_built_file().expect("Failed to acquire build-time information"); } diff --git a/bindings/python/src/lib.rs b/bindings/python/src/lib.rs index fd9e6f92..4a150106 100644 --- a/bindings/python/src/lib.rs +++ b/bindings/python/src/lib.rs @@ -92,7 +92,8 @@ macro_rules! inliner { #[pymethods] impl CSSInliner { - #[new( + #[new] + #[pyo3( text_signature = "(inline_style_tags=True, keep_style_tags=False, keep_link_tags=False, base_url=None, load_remote_stylesheets=True, extra_css=None, preallocate_node_capacity=32)" )] fn new(