Skip to content

Commit 671b940

Browse files
pythongh-93057: Use 'sqlite3' as module name for clinic input in Modules/_sqlite/connection.c
This change has no impact on behaviour. It is needed only for Argument Clinic to produce nicer deprecation messages when we get to deprecate positional use of optional parameters to sqlite3.connect().
1 parent d93b4ac commit 671b940

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

Modules/_sqlite/connection.c

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ sqlite3_int64_converter(PyObject *obj, sqlite3_int64 *result)
140140
#undef clinic_state
141141

142142
/*[clinic input]
143-
module _sqlite3
144-
class _sqlite3.Connection "pysqlite_Connection *" "clinic_state()->ConnectionType"
143+
module sqlite3
144+
class sqlite3.Connection "pysqlite_Connection *" "clinic_state()->ConnectionType"
145145
[clinic start generated code]*/
146146
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=67369db2faf80891]*/
147147

@@ -214,7 +214,7 @@ class sqlite3_int64_converter(CConverter):
214214

215215
// NB: This needs to be in sync with the sqlite3.connect docstring
216216
/*[clinic input]
217-
_sqlite3.Connection.__init__ as pysqlite_connection_init
217+
sqlite3.Connection.__init__ as pysqlite_connection_init
218218
219219
database: object
220220
timeout: double = 5.0
@@ -451,7 +451,7 @@ connection_dealloc(pysqlite_Connection *self)
451451
}
452452

453453
/*[clinic input]
454-
_sqlite3.Connection.cursor as pysqlite_connection_cursor
454+
sqlite3.Connection.cursor as pysqlite_connection_cursor
455455
456456
factory: object = NULL
457457
@@ -494,7 +494,7 @@ pysqlite_connection_cursor_impl(pysqlite_Connection *self, PyObject *factory)
494494
}
495495

496496
/*[clinic input]
497-
_sqlite3.Connection.blobopen as blobopen
497+
sqlite3.Connection.blobopen as blobopen
498498
499499
table: str
500500
Table name.
@@ -568,7 +568,7 @@ blobopen_impl(pysqlite_Connection *self, const char *table, const char *col,
568568
}
569569

570570
/*[clinic input]
571-
_sqlite3.Connection.close as pysqlite_connection_close
571+
sqlite3.Connection.close as pysqlite_connection_close
572572
573573
Close the database connection.
574574
@@ -622,7 +622,7 @@ int pysqlite_check_connection(pysqlite_Connection* con)
622622
}
623623

624624
/*[clinic input]
625-
_sqlite3.Connection.commit as pysqlite_connection_commit
625+
sqlite3.Connection.commit as pysqlite_connection_commit
626626
627627
Commit any pending transaction to the database.
628628
@@ -656,7 +656,7 @@ pysqlite_connection_commit_impl(pysqlite_Connection *self)
656656
}
657657

658658
/*[clinic input]
659-
_sqlite3.Connection.rollback as pysqlite_connection_rollback
659+
sqlite3.Connection.rollback as pysqlite_connection_rollback
660660
661661
Roll back to the start of any pending transaction.
662662
@@ -1054,7 +1054,7 @@ destructor_callback(void *ctx)
10541054
}
10551055

10561056
/*[clinic input]
1057-
_sqlite3.Connection.create_function as pysqlite_connection_create_function
1057+
sqlite3.Connection.create_function as pysqlite_connection_create_function
10581058
10591059
cls: defining_class
10601060
/
@@ -1192,7 +1192,7 @@ value_callback(sqlite3_context *context)
11921192
}
11931193

11941194
/*[clinic input]
1195-
_sqlite3.Connection.create_window_function as create_window_function
1195+
sqlite3.Connection.create_window_function as create_window_function
11961196
11971197
cls: defining_class
11981198
name: str
@@ -1256,7 +1256,7 @@ create_window_function_impl(pysqlite_Connection *self, PyTypeObject *cls,
12561256
#endif
12571257

12581258
/*[clinic input]
1259-
_sqlite3.Connection.create_aggregate as pysqlite_connection_create_aggregate
1259+
sqlite3.Connection.create_aggregate as pysqlite_connection_create_aggregate
12601260
12611261
cls: defining_class
12621262
/
@@ -1416,7 +1416,7 @@ trace_callback(unsigned int type, void *ctx, void *stmt, void *sql)
14161416
}
14171417

14181418
/*[clinic input]
1419-
_sqlite3.Connection.set_authorizer as pysqlite_connection_set_authorizer
1419+
sqlite3.Connection.set_authorizer as pysqlite_connection_set_authorizer
14201420
14211421
cls: defining_class
14221422
/
@@ -1458,7 +1458,7 @@ pysqlite_connection_set_authorizer_impl(pysqlite_Connection *self,
14581458
}
14591459

14601460
/*[clinic input]
1461-
_sqlite3.Connection.set_progress_handler as pysqlite_connection_set_progress_handler
1461+
sqlite3.Connection.set_progress_handler as pysqlite_connection_set_progress_handler
14621462
14631463
cls: defining_class
14641464
/
@@ -1495,7 +1495,7 @@ pysqlite_connection_set_progress_handler_impl(pysqlite_Connection *self,
14951495
}
14961496

14971497
/*[clinic input]
1498-
_sqlite3.Connection.set_trace_callback as pysqlite_connection_set_trace_callback
1498+
sqlite3.Connection.set_trace_callback as pysqlite_connection_set_trace_callback
14991499
15001500
cls: defining_class
15011501
/
@@ -1539,7 +1539,7 @@ pysqlite_connection_set_trace_callback_impl(pysqlite_Connection *self,
15391539

15401540
#ifdef PY_SQLITE_ENABLE_LOAD_EXTENSION
15411541
/*[clinic input]
1542-
_sqlite3.Connection.enable_load_extension as pysqlite_connection_enable_load_extension
1542+
sqlite3.Connection.enable_load_extension as pysqlite_connection_enable_load_extension
15431543
15441544
enable as onoff: bool
15451545
/
@@ -1575,7 +1575,7 @@ pysqlite_connection_enable_load_extension_impl(pysqlite_Connection *self,
15751575
}
15761576

15771577
/*[clinic input]
1578-
_sqlite3.Connection.load_extension as pysqlite_connection_load_extension
1578+
sqlite3.Connection.load_extension as pysqlite_connection_load_extension
15791579
15801580
name as extension_name: str
15811581
/
@@ -1707,7 +1707,7 @@ pysqlite_connection_call(pysqlite_Connection *self, PyObject *args,
17071707
}
17081708

17091709
/*[clinic input]
1710-
_sqlite3.Connection.execute as pysqlite_connection_execute
1710+
sqlite3.Connection.execute as pysqlite_connection_execute
17111711
17121712
sql: unicode
17131713
parameters: object = NULL
@@ -1740,7 +1740,7 @@ pysqlite_connection_execute_impl(pysqlite_Connection *self, PyObject *sql,
17401740
}
17411741

17421742
/*[clinic input]
1743-
_sqlite3.Connection.executemany as pysqlite_connection_executemany
1743+
sqlite3.Connection.executemany as pysqlite_connection_executemany
17441744
17451745
sql: unicode
17461746
parameters: object
@@ -1773,7 +1773,7 @@ pysqlite_connection_executemany_impl(pysqlite_Connection *self,
17731773
}
17741774

17751775
/*[clinic input]
1776-
_sqlite3.Connection.executescript as pysqlite_connection_executescript
1776+
sqlite3.Connection.executescript as pysqlite_connection_executescript
17771777
17781778
sql_script as script_obj: object
17791779
/
@@ -1865,7 +1865,7 @@ collation_callback(void *context, int text1_length, const void *text1_data,
18651865
}
18661866

18671867
/*[clinic input]
1868-
_sqlite3.Connection.interrupt as pysqlite_connection_interrupt
1868+
sqlite3.Connection.interrupt as pysqlite_connection_interrupt
18691869
18701870
Abort any pending database operation.
18711871
[clinic start generated code]*/
@@ -1893,7 +1893,7 @@ pysqlite_connection_interrupt_impl(pysqlite_Connection *self)
18931893
* of the sqlite3 module.
18941894
*/
18951895
/*[clinic input]
1896-
_sqlite3.Connection.iterdump as pysqlite_connection_iterdump
1896+
sqlite3.Connection.iterdump as pysqlite_connection_iterdump
18971897
18981898
Returns iterator to the dump of the database in an SQL text format.
18991899
[clinic start generated code]*/
@@ -1921,7 +1921,7 @@ pysqlite_connection_iterdump_impl(pysqlite_Connection *self)
19211921
}
19221922

