Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
0f355c00
Commit
0f355c00
authored
Jun 12, 2016
by
Berker Peksag
Browse files
Options
Browse Files
Download
Plain Diff
Issue #27190: Merge from 3.5
parents
96471105
7bea2347
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
Lib/sqlite3/test/dbapi.py
Lib/sqlite3/test/dbapi.py
+6
-0
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_sqlite/connection.c
Modules/_sqlite/connection.c
+4
-0
No files found.
Lib/sqlite3/test/dbapi.py
View file @
0f355c00
...
...
@@ -180,6 +180,12 @@ class ConnectionTests(unittest.TestCase):
with
self
.
assertRaises
(
sqlite
.
OperationalError
):
cx
.
execute
(
'insert into test(id) values(1)'
)
def
CheckSameThreadErrorOnOldVersion
(
self
):
if
sqlite
.
sqlite_version_info
>=
(
3
,
3
,
1
):
self
.
skipTest
(
'test needs sqlite3 versions older than 3.3.1'
)
with
self
.
assertRaises
(
sqlite
.
NotSupportedError
)
as
cm
:
sqlite
.
connect
(
':memory:'
,
check_same_thread
=
False
)
self
.
assertEqual
(
str
(
cm
.
exception
),
'shared connections not available'
)
class
CursorTests
(
unittest
.
TestCase
):
def
setUp
(
self
):
...
...
Misc/NEWS
View file @
0f355c00
...
...
@@ -10,6 +10,9 @@ What's New in Python 3.6.0 alpha 2
Core and Builtins
-----------------
- Issue #27190: Raise NotSupportedError if sqlite3 is older than 3.3.1.
Patch by Dave Sawyer.
- Issue #27286: Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode. Calling
function with generalized unpacking (PEP 448) and conflicting keyword names
could cause undefined behavior.
...
...
Modules/_sqlite/connection.c
View file @
0f355c00
...
...
@@ -164,6 +164,10 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
#ifdef WITH_THREAD
self
->
thread_ident
=
PyThread_get_thread_ident
();
#endif
if
(
!
check_same_thread
&&
sqlite3_libversion_number
()
<
3003001
)
{
PyErr_SetString
(
pysqlite_NotSupportedError
,
"shared connections not available"
);
return
-
1
;
}
self
->
check_same_thread
=
check_same_thread
;
self
->
function_pinboard
=
PyDict_New
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment