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
eae0cb41
Commit
eae0cb41
authored
Jun 05, 2006
by
Gregory P. Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* add support for DBSequence objects [patch #1466734]
parent
eae034bf
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
501 additions
and
12 deletions
+501
-12
Lib/bsddb/dbobj.py
Lib/bsddb/dbobj.py
+35
-0
Lib/bsddb/test/test_all.py
Lib/bsddb/test/test_all.py
+7
-6
Lib/test/test_bsddb3.py
Lib/test/test_bsddb3.py
+1
-0
Misc/NEWS
Misc/NEWS
+3
-0
Modules/_bsddb.c
Modules/_bsddb.c
+455
-6
No files found.
Lib/bsddb/dbobj.py
View file @
eae0cb41
...
...
@@ -217,3 +217,38 @@ class DB(DictMixin):
if
db
.
version
()
>=
(
4
,
1
):
def
set_encrypt
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_encrypt
,
args
,
kwargs
)
class
DBSequence
:
def
__init__
(
self
,
*
args
,
**
kwargs
):
self
.
_cobj
=
apply
(
db
.
DBSequence
,
args
,
kwargs
)
def
close
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
close
,
args
,
kwargs
)
def
get
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
get
,
args
,
kwargs
)
def
get_dbp
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
get_dbp
,
args
,
kwargs
)
def
get_key
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
get_key
,
args
,
kwargs
)
def
init_value
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
init_value
,
args
,
kwargs
)
def
open
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
open
,
args
,
kwargs
)
def
remove
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
remove
,
args
,
kwargs
)
def
stat
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
stat
,
args
,
kwargs
)
def
set_cachesize
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_cachesize
,
args
,
kwargs
)
def
set_flags
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_flags
,
args
,
kwargs
)
def
set_range
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
set_range
,
args
,
kwargs
)
def
get_cachesize
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
get_cachesize
,
args
,
kwargs
)
def
get_flags
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
get_flags
,
args
,
kwargs
)
def
get_range
(
self
,
*
args
,
**
kwargs
):
return
apply
(
self
.
_cobj
.
get_range
,
args
,
kwargs
)
Lib/bsddb/test/test_all.py
View file @
eae0cb41
...
...
@@ -4,6 +4,12 @@
import
sys
import
os
import
unittest
try
:
# For Pythons w/distutils pybsddb
from
bsddb3
import
db
except
ImportError
:
# For Python 2.3
from
bsddb
import
db
verbose
=
0
if
'verbose'
in
sys
.
argv
:
...
...
@@ -16,12 +22,6 @@ if 'silent' in sys.argv: # take care of old flag, just in case
def
print_versions
():
try
:
# For Pythons w/distutils pybsddb
from
bsddb3
import
db
except
ImportError
:
# For Python 2.3
from
bsddb
import
db
print
print
'-='
*
38
print
db
.
DB_VERSION_STRING
...
...
@@ -69,6 +69,7 @@ def suite():
'test_queue'
,
'test_recno'
,
'test_thread'
,
'test_sequence'
,
]
alltests
=
unittest
.
TestSuite
()
...
...
Lib/test/test_bsddb3.py
View file @
eae0cb41
...
...
@@ -44,6 +44,7 @@ def suite():
'test_queue'
,
'test_recno'
,
'test_thread'
,
'test_sequence'
,
]
alltests
=
unittest
.
TestSuite
()
...
...
Misc/NEWS
View file @
eae0cb41
...
...
@@ -109,6 +109,9 @@ Extension Modules
assuming BerkeleyDB >= 4.0 and 4.4 respectively. [pybsddb project SF
patch numbers 1494885 and 1494902]
- bsddb: added an interface for the BerkeleyDB >= 4.3 DBSequence class
[pybsddb project SF patch number 1466734]
Library
-------
...
...
Modules/_bsddb.c
View file @
eae0cb41
This diff is collapsed.
Click to expand it.
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