Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Søttrup
arc
Commits
605d5668
Commit
605d5668
authored
Jan 27, 2020
by
Maiken
Browse files
Merge branch 'python-3.9-compatibility' into 'master'
Compatibility with Python 3.9. See merge request
nordugrid/arc!927
parents
ffb55404
2ba3973e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/services/acix/core/bitvector.py
View file @
605d5668
...
...
@@ -26,7 +26,10 @@ class BitVector(object):
else
:
assert
n_bits
==
len
(
bits
)
*
TYPE_SIZE
,
"Size and given bits does not match"
self
.
bits
=
array
.
array
(
ARRAY_TYPE
)
self
.
bits
.
fromstring
(
bits
)
try
:
self
.
bits
.
frombytes
(
bits
)
except
AttributeError
:
self
.
bits
.
fromstring
(
bits
)
def
__setitem__
(
self
,
index
,
value
):
...
...
@@ -41,4 +44,7 @@ class BitVector(object):
def
tostring
(
self
):
return
self
.
bits
.
tostring
()
try
:
return
self
.
bits
.
tobytes
()
except
AttributeError
:
return
self
.
bits
.
tostring
()
src/services/acix/core/bloomfilter.py
View file @
605d5668
...
...
@@ -104,7 +104,10 @@ class BloomFilter(object):
def
serialize
(
self
):
return
self
.
bits
.
tostring
()
try
:
return
self
.
bits
.
tobytes
()
except
AttributeError
:
return
self
.
bits
.
tostring
()
...
...
Write
Preview
Supports
Markdown
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