19231923
/*[clinic input]
1924-
_sqlite3.Connection.backup as pysqlite_connection_backup
1924+
sqlite3.Connection.backup as pysqlite_connection_backup
19251925
19261926
target: object(type='pysqlite_Connection *', subclass_of='clinic_state()->ConnectionType')
19271927
*
@@ -2020,7 +2020,7 @@ pysqlite_connection_backup_impl(pysqlite_Connection *self,
20202020
}
20212021

20222022
/*[clinic input]
2023-
_sqlite3.Connection.create_collation as pysqlite_connection_create_collation
2023+
sqlite3.Connection.create_collation as pysqlite_connection_create_collation
20242024
20252025
cls: defining_class
20262026
name: str
@@ -2079,7 +2079,7 @@ pysqlite_connection_create_collation_impl(pysqlite_Connection *self,
20792079

20802080
#ifdef PY_SQLITE_HAVE_SERIALIZE
20812081
/*[clinic input]
2082-
_sqlite3.Connection.serialize as serialize
2082+
sqlite3.Connection.serialize as serialize
20832083
20842084
*
20852085
name: str = "main"
@@ -2129,7 +2129,7 @@ serialize_impl(pysqlite_Connection *self, const char *name)
21292129
}
21302130

21312131
/*[clinic input]
2132-
_sqlite3.Connection.deserialize as deserialize
2132+
sqlite3.Connection.deserialize as deserialize
21332133
21342134
data: Py_buffer(accept={buffer, str})
21352135
The serialized database content.
@@ -2197,7 +2197,7 @@ deserialize_impl(pysqlite_Connection *self, Py_buffer *data,
21972197

21982198

21992199
/*[clinic input]
2200-
_sqlite3.Connection.__enter__ as pysqlite_connection_enter
2200+
sqlite3.Connection.__enter__ as pysqlite_connection_enter
22012201
22022202
Called when the connection is used as a context manager.
22032203
@@ -2215,7 +2215,7 @@ pysqlite_connection_enter_impl(pysqlite_Connection *self)
22152215
}
22162216

22172217
/*[clinic input]
2218-
_sqlite3.Connection.__exit__ as pysqlite_connection_exit
2218+
sqlite3.Connection.__exit__ as pysqlite_connection_exit
22192219
22202220
type as exc_type: object
22212221
value as exc_value: object
@@ -2265,7 +2265,7 @@ pysqlite_connection_exit_impl(pysqlite_Connection *self, PyObject *exc_type,
22652265
}
22662266

22672267
/*[clinic input]
2268-
_sqlite3.Connection.setlimit as setlimit
2268+
sqlite3.Connection.setlimit as setlimit
22692269
22702270
category: int
22712271
The limit category to be set.
@@ -2298,7 +2298,7 @@ setlimit_impl(pysqlite_Connection *self, int category, int limit)
22982298
}
22992299

23002300
/*[clinic input]
2301-
_sqlite3.Connection.getlimit as getlimit
2301+
sqlite3.Connection.getlimit as getlimit
23022302
23032303
category: int
23042304
The limit category to be queried.
@@ -2359,7 +2359,7 @@ is_int_config(const int op)
23592359
}
23602360

23612361
/*[clinic input]
2362-
_sqlite3.Connection.setconfig as setconfig
2362+
sqlite3.Connection.setconfig as setconfig
23632363
23642364
op: int
23652365
The configuration verb; one of the sqlite3.SQLITE_DBCONFIG codes.
@@ -2394,7 +2394,7 @@ setconfig_impl(pysqlite_Connection *self, int op, int enable)
23942394
}
23952395

23962396
/*[clinic input]
2397-
_sqlite3.Connection.getconfig as getconfig -> bool
2397+
sqlite3.Connection.getconfig as getconfig -> bool
23982398
23992399
op: int
24002400
The configuration verb; one of the sqlite3.SQLITE_DBCONFIG codes.

0 commit comments

Comments
 (0)