@@ -320,11 +320,7 @@ class mlir_attribute_subclass : public pure_subclass {
320
320
// Casting constructor. Note that defining an __init__ method is special
321
321
// and not yet generalized on pure_subclass (it requires a somewhat
322
322
// different cpp_function and other requirements on chaining to super
323
- // __init__ make it more awkward to do generally). It is marked as
324
- // `is_new_style_constructor` to suppress the deprecation warning from
325
- // pybind11 related to placement-new since we are not doing any allocation
326
- // here but relying on the superclass constructor that does "new-style"
327
- // allocation for pybind11.
323
+ // __init__ make it more awkward to do generally).
328
324
std::string captureTypeName (
329
325
typeClassName); // As string in case if typeClassName is not static.
330
326
py::cpp_function initCf (
@@ -340,9 +336,7 @@ class mlir_attribute_subclass : public pure_subclass {
340
336
}
341
337
superClass.attr (" __init__" )(self, otherType);
342
338
},
343
- py::name (" __init__" ), py::arg (" cast_from_type" ),
344
- py::is_method (scope.attr (typeClassName)),
345
- py::detail::is_new_style_constructor (),
339
+ py::arg (" cast_from_type" ), py::is_method (py::none ()),
346
340
" Casts the passed type to this specific sub-type." );
347
341
thisClass.attr (" __init__" ) = initCf;
348
342
@@ -377,11 +371,7 @@ class mlir_type_subclass : public pure_subclass {
377
371
// Casting constructor. Note that defining an __init__ method is special
378
372
// and not yet generalized on pure_subclass (it requires a somewhat
379
373
// different cpp_function and other requirements on chaining to super
380
- // __init__ make it more awkward to do generally). It is marked as
381
- // `is_new_style_constructor` to suppress the deprecation warning from
382
- // pybind11 related to placement-new since we are not doing any allocation
383
- // here but relying on the superclass constructor that does "new-style"
384
- // allocation for pybind11.
374
+ // __init__ make it more awkward to do generally).
385
375
std::string captureTypeName (
386
376
typeClassName); // As string in case if typeClassName is not static.
387
377
py::cpp_function initCf (
@@ -397,9 +387,7 @@ class mlir_type_subclass : public pure_subclass {
397
387
}
398
388
superClass.attr (" __init__" )(self, otherType);
399
389
},
400
- py::name (" __init__" ), py::arg (" cast_from_type" ),
401
- py::is_method (scope.attr (typeClassName)),
402
- py::detail::is_new_style_constructor (),
390
+ py::arg (" cast_from_type" ), py::is_method (py::none ()),
403
391
" Casts the passed type to this specific sub-type." );
404
392
thisClass.attr (" __init__" ) = initCf;
405
393
0 commit comments