File tree Expand file tree Collapse file tree 6 files changed +14
-9
lines changed Expand file tree Collapse file tree 6 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -499,6 +499,7 @@ def set_minimal_package_versions(session: nox.Session):
499499 "trybuild" : "1.0.76" ,
500500 # pins to avoid syn 2.0 (which requires Rust 1.56)
501501 "ghost" : "0.1.8" ,
502+ "serde_json" : "1.0.99" ,
502503 "serde" : "1.0.156" ,
503504 "serde_derive" : "1.0.156" ,
504505 "cxx" : "1.0.92" ,
@@ -508,6 +509,9 @@ def set_minimal_package_versions(session: nox.Session):
508509 "js-sys" : "0.3.61" ,
509510 "wasm-bindgen" : "0.2.84" ,
510511 "syn" : "1.0.109" ,
512+ # proc-macro2 1.0.66+ is edition 2021
513+ "quote" : "1.0.30" ,
514+ "proc-macro2" : "1.0.65" ,
511515 }
512516 # run cargo update first to ensure that everything is at highest
513517 # possible version, so that this matches what CI will resolve to.
Original file line number Diff line number Diff line change @@ -41,11 +41,11 @@ extern "C" {
4141 ) -> * mut PyObject ;
4242}
4343
44- #[ cfg( all ( Py_3_8 ) ) ]
44+ #[ cfg( Py_3_8 ) ]
4545const PY_VECTORCALL_ARGUMENTS_OFFSET : Py_ssize_t =
4646 1 << ( 8 * std:: mem:: size_of :: < Py_ssize_t > ( ) as Py_ssize_t - 1 ) ;
4747
48- #[ cfg( all ( Py_3_8 ) ) ]
48+ #[ cfg( Py_3_8 ) ]
4949#[ inline( always) ]
5050pub unsafe fn PyVectorcall_NARGS ( n : size_t ) -> Py_ssize_t {
5151 assert ! ( n <= ( PY_SSIZE_T_MAX as size_t) ) ;
@@ -113,7 +113,7 @@ extern "C" {
113113 kwnames : * mut PyObject ,
114114 ) -> * mut PyObject ;
115115
116- #[ cfg( all ( Py_3_8 ) ) ]
116+ #[ cfg( Py_3_8 ) ]
117117 #[ cfg_attr( all( not( PyPy ) , not( Py_3_9 ) ) , link_name = "_PyObject_VectorcallDict" ) ]
118118 #[ cfg_attr( all( PyPy , not( Py_3_9 ) ) , link_name = "_PyPyObject_VectorcallDict" ) ]
119119 #[ cfg_attr( all( PyPy , Py_3_9 ) , link_name = "PyPyObject_VectorcallDict" ) ]
@@ -124,7 +124,7 @@ extern "C" {
124124 kwdict : * mut PyObject ,
125125 ) -> * mut PyObject ;
126126
127- #[ cfg( all ( Py_3_8 ) ) ]
127+ #[ cfg( Py_3_8 ) ]
128128 #[ cfg_attr( not( any( Py_3_9 , PyPy ) ) , link_name = "_PyVectorcall_Call" ) ]
129129 #[ cfg_attr( PyPy , link_name = "PyPyVectorcall_Call" ) ]
130130 pub fn PyVectorcall_Call (
Original file line number Diff line number Diff line change @@ -111,8 +111,8 @@ pub unsafe fn Py_TYPE(ob: *mut PyObject) -> *mut PyTypeObject {
111111
112112#[ inline]
113113pub unsafe fn Py_SIZE ( ob : * mut PyObject ) -> Py_ssize_t {
114- debug_assert_ne ! ( ( * ob) . ob_type, std :: ptr :: addr_of_mut !( crate :: PyLong_Type ) ) ;
115- debug_assert_ne ! ( ( * ob) . ob_type, std :: ptr :: addr_of_mut !( crate :: PyBool_Type ) ) ;
114+ debug_assert_ne ! ( ( * ob) . ob_type, addr_of_mut_shim !( crate :: PyLong_Type ) ) ;
115+ debug_assert_ne ! ( ( * ob) . ob_type, addr_of_mut_shim !( crate :: PyBool_Type ) ) ;
116116 ( * ob. cast :: < PyVarObject > ( ) ) . ob_size
117117}
118118
Original file line number Diff line number Diff line change @@ -254,8 +254,8 @@ pub fn parse_method_receiver(arg: &syn::FnArg) -> Result<SelfType> {
254254 ) => {
255255 bail_spanned ! ( recv. span( ) => RECEIVER_BY_VALUE_ERR ) ;
256256 }
257- syn:: FnArg :: Receiver ( recv @ syn :: Receiver { mutability , .. } ) => Ok ( SelfType :: Receiver {
258- mutable : mutability. is_some ( ) ,
257+ syn:: FnArg :: Receiver ( recv) => Ok ( SelfType :: Receiver {
258+ mutable : recv . mutability . is_some ( ) ,
259259 span : recv. span ( ) ,
260260 } ) ,
261261 syn:: FnArg :: Typed ( syn:: PatType { ty, .. } ) => {
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ impl EmptyClass {
1616
1717/// This is for demonstrating how to return a value from __next__
1818#[ pyclass]
19+ #[ derive( Default ) ]
1920struct PyClassIter {
2021 count : usize ,
2122}
Original file line number Diff line number Diff line change @@ -56,6 +56,6 @@ pub struct Foo4 {
5656 field : i32 ,
5757
5858 #[ pyo3( get, set) ]
59- #[ cfg( any ( not( FALSE ) ) ) ]
59+ #[ cfg( not( FALSE ) ) ]
6060 field : u32 ,
6161}
You can’t perform that action at this time.
0 commit comments