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
3b6be743
Commit
3b6be743
authored
Sep 02, 2008
by
Jesus Cea
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve compatibility with Python3.0 testsuite
parent
2dd647b8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
Lib/bsddb/__init__.py
Lib/bsddb/__init__.py
+9
-6
Lib/bsddb/test/test_all.py
Lib/bsddb/test/test_all.py
+2
-0
Modules/bsddb.h
Modules/bsddb.h
+1
-1
No files found.
Lib/bsddb/__init__.py
View file @
3b6be743
...
@@ -110,7 +110,7 @@ class _iter_mixin(MutableMapping):
...
@@ -110,7 +110,7 @@ class _iter_mixin(MutableMapping):
key
=
_DeadlockWrap
(
cur
.
first
,
0
,
0
,
0
)[
0
]
key
=
_DeadlockWrap
(
cur
.
first
,
0
,
0
,
0
)[
0
]
yield
key
yield
key
next
=
cur
.
next
next
=
getattr
(
cur
,
"next"
)
while
1
:
while
1
:
try
:
try
:
key
=
_DeadlockWrap
(
next
,
0
,
0
,
0
)[
0
]
key
=
_DeadlockWrap
(
next
,
0
,
0
,
0
)[
0
]
...
@@ -123,7 +123,7 @@ class _iter_mixin(MutableMapping):
...
@@ -123,7 +123,7 @@ class _iter_mixin(MutableMapping):
# FIXME-20031101-greg: race condition. cursor could
# FIXME-20031101-greg: race condition. cursor could
# be closed by another thread before this call.
# be closed by another thread before this call.
_DeadlockWrap
(
cur
.
set
,
key
,
0
,
0
,
0
)
_DeadlockWrap
(
cur
.
set
,
key
,
0
,
0
,
0
)
next
=
cur
.
next
next
=
getattr
(
cur
,
"next"
)
except
_bsddb
.
DBNotFoundError
:
except
_bsddb
.
DBNotFoundError
:
pass
pass
except
_bsddb
.
DBCursorClosedError
:
except
_bsddb
.
DBCursorClosedError
:
...
@@ -152,7 +152,7 @@ class _iter_mixin(MutableMapping):
...
@@ -152,7 +152,7 @@ class _iter_mixin(MutableMapping):
key
=
kv
[
0
]
key
=
kv
[
0
]
yield
kv
yield
kv
next
=
cur
.
next
next
=
getattr
(
cur
,
"next"
)
while
1
:
while
1
:
try
:
try
:
kv
=
_DeadlockWrap
(
next
)
kv
=
_DeadlockWrap
(
next
)
...
@@ -166,7 +166,7 @@ class _iter_mixin(MutableMapping):
...
@@ -166,7 +166,7 @@ class _iter_mixin(MutableMapping):
# FIXME-20031101-greg: race condition. cursor could
# FIXME-20031101-greg: race condition. cursor could
# be closed by another thread before this call.
# be closed by another thread before this call.
_DeadlockWrap
(
cur
.
set
,
key
,
0
,
0
,
0
)
_DeadlockWrap
(
cur
.
set
,
key
,
0
,
0
,
0
)
next
=
cur
.
next
next
=
getattr
(
cur
,
"next"
)
except
_bsddb
.
DBNotFoundError
:
except
_bsddb
.
DBNotFoundError
:
pass
pass
except
_bsddb
.
DBCursorClosedError
:
except
_bsddb
.
DBCursorClosedError
:
...
@@ -302,12 +302,15 @@ class _DBWithCursor(_iter_mixin):
...
@@ -302,12 +302,15 @@ class _DBWithCursor(_iter_mixin):
self
.
_checkCursor
()
self
.
_checkCursor
()
return
_DeadlockWrap
(
self
.
dbc
.
set_range
,
key
)
return
_DeadlockWrap
(
self
.
dbc
.
set_range
,
key
)
def
next
(
self
):
def
next
(
self
):
# Renamed by "2to3"
self
.
_checkOpen
()
self
.
_checkOpen
()
self
.
_checkCursor
()
self
.
_checkCursor
()
rv
=
_DeadlockWrap
(
self
.
dbc
.
next
)
rv
=
_DeadlockWrap
(
getattr
(
self
.
dbc
,
"next"
)
)
return
rv
return
rv
if
sys
.
version_info
[
0
]
>=
3
:
# For "2to3" conversion
next
=
__next__
def
previous
(
self
):
def
previous
(
self
):
self
.
_checkOpen
()
self
.
_checkOpen
()
self
.
_checkCursor
()
self
.
_checkCursor
()
...
...
Lib/bsddb/test/test_all.py
View file @
3b6be743
...
@@ -33,6 +33,8 @@ if sys.version_info[0] >= 3 :
...
@@ -33,6 +33,8 @@ if sys.version_info[0] >= 3 :
v
=
getattr
(
self
.
_dbcursor
,
"next"
)()
v
=
getattr
(
self
.
_dbcursor
,
"next"
)()
return
self
.
_fix
(
v
)
return
self
.
_fix
(
v
)
next
=
__next__
def
previous
(
self
)
:
def
previous
(
self
)
:
v
=
self
.
_dbcursor
.
previous
()
v
=
self
.
_dbcursor
.
previous
()
return
self
.
_fix
(
v
)
return
self
.
_fix
(
v
)
...
...
Modules/bsddb.h
View file @
3b6be743
...
@@ -105,7 +105,7 @@
...
@@ -105,7 +105,7 @@
#error "eek! DBVER can't handle minor versions > 9"
#error "eek! DBVER can't handle minor versions > 9"
#endif
#endif
#define PY_BSDDB_VERSION "4.7.3pre
2
"
#define PY_BSDDB_VERSION "4.7.3pre
3
"
/* Python object definitions */
/* 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