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
nexedi
ZODB
Commits
817e7d32
Commit
817e7d32
authored
Oct 01, 2016
by
Jason Madden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove utils.deprecated3[78]
They haven't been used in a long time.
parent
34bcdf7a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
29 deletions
+3
-29
src/ZODB/utils.py
src/ZODB/utils.py
+3
-29
No files found.
src/ZODB/utils.py
View file @
817e7d32
...
...
@@ -17,7 +17,6 @@ import struct
import
sys
import
time
import
threading
import
warnings
from
binascii
import
hexlify
,
unhexlify
from
struct
import
pack
,
unpack
from
tempfile
import
mkstemp
...
...
@@ -42,36 +41,10 @@ __all__ = ['z64',
'tid_repr'
,
'positive_id'
,
'readable_tid_repr'
,
'DEPRECATED_ARGUMENT'
,
'deprecated37'
,
'deprecated38'
,
'get_pickle_metadata'
,
'locked'
,
]
# A unique marker to give as the default value for a deprecated argument.
# The method should then do a
#
# if that_arg is not DEPRECATED_ARGUMENT:
# complain
#
# dance.
DEPRECATED_ARGUMENT
=
object
()
# Raise DeprecationWarning, noting that the deprecated thing will go
# away in ZODB 3.7. Point to the caller of our caller (i.e., at the
# code using the deprecated thing).
def
deprecated37
(
msg
):
warnings
.
warn
(
"This will be removed in ZODB 3.7:
\
n
%s"
%
msg
,
DeprecationWarning
,
stacklevel
=
3
)
# Raise DeprecationWarning, noting that the deprecated thing will go
# away in ZODB 3.8. Point to the caller of our caller (i.e., at the
# code using the deprecated thing).
def
deprecated38
(
msg
):
warnings
.
warn
(
"This will be removed in ZODB 3.8:
\
n
%s"
%
msg
,
DeprecationWarning
,
stacklevel
=
3
)
if
PY2
:
def
as_bytes
(
obj
):
...
...
@@ -187,7 +160,7 @@ tid_repr = serial_repr
# for 8-byte string tid b'\x03D\x14"\x94\x8bC\x99'.
def
readable_tid_repr
(
tid
):
result
=
tid_repr
(
tid
)
if
isinstance
(
tid
,
str
)
and
len
(
tid
)
==
8
:
if
isinstance
(
tid
,
bytes
)
and
len
(
tid
)
==
8
:
result
=
"%s %s"
%
(
result
,
TimeStamp
(
tid
))
return
result
...
...
@@ -318,7 +291,8 @@ class locked(object):
return
Locked
(
func
,
preconditions
=
self
.
preconditions
)
if
os
.
environ
.
get
(
'DEBUG_LOCKING'
):
if
os
.
environ
.
get
(
'DEBUG_LOCKING'
):
# pragma: no cover
# NOTE: This only works on Python 3.
class
Lock
:
lock_class
=
threading
.
Lock
...
...
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