@@ -134,16 +134,7 @@ pub fn impl_arg_params(
134134 . arguments
135135 . iter ( )
136136 . enumerate ( )
137- . map ( |( i, arg) | {
138- impl_arg_param (
139- arg,
140- spec. signature . attribute . is_some ( ) ,
141- i,
142- & mut 0 ,
143- holders,
144- ctx,
145- )
146- } )
137+ . map ( |( i, arg) | impl_arg_param ( arg, i, & mut 0 , holders, ctx) )
147138 . collect ( ) ;
148139 return (
149140 quote ! {
@@ -183,16 +174,7 @@ pub fn impl_arg_params(
183174 . arguments
184175 . iter ( )
185176 . enumerate ( )
186- . map ( |( i, arg) | {
187- impl_arg_param (
188- arg,
189- spec. signature . attribute . is_some ( ) ,
190- i,
191- & mut option_pos,
192- holders,
193- ctx,
194- )
195- } )
177+ . map ( |( i, arg) | impl_arg_param ( arg, i, & mut option_pos, holders, ctx) )
196178 . collect ( ) ;
197179
198180 let args_handler = if spec. signature . python_signature . varargs . is_some ( ) {
@@ -255,7 +237,6 @@ pub fn impl_arg_params(
255237
256238fn impl_arg_param (
257239 arg : & FnArg < ' _ > ,
258- has_signature_attr : bool ,
259240 pos : usize ,
260241 option_pos : & mut usize ,
261242 holders : & mut Holders ,
@@ -269,14 +250,7 @@ fn impl_arg_param(
269250 let from_py_with = format_ident ! ( "from_py_with_{}" , pos) ;
270251 let arg_value = quote ! ( #args_array[ #option_pos] . as_deref( ) ) ;
271252 * option_pos += 1 ;
272- let tokens = impl_regular_arg_param (
273- arg,
274- has_signature_attr,
275- from_py_with,
276- arg_value,
277- holders,
278- ctx,
279- ) ;
253+ let tokens = impl_regular_arg_param ( arg, from_py_with, arg_value, holders, ctx) ;
280254 check_arg_for_gil_refs ( tokens, holders. push_gil_refs_checker ( arg. ty . span ( ) ) , ctx)
281255 }
282256 FnArg :: VarArgs ( arg) => {
@@ -311,7 +285,6 @@ fn impl_arg_param(
311285/// index and the index in option diverge when using py: Python
312286pub ( crate ) fn impl_regular_arg_param (
313287 arg : & RegularArg < ' _ > ,
314- has_signature_attr : bool ,
315288 from_py_with : syn:: Ident ,
316289 arg_value : TokenStream , // expected type: Option<&'a Bound<'py, PyAny>>
317290 holders : & mut Holders ,
@@ -362,11 +335,6 @@ pub(crate) fn impl_regular_arg_param(
362335 }
363336 } else if arg. option_wrapped_type . is_some ( ) {
364337 let holder = holders. push_holder ( arg. name . span ( ) ) ;
365- let arg_value = if !has_signature_attr {
366- quote_arg_span ! { #pyo3_path:: impl_:: deprecations:: deprecate_implicit_option( #arg_value) }
367- } else {
368- quote ! ( #arg_value)
369- } ;
370338 quote_arg_span ! {
371339 #pyo3_path:: impl_:: extract_argument:: extract_optional_argument(
372340 #arg_value,
0 commit comments