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
ca3939cd
Kaydet (Commit)
ca3939cd
authored
May 22, 2008
tarafından
Jesus Cea
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
bsddb module updated to version 4.7.0
üst
9a8af2df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
91 additions
and
11 deletions
+91
-11
db.py
Lib/bsddb/db.py
+1
-1
dbtables.py
Lib/bsddb/dbtables.py
+2
-2
test_sequence.py
Lib/bsddb/test/test_sequence.py
+1
-1
NEWS
Misc/NEWS
+2
-1
_bsddb.c
Modules/_bsddb.c
+84
-5
bsddb.h
Modules/bsddb.h
+1
-1
No files found.
Lib/bsddb/db.py
Dosyayı görüntüle @
ca3939cd
...
...
@@ -48,4 +48,4 @@ else:
from
_bsddb
import
__version__
if
version
()
<
(
3
,
2
,
0
):
raise
ImportError
,
"correct BerkeleyDB symbols not found. Perhaps python was statically linked with an older version?"
raise
ImportError
,
"correct Berkeley
DB symbols not found. Perhaps python was statically linked with an older version?"
Lib/bsddb/dbtables.py
Dosyayı görüntüle @
ca3939cd
...
...
@@ -13,7 +13,7 @@
# -- Gregory P. Smith <greg@krypto.org>
# This provides a simple database table interface built on top of
# the Python BerkeleyDB 3 interface.
# the Python Berkeley
DB 3 interface.
#
_cvsid
=
'$Id$'
...
...
@@ -139,7 +139,7 @@ class bsdTableDB :
recover
=
0
,
dbflags
=
0
):
"""bsdTableDB(filename, dbhome, create=0, truncate=0, mode=0600)
Open database name in the dbhome BerkeleyDB directory.
Open database name in the dbhome Berkeley
DB directory.
Use keyword arguments when calling this constructor.
"""
self
.
db
=
None
...
...
Lib/bsddb/test/test_sequence.py
Dosyayı görüntüle @
ca3939cd
...
...
@@ -110,7 +110,7 @@ class DBSequenceTest(unittest.TestCase):
self
.
assertRaises
(
db
.
DBNotFoundError
,
seq
.
open
,
key
=
'id'
,
txn
=
None
,
flags
=
0
)
self
.
assertRaises
(
db
.
DB
NotFound
Error
,
seq
.
stat
)
self
.
assertRaises
(
db
.
DB
InvalidArg
Error
,
seq
.
stat
)
d
.
close
()
...
...
Misc/NEWS
Dosyayı görüntüle @
ca3939cd
...
...
@@ -44,7 +44,8 @@ Extension Modules
- Support for Windows 9x has been removed from the winsound module.
- bsddb module updated to version 4.6.4.
- bsddb module updated to version 4.7.0.
http://www.jcea.es/programacion/pybsddb.htm#bsddb3-4.7.0
- Issue #2858: Fix potential memory corruption when
bsddb.db.DBEnv.lock_get and other bsddb.db object constructors
...
...
Modules/_bsddb.c
Dosyayı görüntüle @
ca3939cd
...
...
@@ -50,7 +50,7 @@
*
* Gregory P. Smith <greg@krypto.org> was once again the maintainer.
*
* Since January 2008, new maintainer is Jesus Cea <jcea@
argo
.es>.
* Since January 2008, new maintainer is Jesus Cea <jcea@
jcea
.es>.
* Jesus Cea licenses this code to PSF under a Contributor Agreement.
*
* Use the pybsddb-users@lists.sf.net mailing list for all questions.
...
...
@@ -4129,6 +4129,26 @@ DBEnv_set_flags(DBEnvObject* self, PyObject* args)
}
#if (DBVER >= 47)
static
PyObject
*
DBEnv_log_set_config
(
DBEnvObject
*
self
,
PyObject
*
args
)
{
int
err
,
flags
,
onoff
;
if
(
!
PyArg_ParseTuple
(
args
,
"ii:log_set_config"
,
&
flags
,
&
onoff
))
return
NULL
;
CHECK_ENV_NOT_CLOSED
(
self
);
MYDB_BEGIN_ALLOW_THREADS
;
err
=
self
->
db_env
->
log_set_config
(
self
->
db_env
,
flags
,
onoff
);
MYDB_END_ALLOW_THREADS
;
RETURN_IF_ERR
();
RETURN_NONE
();
}
#endif
/* DBVER >= 47 */
static
PyObject
*
DBEnv_set_data_dir
(
DBEnvObject
*
self
,
PyObject
*
args
)
{
...
...
@@ -4779,8 +4799,13 @@ DBEnv_lock_stat(DBEnvObject* self, PyObject* args)
MAKE_ENTRY
(
objs_nowait
);
MAKE_ENTRY
(
lockers_wait
);
MAKE_ENTRY
(
lockers_nowait
);
#if (DBVER >= 47)
MAKE_ENTRY
(
lock_wait
);
MAKE_ENTRY
(
lock_nowait
);
#else
MAKE_ENTRY
(
locks_wait
);
MAKE_ENTRY
(
locks_nowait
);
#endif
MAKE_ENTRY
(
hash_len
);
#endif
MAKE_ENTRY
(
regsize
);
...
...
@@ -4943,6 +4968,30 @@ DBEnv_set_get_returns_none(DBEnvObject* self, PyObject* args)
return
PyInt_FromLong
(
oldValue
);
}
#if (DBVER >= 40)
static
PyObject
*
DBEnv_set_rpc_server
(
DBEnvObject
*
self
,
PyObject
*
args
,
PyObject
*
kwargs
)
{
int
err
;
char
*
host
;
long
cl_timeout
=
0
,
sv_timeout
=
0
;
static
char
*
kwnames
[]
=
{
"host"
,
"cl_timeout"
,
"sv_timeout"
,
NULL
};
if
(
!
PyArg_ParseTupleAndKeywords
(
args
,
kwargs
,
"s|ll:set_rpc_server"
,
kwnames
,
&
host
,
&
cl_timeout
,
&
sv_timeout
))
return
NULL
;
CHECK_ENV_NOT_CLOSED
(
self
);
MYDB_BEGIN_ALLOW_THREADS
;
err
=
self
->
db_env
->
set_rpc_server
(
self
->
db_env
,
NULL
,
host
,
cl_timeout
,
sv_timeout
,
0
);
MYDB_END_ALLOW_THREADS
;
RETURN_IF_ERR
();
RETURN_NONE
();
}
#endif
#if (DBVER >= 40)
static
PyObject
*
DBEnv_set_verbose
(
DBEnvObject
*
self
,
PyObject
*
args
)
...
...
@@ -5075,7 +5124,11 @@ static PyObject*
DBEnv_rep_get_nsites
(
DBEnvObject
*
self
,
PyObject
*
args
)
{
int
err
;
#if (DBVER >= 47)
u_int32_t
nsites
;
#else
int
nsites
;
#endif
if
(
!
PyArg_ParseTuple
(
args
,
":rep_get_nsites"
))
{
return
NULL
;
...
...
@@ -5109,7 +5162,11 @@ static PyObject*
DBEnv_rep_get_priority
(
DBEnvObject
*
self
,
PyObject
*
args
)
{
int
err
;
#if (DBVER >= 47)
u_int32_t
priority
;
#else
int
priority
;
#endif
if
(
!
PyArg_ParseTuple
(
args
,
":rep_get_priority"
))
{
return
NULL
;
...
...
@@ -6094,6 +6151,9 @@ static PyMethodDef DBEnv_methods[] = {
{
"set_cachesize"
,
(
PyCFunction
)
DBEnv_set_cachesize
,
METH_VARARGS
},
{
"set_data_dir"
,
(
PyCFunction
)
DBEnv_set_data_dir
,
METH_VARARGS
},
{
"set_flags"
,
(
PyCFunction
)
DBEnv_set_flags
,
METH_VARARGS
},
#if (DBVER >= 47)
{
"log_set_config"
,
(
PyCFunction
)
DBEnv_log_set_config
,
METH_VARARGS
},
#endif
{
"set_lg_bsize"
,
(
PyCFunction
)
DBEnv_set_lg_bsize
,
METH_VARARGS
},
{
"set_lg_dir"
,
(
PyCFunction
)
DBEnv_set_lg_dir
,
METH_VARARGS
},
{
"set_lg_max"
,
(
PyCFunction
)
DBEnv_set_lg_max
,
METH_VARARGS
},
...
...
@@ -6139,6 +6199,10 @@ static PyMethodDef DBEnv_methods[] = {
#if (DBVER >= 40)
{
"txn_recover"
,
(
PyCFunction
)
DBEnv_txn_recover
,
METH_VARARGS
},
#endif
#if (DBVER >= 40)
{
"set_rpc_server"
,
(
PyCFunction
)
DBEnv_set_rpc_server
,
METH_VARARGS
||
METH_KEYWORDS
},
#endif
#if (DBVER >= 40)
{
"set_verbose"
,
(
PyCFunction
)
DBEnv_set_verbose
,
METH_VARARGS
},
#if (DBVER >= 42)
...
...
@@ -6760,6 +6824,7 @@ DL_EXPORT(void) init_bsddb(void)
#if (DBVER < 45)
ADD_INT
(
d
,
DB_CACHED_COUNTS
);
#endif
#if (DBVER >= 41)
_addIntToDict
(
d
,
"DB_CHECKPOINT"
,
0
);
#else
...
...
@@ -6858,14 +6923,25 @@ DL_EXPORT(void) init_bsddb(void)
ADD_INT
(
d
,
DB_TIME_NOTGRANTED
);
ADD_INT
(
d
,
DB_TXN_NOT_DURABLE
);
ADD_INT
(
d
,
DB_TXN_WRITE_NOSYNC
);
ADD_INT
(
d
,
DB_LOG_AUTOREMOVE
);
ADD_INT
(
d
,
DB_DIRECT_LOG
);
ADD_INT
(
d
,
DB_DIRECT_DB
);
ADD_INT
(
d
,
DB_INIT_REP
);
ADD_INT
(
d
,
DB_ENCRYPT
);
ADD_INT
(
d
,
DB_CHKSUM
);
#endif
#if (DBVER >= 42) && (DBVER < 47)
ADD_INT
(
d
,
DB_LOG_AUTOREMOVE
);
ADD_INT
(
d
,
DB_DIRECT_LOG
);
#endif
#if (DBVER >= 47)
ADD_INT
(
d
,
DB_LOG_DIRECT
);
ADD_INT
(
d
,
DB_LOG_DSYNC
);
ADD_INT
(
d
,
DB_LOG_IN_MEMORY
);
ADD_INT
(
d
,
DB_LOG_AUTO_REMOVE
);
ADD_INT
(
d
,
DB_LOG_ZERO
);
#endif
#if (DBVER >= 44)
ADD_INT
(
d
,
DB_DSYNC_DB
);
#endif
...
...
@@ -6935,14 +7011,17 @@ DL_EXPORT(void) init_bsddb(void)
#endif
#if (DBVER >= 43)
ADD_INT
(
d
,
DB_DSYNC_LOG
);
ADD_INT
(
d
,
DB_LOG_INMEMORY
);
ADD_INT
(
d
,
DB_BUFFER_SMALL
);
ADD_INT
(
d
,
DB_SEQ_DEC
);
ADD_INT
(
d
,
DB_SEQ_INC
);
ADD_INT
(
d
,
DB_SEQ_WRAP
);
#endif
#if (DBVER >= 43) && (DBVER < 47)
ADD_INT
(
d
,
DB_LOG_INMEMORY
);
ADD_INT
(
d
,
DB_DSYNC_LOG
);
#endif
#if (DBVER >= 41)
ADD_INT
(
d
,
DB_ENCRYPT_AES
);
ADD_INT
(
d
,
DB_AUTO_COMMIT
);
...
...
Modules/bsddb.h
Dosyayı görüntüle @
ca3939cd
...
...
@@ -105,7 +105,7 @@
#error "eek! DBVER can't handle minor versions > 9"
#endif
#define PY_BSDDB_VERSION "4.
6.5devel2
"
#define PY_BSDDB_VERSION "4.
7.0
"
/* Python object definitions */
...
...
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