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
Kirill Smelkov
ZODB
Commits
54740503
Commit
54740503
authored
Nov 17, 2016
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplified TransactionMetaData and added a deprecation warning for _extension
parent
14613505
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
29 deletions
+14
-29
src/ZODB/Connection.py
src/ZODB/Connection.py
+14
-29
No files found.
src/ZODB/Connection.py
View file @
54740503
...
...
@@ -1289,31 +1289,17 @@ size.
class
TransactionMetaData
(
object
):
def
__init__
(
self
,
user
=
u''
,
description
=
u''
,
extension
=
b''
):
self
.
user
=
user
self
.
description
=
description
if
not
isinstance
(
extension
,
dict
):
extension
=
_compat
.
loads
(
extension
)
if
extension
else
{}
self
.
extension
=
extension
@
property
def
user
(
self
):
return
self
.
__user
@
user
.
setter
def
user
(
self
,
user
):
if
not
isinstance
(
user
,
bytes
):
user
=
user
.
encode
(
'utf-8'
)
self
.
__user
=
user
@
property
def
description
(
self
):
return
self
.
__description
self
.
user
=
user
@
description
.
setter
def
description
(
self
,
description
):
if
not
isinstance
(
description
,
bytes
):
description
=
description
.
encode
(
'utf-8'
)
self
.
__description
=
description
self
.
description
=
description
if
not
isinstance
(
extension
,
dict
):
extension
=
_compat
.
loads
(
extension
)
if
extension
else
{}
self
.
extension
=
extension
def
note
(
self
,
text
):
# for tests
text
=
text
.
strip
()
...
...
@@ -1324,13 +1310,12 @@ class TransactionMetaData(object):
else
:
self
.
description
=
text
@
property
def
extension
(
self
):
return
self
.
__extension
@
extension
.
setter
def
extension
(
self
,
v
):
self
.
__extension
=
v
_extension
=
extension
def
_
extension
(
self
):
warnings
.
warn
(
"_extension is deprecated, use extension"
,
DeprecationWarning
)
return
self
.
extension
@
_extension
.
setter
def
_extension
(
self
,
v
):
self
.
extension
=
v
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