From b99c6c33061bc9b4e3f107c3ea5e1432c8700820 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 09:09:42 +0000 Subject: [PATCH 1/2] Update paste requirement from 0.1.6 to 1.0.0 Updates the requirements on [paste](https://github.com/dtolnay/paste) to permit the latest version. - [Release notes](https://github.com/dtolnay/paste/releases) - [Commits](https://github.com/dtolnay/paste/compare/0.1.6...1.0.0) Signed-off-by: dependabot-preview[bot] --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 177e3482036..62c702757b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ libc = "0.2.62" parking_lot = "0.11.0" num-bigint = { version = "0.3", optional = true } num-complex = { version = "0.3", optional = true } -paste = { version = "0.1.6", optional = true } +paste = { version = "1.0.0", optional = true } pyo3cls = { path = "pyo3cls", version = "=0.11.1", optional = true } unindent = { version = "0.1.4", optional = true } From 395e63c900989798f6d72dfa6d97767a2bd82fdc Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 27 Jul 2020 09:09:42 +0000 Subject: [PATCH 2/2] Fix min stable build, add CHANGELOG entry --- CHANGELOG.md | 1 + src/lib.rs | 4 ++-- tests/test_datetime.rs | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97d0332c831..8d218868f1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Correct FFI definition `_PyLong_AsByteArray` `*mut c_uchar` argument instead of `*const c_uchar`. [#1029](https://github.com/PyO3/pyo3/pull/1029) - `PyType::as_type_ptr` is no longer `unsafe`. [#1047](https://github.com/PyO3/pyo3/pull/1047) - Change `PyIterator::from_object` to return `PyResult` instead of `Result`. [#1051](https://github.com/PyO3/pyo3/pull/1051) +- Update `paste` dependency to `1.0`. [#1069](https://github.com/PyO3/pyo3/pull/1069) ### Removed - Remove `PyString::as_bytes`. [#1023](https://github.com/PyO3/pyo3/pull/1023) diff --git a/src/lib.rs b/src/lib.rs index bc72a770113..de6b0329595 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -215,7 +215,7 @@ pub mod proc_macro { #[macro_export] macro_rules! wrap_pyfunction { ($function_name: ident) => {{ - &pyo3::paste::expr! { [<__pyo3_get_function_ $function_name>] } + &pyo3::paste::paste! { [<__pyo3_get_function_ $function_name>] } }}; } @@ -225,7 +225,7 @@ macro_rules! wrap_pyfunction { #[macro_export] macro_rules! wrap_pymodule { ($module_name:ident) => {{ - pyo3::paste::expr! { + pyo3::paste::paste! { &|py| unsafe { pyo3::PyObject::from_owned_ptr(py, []()) } } }}; diff --git a/tests/test_datetime.rs b/tests/test_datetime.rs index f31148385ed..48607f0a349 100644 --- a/tests/test_datetime.rs +++ b/tests/test_datetime.rs @@ -36,7 +36,7 @@ macro_rules! assert_check_exact { unsafe { use pyo3::{AsPyPointer, ffi::*}; assert!($check_func(($obj).as_ptr()) != 0); - assert!(pyo3::paste::expr!([<$check_func Exact>])(($obj).as_ptr()) != 0); + assert!(pyo3::paste::paste!([<$check_func Exact>])(($obj).as_ptr()) != 0); } }; } @@ -46,7 +46,7 @@ macro_rules! assert_check_only { unsafe { use pyo3::{AsPyPointer, ffi::*}; assert!($check_func(($obj).as_ptr()) != 0); - assert!(pyo3::paste::expr!([<$check_func Exact>])(($obj).as_ptr()) == 0); + assert!(pyo3::paste::paste!([<$check_func Exact>])(($obj).as_ptr()) == 0); } }; }