| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
classes (GH-26456)
* Constructors of subclasses of some buitin classes (e.g. tuple, list,
frozenset) no longer accept arbitrary keyword arguments.
* Subclass of set can now define a __new__() method with additional
keyword parameters without overriding also __init__().
|
|
|
|
|
|
|
|
| |
(GH-27940)
- add print-or-clear traceback helper
- add helpers to clear and visit saved contexts
- modify callbacks to use the new callback_context struct
|
|
|
|
|
|
|
|
| |
- all callbacks are now named xxx_callback
- normalise callable naming in set_*() functions
- normalise context argument naming in callbacks
The sqlite code is being "touched" in bpo-42064 (and related issues);
this style change makes it easier to work with and review.
|
| |
|
|
|
|
|
|
|
| |
(GH-27931)
This allows e.g. methods to be called efficiently by providing
space for a "self" argument; see PY_VECTORCALL_ARGUMENTS_OFFSET docs.
|
|
|
|
|
|
|
|
| |
- acquire the GIL at the very start[1]
- release the GIL at the very end
[1] The trace callback performs a sanity check before acquiring the GIL
Automerge-Triggered-By: GH:encukou
|
| |
|
| |
|
|
|
|
|
|
| |
(GH-26202)
Co-authored-by: Luca Citi
Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
|
| |
|
|
|
|
| |
- Establish common callback context struct
- Convert UDF callbacks to fetch module state from callback context
|
| |
|
|
|
|
| |
(GH-27865)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
exceptions. (GH-27654)
* MemoryError is now raised instead of sqlite3.Warning when
memory is not enough for encoding a statement to UTF-8
in Connection.__call__() and Cursor.execute().
* UnicodEncodeError is now raised instead of sqlite3.Warning when
the statement contains surrogate characters
in Connection.__call__() and Cursor.execute().
* TypeError is now raised instead of ValueError for non-string
script argument in Cursor.executescript().
* ValueError is now raised for script containing the null
character instead of truncating it in Cursor.executescript().
* Correctly handle exceptions raised when getting boolean value
of the result of the progress handler.
* Add many tests covering different corner cases.
Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no>
|
|
|
|
|
|
| |
MemoryError raised in user-defined functions will now preserve
its type. OverflowError will now be converted to DataError.
Previously both were converted to OperationalError.
|
|
|
|
| |
`sqlite3` UDF callbacks (GH-27588)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Prepare for module state:
- Add "get state by defining class" and "get state by module def" stubs
- Add AC defining class when needed
- Add state pointer to connection context
- Pass state as argument to utility functions
Automerge-Triggered-By: GH:encukou
|
| |
|
|
|
|
|
|
| |
This implies that SQLite now takes care of destroying the callback
context (the PyObject callable it has been passed), so we can strip the
collation dict from the connection object.
|
|
|
|
|
|
| |
With this, all sqlite3 static globals have been moved to the global state.
There are a couple of global static strings left, but there should be no need for adding them to the state.
https://bugs.python.org/issue42064
|
| |
|
|
|
|
|
|
|
|
| |
sqlite3.Connection.executescript/sqlite3.Cursor.executescript (GH-27147)
Both `executescript` methods contain the same docstring typo:
_"Executes a multiple SQL statements at once."_ => _"Executes multiple SQL statements at once."_
Automerge-Triggered-By: GH:pablogsal
|
|
|
| |
Automerge-Triggered-By: GH:encukou
|
| |
|
|
|
| |
Also adds a test to verify the (borrowed) exceptions in `sqlite3.Connection`.
|
| |
|
| |
|
|
|
|
| |
(GH-24421)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Make functools types immutable
* Multibyte codec types are now immutable
* pyexpat.xmlparser is now immutable
* array.arrayiterator is now immutable
* _thread types are now immutable
* _csv types are now immutable
* _queue.SimpleQueue is now immutable
* mmap.mmap is now immutable
* unicodedata.UCD is now immutable
* sqlite3 types are now immutable
* _lsprof.Profiler is now immutable
* _overlapped.Overlapped is now immutable
* _operator types are now immutable
* winapi__overlapped.Overlapped is now immutable
* _lzma types are now immutable
* _bz2 types are now immutable
* _dbm.dbm and _gdbm.gdbm are now immutable
|
|
|
|
|
|
|
|
|
| |
* Move connection type to global state
* Move cursor type to global state
* Move prepare protocol type to global state
* Move row type to global state
* Move statement type to global state
* ADD_TYPE takes a pointer
* pysqlite_get_state is now static inline
|
|
|
|
|
| |
Call SQLite API's first, and return early in case of error. At the end,
allocate the object and initialise members. We now avoid unneeded
alloc/dealloc's in case the statement creation fails.
|
| |
|
|
|
|
|
| |
* Remove unused db member of pysqlite_Statement
* Remove unused sql method from statement object
|
|
|
|
|
| |
* Remove timeout_started
* Remove timeout member
|
|
|
|
| |
GIL held (GH-26551)
|
|
|
|
| |
objects (GH-26545)
|
| |
|
| |
|
| |
|
|
|
|
|
| |
(GH-24203)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
The sqlite3 module now fully implements the GC protocol, so there's no
need for this workaround anymore.
- Add and use managed resource helper for connections using TESTFN
- Sort test imports
- Split open-tests into their own test case
Automerge-Triggered-By: GH:vstinner
|
|
|
|
|
|
|
|
|
| |
Try to harden connection close:
- add tests that exercise stuff against a closed database
- add wrapper for sqlite3_close_v2()
- check connection on __enter__
- explicitly free pending statements before close()
- sqlite3_close_v2() always returns SQLITE_OK
|
|
|
|
|
| |
(GH-26484)
GH-26206 was broken by GH-26475.
|
|
|
|
| |
(GH-26206)
|