Skip to content

Commit e73690d

Browse files
committed
fix macros
1 parent 2a1595b commit e73690d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pyo3-async-runtimes-macros/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ pub fn async_std_main(_attr: TokenStream, item: TokenStream) -> TokenStream {
4949
#body
5050
}
5151

52-
Python::initialize();
52+
pyo3::Python::initialize();
5353

5454
pyo3::Python::attach(|py| {
5555
pyo3_async_runtimes::async_std::run(py, main())
@@ -154,7 +154,7 @@ pub fn async_std_test(_attr: TokenStream, item: TokenStream) -> TokenStream {
154154
}
155155
} else {
156156
quote! {
157-
let event_loop = Python::attach(|py| {
157+
let event_loop = pyo3::Python::attach(|py| {
158158
pyo3_async_runtimes::async_std::get_current_loop(py).unwrap().into()
159159
});
160160
Box::pin(pyo3_async_runtimes::async_std::re_exports::spawn_blocking(move || {
@@ -265,7 +265,7 @@ pub fn tokio_test(_attr: TokenStream, item: TokenStream) -> TokenStream {
265265
}
266266
} else {
267267
quote! {
268-
let event_loop = Python::attach(|py| {
268+
let event_loop = pyo3::Python::attach(|py| {
269269
pyo3_async_runtimes::tokio::get_current_loop(py).unwrap().into()
270270
});
271271
Box::pin(async move {

pyo3-async-runtimes-macros/src/tokio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ fn parse_knobs(
268268
#body
269269
}
270270

271-
Python::initialize();
271+
pyo3::Python::initialize();
272272

273273
let mut builder = #builder;
274274
#builder_init;

0 commit comments

Comments
 (0)