Zackery Spytz
f347c6eb75
bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) (GH-11249)
...
(cherry picked from commit 842acaab13
)
2018-12-20 19:38:52 +02:00
Serhiy Storchaka
fff8fab1ce
[2.7] bpo-34052: Prevent SQLite functions from setting callbacks on exceptions. (GH-8113). (GH-10946) (GH-10955)
...
(cherry picked from commit 5b25f1d031
)
(cherry picked from commit 1de91a0032
)
Co-authored-by: Sergey Fedoseev <fedoseev.sergey@gmail.com>.
2018-12-06 00:21:40 +02:00
Victor Stinner
dd4d8b4d80
Fix compilation warnings on Windows (GH-8627)
...
* Fix compilation warning in _ctypes module on Window
(cherry picked from commit 20f11fe43c
)
* Fix compilation warnings on Windows 64-bit
(cherry picked from commit 725e421222
)
* Fix compiler warning in unicodeobject.c
Explicitly case to Py_UNICODE to fix the warning:
Objects\unicodeobject.c(4225): warning C4244: '=' :
conversion from 'long' to 'Py_UNICODE', possible loss of data
The downcast cannot overflow since we check that value <= 0x10ffff.
2018-08-02 18:02:59 +02:00
Serhiy Storchaka
48c8bf21f9
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)
2018-07-31 09:09:36 +03:00
Benjamin Peterson
dc39a59bc7
[2.7] prefix internal sqlite symbols with _pysqlite_ (GH-8215). (GH-8217)
...
(cherry picked from commit 7762e4d387
)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 22:36:49 -07:00
Benjamin Peterson
695ecd9dc6
[2.7] delete some unused pysqlite forward declarations (GH-8211). (GH-8214)
...
(cherry picked from commit d6d4432724
)
Co-authored-by: Benjamin Peterson <benjamin@python.org>
2018-07-09 21:12:57 -07:00
Serhiy Storchaka
924035a5e5
[2.7] Fix error message in sqlite connection thread check. (GH-6028). (GH-6325)
...
(cherry picked from commit 030345c0bf
)
Co-authored-by: Takuya Akiba <469803+iwiwi@users.noreply.github.com>
2018-04-01 01:04:22 +03:00
Oren Milman
cd66d6d632
bpo-31764: Prevent a crash in sqlite3.Cursor.close() in case the Cursor object is uninitialized (GH-4333)
2017-11-08 01:57:02 -08:00
Miss Islington (bot)
4b544aadd5
bpo-31770: Prevent a crash and refleaks when calling sqlite3.Cursor.__init__() more than once (GH-3968) ( #4302 )
...
(cherry picked from commit e56ab746a9
)
2017-11-06 16:44:19 -08:00
Benjamin Peterson
a72d15c97f
consistently use Py_TYPE, Py_REFCNT, and correct initializer macros ( #3563 )
...
This no-op change makes 2.7 more consistent with 3.x to ease comparison and backports.
2017-09-13 21:20:29 -07:00
Benjamin Peterson
9ce1564cd9
revert dd13098a5dc2 ( #29006 , #10513 )
2017-01-16 00:07:27 -08:00
Benjamin Peterson
0897a557f4
revert 030e100f048a ( #29006 , #10513 )
2017-01-11 23:39:58 -08:00
Benjamin Peterson
26c985a8aa
fix refleak in null-containing error case ( #21147 )
2016-12-03 12:01:32 -08:00
Martin Panter
38d335b2a1
Issue #28480 : Avoid label at end of compound statement --without-threads
2016-10-20 03:56:48 +00:00
Serhiy Storchaka
5170c16d21
Issue #27897 : Fixed possible crash in sqlite3.Connection.create_collation()
...
if pass invalid string-like object as a name. Original patch by Xiang Zhang.
2016-10-01 08:24:55 +03:00
Benjamin Peterson
f0039d1f8d
fix unused variable warnings in pysqlite ( closes #27967 )
2016-09-06 10:01:16 -07:00
Serhiy Storchaka
e63af905a4
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
dc60c75aee
Issue #10513 : Fix a regression in Connection.commit()
...
Statements should not be reset after a commit.
Backported from 029050896b
2016-08-26 22:19:05 +03:00
Martin Panter
bf2dca96fb
English spelling and grammar fixes
2016-07-11 07:51:37 +00:00
Serhiy Storchaka
763a61ca95
Issue #26200 : Added Py_SETREF and replaced Py_XSETREF with Py_SETREF
...
in places where Py_DECREF was used.
2016-04-10 18:05:12 +03:00
Serhiy Storchaka
bc62af1bbe
Issue #22570 : Renamed Py_SETREF to Py_XSETREF.
2016-04-06 09:51:18 +03:00
Serhiy Storchaka
2e6c829681
Issue #20440 : More use of Py_SETREF.
...
This patch is manually crafted and contains changes that couldn't be handled
automatically.
2015-12-27 15:41:58 +02:00
Serhiy Storchaka
5951f2300f
Issue #20440 : Massive replacing unsafe attribute setting code with special
...
macro Py_SETREF.
2015-12-24 10:35:35 +02:00
Serhiy Storchaka
80cb186b49
Issue #24257 : Fixed segmentation fault in sqlite3.Row constructor with faked
...
cursor type.
2015-05-22 11:00:40 +03:00
Larry Hastings
101b054c32
Issue #20274 : When calling a _sqlite.Connection, it now complains if passed
...
any keyword arguments. Previously it silently ignored them. Also: Remove
ignored and erroneous "kwargs" parameters from three METH_VARARGS methods
on _sqlite.Connection.
2015-05-08 09:56:29 -07:00
Serhiy Storchaka
0aa6562913
Issue #21147 : sqlite3 now raises an exception if the request contains a null
...
character instead of truncate it. Based on patch by Victor Stinner.
2014-09-11 13:27:19 +03:00
Serhiy Storchaka
501da1da03
Issue #21975 : Fixed crash when using uninitialized sqlite3.Row (in particular
...
when unpickling pickled sqlite3.Row). sqlite3.Row is now initialized in the
__new__() method.
2014-08-06 17:50:22 +03:00
Serhiy Storchaka
30080fd63d
Issue #10203 : sqlite3.Row now truly supports sequence protocol. In particular
...
it supports reverse() and negative indices. Original patch by Claudiu Popa.
2014-05-28 12:57:38 +03:00
Serhiy Storchaka
98a9722e4a
Issue #20437 : Fixed 43 potential bugs when deleting objects references.
2014-02-09 13:14:04 +02:00
Victor Stinner
9450219b06
Issue #20026 : Fix the sqlite module to handle correctly invalid isolation level
...
(wrong type).
2013-12-19 16:44:48 +01:00
Serhiy Storchaka
8493a04e0f
Issue #17857 : Prevent build failures with pre-3.5.0 versions of sqlite3,
...
such as was shipped with Centos 5 and Mac OS X 10.4.
This bug was already fixed in issue14572 for 2.7 only and then it was
backported back from 3.3 in issue17073.
2013-04-28 14:09:47 +03:00
Serhiy Storchaka
35c52b687f
Issue #17073 : Fix some integer overflows in sqlite3 module.
2013-02-07 16:59:34 +02:00
Ned Deily
77e77a1273
Issue #14572 : Prevent build failures with pre-3.5.0 versions of
...
sqlite3, such as was shipped with Centos 5 and Mac OS X 10.4.
2012-05-19 23:35:05 -07:00
Petri Lehtinen
4ab701b2d3
sqlite3: Fix 64-bit integer handling in user functions on 32-bit architectures
...
Closes #8033 .
2012-02-21 14:04:46 +02:00
Petri Lehtinen
c7fd523ac5
Issue #10811 : Fix recursive usage of cursors. Instead of crashing, raise a ProgrammingError now.
2012-02-06 22:04:00 +02:00
Petri Lehtinen
0518f470b1
sqlite3: Handle strings with embedded zeros correctly
...
Closes #13676 .
2012-02-01 22:20:13 +02:00
Antoine Pitrou
ace2ccf387
Issue #13099 : Fix sqlite3.Cursor.lastrowid under a Turkish locale.
...
Reported and diagnosed by Thomas Kluyver.
2011-10-04 13:38:04 +02:00
Ezio Melotti
c2077b0d9b
#11565 : Fix several typos. Patch by Piotr Kasprzyk.
2011-03-16 12:34:31 +02:00
Brett Cannon
a1b562943b
Remove an unnecessary variable.
...
Found using Clang's static analyzer.
2010-05-05 20:14:27 +00:00
Victor Stinner
6e055d78e1
sqlite3: Fix a segfault on calling a connection with something else than a
...
string. Initialize all attributes to be able to call the statement destructor
on error.
Avoid also a duplicate connection in some tests: setUp() does already open a
connection (":memory:").
2010-03-13 03:27:07 +00:00
Gerhard Häring
3bbb67273a
Merged code from pysqlite 2.6.0.
2010-03-05 09:12:37 +00:00
Georg Brandl
d3eaa745a9
#5615 : make it possible to configure --without-threads again.
2009-04-05 11:07:14 +00:00
Mark Dickinson
3e4caeb3bf
Issue #5341 : Fix a variety of spelling errors.
2009-02-21 20:27:01 +00:00
Gerhard Häring
e6872eb417
Issue #3846 : Release GIL during calls to sqlite3_prepare. This improves concurrent access to the same database file from multiple threads/processes.
2008-09-12 22:33:22 +00:00
Gerhard Häring
6e1afcf988
Fixes issue #3103 . In the sqlite3 module, made one more function static. All renaming public symbos now have the pysqlite prefix to avoid name clashes. This at least once created problems where the same symbol name appeared somewhere in Apache and the sqlite3 module was used from mod_python.
2008-09-12 18:58:57 +00:00
Gerhard Häring
ef2276b60d
sqlite3 module: Mark iterdump() method as "Non-standard" like all the other methods not found in DB-API.
2008-09-12 13:54:06 +00:00
Christian Heimes
a27a62e74c
Silenced a compiler warning in the sqlite module
...
Modules/_sqlite/row.c:187: warning: suggest parentheses around && within ||
Reviewed by Benjamin Peterson
2008-08-22 19:55:54 +00:00
Georg Brandl
a24869ada7
#3312 : fix two sqlite3 crashes.
2008-07-16 22:33:18 +00:00
Alexandre Vassalotti
bd70476897
Issue #3153 : sqlite leaks on error.
...
Changed statements of the form Py_DECREF(obj), obj = 0 to Py_CLEAR(obj).
2008-07-13 21:47:59 +00:00
Georg Brandl
ac0c3810e4
Expand docstrings of sqlite3 functions.
2008-06-22 18:31:54 +00:00