@@ -2036,14 +2036,22 @@ mod _sqlite {
20362036 }
20372037
20382038 #[ pyattr]
2039- #[ pyclass( name, traverse) ]
2039+ #[ pyclass( module = "sqlite3" , name = "Blob" , traverse) ]
20402040 #[ derive( Debug , PyPayload ) ]
20412041 struct Blob {
20422042 connection : PyRef < Connection > ,
20432043 #[ pytraverse( skip) ]
20442044 inner : PyMutex < Option < BlobInner > > ,
20452045 }
20462046
2047+ impl Constructor for Blob {
2048+ type Args = FuncArgs ;
2049+
2050+ fn py_new ( _cls : PyTypeRef , _args : Self :: Args , vm : & VirtualMachine ) -> PyResult {
2051+ Err ( vm. new_type_error ( "cannot create 'sqlite3.Blob' instances" ) )
2052+ }
2053+ }
2054+
20472055 #[ derive( Debug ) ]
20482056 struct BlobInner {
20492057 blob : SqliteBlob ,
@@ -2056,7 +2064,7 @@ mod _sqlite {
20562064 }
20572065 }
20582066
2059- #[ pyclass( with( AsMapping ) ) ]
2067+ #[ pyclass( with( AsMapping , Constructor ) ) ]
20602068 impl Blob {
20612069 #[ pymethod]
20622070 fn close ( & self ) {
@@ -2356,7 +2364,7 @@ mod _sqlite {
23562364 impl PrepareProtocol { }
23572365
23582366 #[ pyattr]
2359- #[ pyclass( name) ]
2367+ #[ pyclass( module = "sqlite3" , name = "Statement" ) ]
23602368 #[ derive( PyPayload ) ]
23612369 struct Statement {
23622370 st : PyMutex < SqliteStatement > ,
@@ -2373,7 +2381,15 @@ mod _sqlite {
23732381 }
23742382 }
23752383
2376- #[ pyclass( ) ]
2384+ impl Constructor for Statement {
2385+ type Args = FuncArgs ;
2386+
2387+ fn py_new ( _cls : PyTypeRef , _args : Self :: Args , vm : & VirtualMachine ) -> PyResult {
2388+ Err ( vm. new_type_error ( "cannot create 'sqlite3.Statement' instances" ) )
2389+ }
2390+ }
2391+
2392+ #[ pyclass( with( Constructor ) ) ]
23772393 impl Statement {
23782394 fn new (
23792395 connection : & Connection ,
0 commit comments