Victor Stinner
8a9a6b443c
[3.7] bpo-9566: Fix compiler warnings on Windows (GH-12920)
...
* bpo-9566: Fix compiler warnings in gcmodule.c (GH-11010)
Change PyDTrace_GC_DONE() argument type from int to Py_ssize_t.
(cherry picked from commit edad38e3e0
)
* bpo-30465: Fix C downcast warning on Windows in ast.c (#6593 )
ast.c: fstring_fix_node_location() downcasts a pointer difference to
a C int. Replace int with Py_ssize_t to fix the compiler warning.
(cherry picked from commit fb7e7992be
)
* bpo-9566: Fix compiler warnings in peephole.c (GH-10652)
(cherry picked from commit 028f0ef4f3
)
* bpo-27645, sqlite: Fix integer overflow on sleep (#6594 )
Use the _PyTime_t type and round away from zero (ROUND_UP,
_PyTime_ROUND_TIMEOUT) the sleep duration, when converting a Python
object to seconds and then to milliseconds. Raise an OverflowError in
case of overflow.
Previously the (int)double conversion rounded towards zero
(ROUND_DOWN).
(cherry picked from commit ca405017d5
)
2019-04-23 10:26:11 +02:00
Miss Islington (bot)
cb272843f2
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175)
...
(cherry picked from commit 842acaab13
)
Co-authored-by: Zackery Spytz <zspytz@gmail.com>
2018-12-17 07:10:20 -08:00
Serhiy Storchaka
1de91a0032
bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946)
...
(cherry picked from commit 5b25f1d031
)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>
2018-12-05 23:09:56 +02:00
Miss Islington (bot)
5ceb7018dc
bpo-33029: Fix signatures of getter and setter functions. (GH-10746)
...
Fix also return type for few other functions (clear, releasebuffer).
(cherry picked from commit d4f9cf5545
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
2018-11-27 09:58:07 -08:00
Miss Islington (bot)
c56bbae5e9
bpo-34743: Fix test_database_source_name under SQLite 3.7.9 (GH-9426)
...
(cherry picked from commit b10a64d117
)
Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-09-20 20:20:32 +03:00
Miss Islington (bot)
015cd0f5cb
bpo-32215: Fix performance regression in sqlite3 (GH-8511)
...
(cherry picked from commit 8d1e190fc5
)
Co-authored-by: Berker Peksag <berker.peksag@gmail.com>
2018-09-20 18:56:56 +03:00
Miss Islington (bot)
c3bdea4c6c
prefix internal sqlite symbols with _pysqlite_ (GH-8215)
...
(cherry picked from commit 7762e4d387
)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 21:48:02 -07:00
Miss Islington (bot)
ba10da1373
delete some unused pysqlite forward declarations (GH-8211)
...
(cherry picked from commit d6d4432724
)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 21:02:29 -07:00
Miss Islington (bot)
00765bb6ae
Fix error message in sqlite connection thread check. (GH-6028)
...
(cherry picked from commit 030345c0bf
)
Co-authored-by: Takuya Akiba <469803+iwiwi@users.noreply.github.com>
2018-03-26 09:01:22 -07:00
Miss Islington (bot)
429ca448d2
bpo-27645: Fix version number in 'database in transaction' fallback (GH-6131)
...
It was actually fixed in SQLite 3.8.8, not 3.8.7.
(cherry picked from commit bbf7bb7a63
)
Co-authored-by: Aviv Palivoda <palaviv@gmail.com>
2018-03-18 09:24:33 +03:00
Miss Islington (bot)
e8a5a92037
bpo-27645: Add support for native backup facility of SQLite (GH-4238)
...
(cherry picked from commit d7aed4102d
)
Co-authored-by: Emanuele Gaifas <lelegaifax@gmail.com>
2018-03-11 01:29:19 +03:00
Benjamin Peterson
0a37a30037
closes bpo-32460: ensure all non-static globals have initializers ( #5061 )
2017-12-31 10:04:13 -08:00
Serhiy Storchaka
e2f92de6a9
Add the const qualifier to "char *" variables that refer to literal strings. ( #4370 )
2017-11-11 13:06:26 +02:00
Anders Lorentsen
a22a127458
bpo-31843: sqlite3.connect() now accepts PathLike objects as database name ( #4299 )
2017-11-06 16:47:43 -08:00
Oren Milman
edb13ae48c
bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized ( #3958 )
2017-11-06 16:09:49 -08:00
Oren Milman
e56ab746a9
bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once ( #3968 )
2017-11-06 16:01:47 -08:00
Oren Milman
93c5a5df8e
bpo-31740: Prevent refleaks when sqlite3.Connection.__init__() is called more than once (GH-3944)
2017-10-10 12:27:46 -07:00
Benjamin Peterson
c8a6e5b18d
sqlite: delete some bsddb cargo-culted code to work around Python 2.3/2.4 bugs
2017-09-22 23:25:28 -07:00
Benjamin Peterson
525269430a
closes bpo-31525: require sqlite3_prepare_v2 ( #3666 )
...
This is based on
40b349cadb (diff-0489411409cd2934730e88bf7767790)
,
though we can be a bit more aggressive about deleting code.
2017-09-20 07:36:18 -07:00
Antoine Pitrou
a6a4dc816d
bpo-31370: Remove support for threads-less builds ( #3385 )
...
* Remove Setup.config
* Always define WITH_THREAD for compatibility.
2017-09-07 18:56:24 +02:00
Serhiy Storchaka
6cca5c8459
bpo-30592: Fixed error messages for some builtins. ( #1996 )
...
Error messages when pass keyword arguments to some builtins that
don't support keyword arguments contained double parenthesis: "()()".
The regression was introduced by bpo-30534.
2017-06-08 14:41:19 +03:00
Serhiy Storchaka
0b3ec19225
Use NULL rather than 0. ( #778 )
...
There was few cases of using literal 0 instead of NULL in the context of
pointers. While this was a legitimate C code, using NULL rather than 0 makes
the code clearer.
2017-03-23 17:53:47 +02:00
Serhiy Storchaka
aefa7ebf0f
bpo-6532: Make the thread id an unsigned integer. ( #781 )
...
* bpo-6532: Make the thread id an unsigned integer.
From C API side the type of results of PyThread_start_new_thread() and
PyThread_get_thread_ident(), the id parameter of
PyThreadState_SetAsyncExc(), and the thread_id field of PyThreadState
changed from "long" to "unsigned long".
* Restore a check in thread_get_ident().
2017-03-23 14:48:39 +01:00
Aviv Palivoda
86a670543f
bpo-9303: Migrate sqlite3 module to _v2 API to enhance performance ( #359 )
2017-03-03 13:58:17 +03:00
Berker Peksag
4a926caf8e
bpo-28518: Start a transaction implicitly before a DML statement ( #245 )
...
Patch by Aviv Palivoda.
2017-02-26 18:22:38 +03:00
Serhiy Storchaka
228b12edcc
Issue #28999 : Use Py_RETURN_NONE, Py_RETURN_TRUE and Py_RETURN_FALSE wherever
...
possible. Patch is writen with Coccinelle.
2017-01-23 09:47:21 +02:00
Berker Peksag
00b1ae0dfc
Issue #28985 : Update authorizer constants in sqlite3 module
...
Dates and version information from the changelog:
* 2006-08-12 (3.3.7) added SQLITE_CREATE_VTABLE, SQLITE_DROP_VTABLE
* 2006-10-09 (3.3.8) added SQLITE_FUNCTION
* 2009-01-12 (3.6.8) added SQLITE_SAVEPOINT
* 2014-02-03 (3.8.3) added SQLITE_RECURSIVE
Patch by Dingyuan Wang.
2017-01-02 06:38:10 +03:00
Serhiy Storchaka
5ab81d787f
Issue #28959 : Added private macro PyDict_GET_SIZE for retrieving the size of dict.
2016-12-16 16:18:57 +02:00
Victor Stinner
070c4d7ca7
Issue #28915 : Use _PyObject_CallNoArg()
...
Replace PyObject_CallFunction(func, NULL) with _PyObject_CallNoArg(func).
2016-12-09 12:29:18 +01:00
Serhiy Storchaka
85b0f5beb1
Added the const qualifier to char* variables that refer to readonly internal
...
UTF-8 represenatation of Unicode objects.
2016-11-20 10:16:47 +02:00
Serhiy Storchaka
06515833fe
Replaced outdated macros _PyUnicode_AsString and _PyUnicode_AsStringAndSize
...
with PyUnicode_AsUTF8 and PyUnicode_AsUTF8AndSize.
2016-11-20 09:13:07 +02:00
Serhiy Storchaka
3b73ea1278
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
...
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:19:20 +02:00
Serhiy Storchaka
f4934ea77d
Issue #28701 : Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString.
...
The latter function is more readable, faster and doesn't raise exceptions.
2016-11-16 10:17:58 +02:00
Serhiy Storchaka
22805ca54e
Issue #27897 : Fixed possible crash in sqlite3.Connection.create_collation()
...
if pass invalid string-like object as a name. Patch by Xiang Zhang.
2016-09-27 00:14:24 +03:00
Serhiy Storchaka
407ac47690
Issue #27897 : Fixed possible crash in sqlite3.Connection.create_collation()
...
if pass invalid string-like object as a name. Patch by Xiang Zhang.
2016-09-27 00:10:03 +03:00
Berker Peksag
59da4b324f
Issue #28037 : Use sqlite3_get_autocommit() instead of setting Connection->inTransaction manually
...
Patch adapted from 9b79188edb
2016-09-12 07:16:43 +03:00
Berker Peksag
9af13ca565
Issue #28036 : Remove unused pysqlite_flush_statement_cache function
2016-09-11 15:37:30 +03:00
Berker Peksag
ab994ed8b9
Issue #10740 : sqlite3 no longer implicitly commit an open transaction before DDL statements
...
This commit contains the following commits from ghaering/pysqlite:
* f254c53494
* 796b3afe38
* cae87ee686
* 3567b31bb5
With the following additions:
* Fixed a refcount error
* Fixed a compiler warning
* Made the string comparison a little more robust
* Added a whatsnew entry
2016-09-11 12:57:15 +03:00
Serhiy Storchaka
2891492d23
Issue #27881 : Fixed possible bugs when setting sqlite3.Connection.isolation_level.
...
Based on patch by Xiang Zhang.
2016-09-01 22:18:03 +03:00
Benjamin Peterson
47ff0734b8
more PY_LONG_LONG to long long
2016-09-08 09:15:54 -07:00
Victor Stinner
3466bde1cc
Avoid calling functions with an empty string as format string
...
Directly pass NULL rather than an empty string.
2016-09-05 18:16:01 -07:00
Benjamin Peterson
ed4aa83ff7
require a long long data type ( closes #27961 )
2016-09-05 17:44:18 -07:00
Serhiy Storchaka
af0628e045
Issue #27881 : Fixed possible bugs when setting sqlite3.Connection.isolation_level.
...
Based on patch by Xiang Zhang.
2016-09-01 22:21:05 +03:00
Serhiy Storchaka
8631da64bb
Issue #27861 : Fixed a crash in sqlite3.Connection.cursor() when a factory
...
creates not a cursor. Patch by Xiang Zhang.
2016-08-29 15:11:52 +03:00
Serhiy Storchaka
ef113cd4cc
Issue #27861 : Fixed a crash in sqlite3.Connection.cursor() when a factory
...
creates not a cursor. Patch by Xiang Zhang.
2016-08-29 14:29:55 +03:00
Berker Peksag
6ed442c48d
Issue #10513 : Merge from 3.5
2016-08-26 22:08:51 +03:00
Berker Peksag
cc9afa9b51
Issue #10513 : Fix a regression in Connection.commit()
...
Statements should not be reset after a commit.
Backported from 029050896b
2016-08-26 22:07:51 +03:00
Berker Peksag
d7f3cdd07d
Issue #21718 : Merge from 3.5
2016-08-21 19:41:38 +03:00
Berker Peksag
6afe85827c
Issue #21718 : cursor.description is now available for queries using CTEs
...
According to PEP 249, cursor.description must be
available for any SELECT statements, such as those
that use CTEs.
Backported from f67fa9c898
Additional test cases added by me.
2016-08-21 19:38:47 +03:00
Berker Peksag
e0b70cd8a9
Issue #16864 : Cursor.lastrowid now supports REPLACE statement
...
Initial patch by Alex LordThorsen.
2016-06-14 15:25:36 +03:00