Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zodb
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Joshua
zodb
Commits
fac0f84e
Commit
fac0f84e
authored
May 10, 2013
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow for unpickler returning 'long' from load in Python2.
Another step toward PyPy support.
parent
da0f3308
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
src/ZODB/_compat.py
src/ZODB/_compat.py
+3
-0
src/ZODB/fsIndex.py
src/ZODB/fsIndex.py
+4
-2
No files found.
src/ZODB/_compat.py
View file @
fac0f84e
...
...
@@ -96,6 +96,9 @@ try:
except
NameError
:
# Py3
long
=
int
INT_TYPES
=
(
int
,)
else
:
INT_TYPES
=
(
int
,
long
)
try
:
...
...
src/ZODB/fsIndex.py
View file @
fac0f84e
...
...
@@ -44,7 +44,9 @@ from BTrees.fsBTree import fsBucket
from
BTrees.OOBTree
import
OOBTree
import
six
from
ZODB._compat
import
Pickler
,
Unpickler
from
ZODB._compat
import
INT_TYPES
from
ZODB._compat
import
Pickler
from
ZODB._compat
import
Unpickler
# convert between numbers and six-byte strings
...
...
@@ -119,7 +121,7 @@ class fsIndex(object):
with
open
(
fname
,
'rb'
)
as
f
:
unpickler
=
Unpickler
(
f
)
pos
=
unpickler
.
load
()
if
not
isinstance
(
pos
,
int
):
if
not
isinstance
(
pos
,
INT_TYPES
):
# NB: this might contain OIDs that got unpickled
# into Unicode strings on Python 3; hope the caller
# will pipe the result to fsIndex().update() to normalize
...
...
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