Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
cb1f74ec
Kaydet (Commit)
cb1f74ec
authored
Ara 19, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #20026: Fix the sqlite module to handle correctly invalid isolation level
(wrong type).
üst
cac23a50
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
regression.py
Lib/sqlite3/test/regression.py
+5
-0
NEWS
Misc/NEWS
+3
-0
connection.c
Modules/_sqlite/connection.c
+4
-1
No files found.
Lib/sqlite3/test/regression.py
Dosyayı görüntüle @
cb1f74ec
...
@@ -330,6 +330,11 @@ class RegressionTests(unittest.TestCase):
...
@@ -330,6 +330,11 @@ class RegressionTests(unittest.TestCase):
datetime
.
datetime
(
2012
,
4
,
4
,
15
,
6
,
0
,
123456
),
datetime
.
datetime
(
2012
,
4
,
4
,
15
,
6
,
0
,
123456
),
])
])
def
CheckInvalidIsolationLevelType
(
self
):
# isolation level is a string, not an integer
self
.
assertRaises
(
TypeError
,
sqlite
.
connect
,
":memory:"
,
isolation_level
=
123
)
def
suite
():
def
suite
():
regression_suite
=
unittest
.
makeSuite
(
RegressionTests
,
"Check"
)
regression_suite
=
unittest
.
makeSuite
(
RegressionTests
,
"Check"
)
...
...
Misc/NEWS
Dosyayı görüntüle @
cb1f74ec
...
@@ -29,6 +29,9 @@ Core and Builtins
...
@@ -29,6 +29,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #20026: Fix the sqlite module to handle correctly invalid isolation
level (wrong type).
- Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
- Issue #18829: csv.Dialect() now checks type for delimiter, escapechar and
quotechar fields. Original patch by Vajrasky Kok.
quotechar fields. Original patch by Vajrasky Kok.
...
...
Modules/_sqlite/connection.c
Dosyayı görüntüle @
cb1f74ec
...
@@ -109,7 +109,10 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
...
@@ -109,7 +109,10 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
Py_INCREF
(
isolation_level
);
Py_INCREF
(
isolation_level
);
}
}
self
->
isolation_level
=
NULL
;
self
->
isolation_level
=
NULL
;
pysqlite_connection_set_isolation_level
(
self
,
isolation_level
);
if
(
pysqlite_connection_set_isolation_level
(
self
,
isolation_level
)
<
0
)
{
Py_DECREF
(
isolation_level
);
return
-
1
;
}
Py_DECREF
(
isolation_level
);
Py_DECREF
(
isolation_level
);
self
->
statement_cache
=
(
pysqlite_Cache
*
)
PyObject_CallFunction
((
PyObject
*
)
&
pysqlite_CacheType
,
"Oi"
,
self
,
cached_statements
);
self
->
statement_cache
=
(
pysqlite_Cache
*
)
PyObject_CallFunction
((
PyObject
*
)
&
pysqlite_CacheType
,
"Oi"
,
self
,
cached_statements
);
...
...
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