Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
transaction
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
transaction
Commits
823b7cb6
Commit
823b7cb6
authored
Dec 18, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws
parent
46985225
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
transaction/_transaction.py
transaction/_transaction.py
+6
-1
No files found.
transaction/_transaction.py
View file @
823b7cb6
...
@@ -490,6 +490,7 @@ class Transaction(object):
...
@@ -490,6 +490,7 @@ class Transaction(object):
# TODO: We need a better name for the adapters.
# TODO: We need a better name for the adapters.
class
MultiObjectResourceAdapter
(
object
):
class
MultiObjectResourceAdapter
(
object
):
"""Adapt the old-style register() call to the new-style join().
"""Adapt the old-style register() call to the new-style join().
...
@@ -497,7 +498,6 @@ class MultiObjectResourceAdapter(object):
...
@@ -497,7 +498,6 @@ class MultiObjectResourceAdapter(object):
the transaction manager. With register(), an individual object
the transaction manager. With register(), an individual object
is passed to register().
is passed to register().
"""
"""
def
__init__
(
self
,
jar
):
def
__init__
(
self
,
jar
):
self
.
manager
=
jar
self
.
manager
=
jar
self
.
objects
=
[]
self
.
objects
=
[]
...
@@ -548,6 +548,7 @@ class MultiObjectResourceAdapter(object):
...
@@ -548,6 +548,7 @@ class MultiObjectResourceAdapter(object):
finally
:
finally
:
del
t
,
v
,
tb
del
t
,
v
,
tb
def
rm_key
(
rm
):
def
rm_key
(
rm
):
func
=
getattr
(
rm
,
'sortKey'
,
None
)
func
=
getattr
(
rm
,
'sortKey'
,
None
)
if
func
is
not
None
:
if
func
is
not
None
:
...
@@ -581,6 +582,7 @@ def oid_repr(oid):
...
@@ -581,6 +582,7 @@ def oid_repr(oid):
else
:
else
:
return
repr
(
oid
)
return
repr
(
oid
)
# TODO: deprecate for 3.6.
# TODO: deprecate for 3.6.
class
DataManagerAdapter
(
object
):
class
DataManagerAdapter
(
object
):
"""Adapt zodb 4-style data managers to zodb3 style
"""Adapt zodb 4-style data managers to zodb3 style
...
@@ -624,6 +626,7 @@ class DataManagerAdapter(object):
...
@@ -624,6 +626,7 @@ class DataManagerAdapter(object):
def
sortKey
(
self
):
def
sortKey
(
self
):
return
self
.
_datamanager
.
sortKey
()
return
self
.
_datamanager
.
sortKey
()
@
implementer
(
interfaces
.
ISavepoint
)
@
implementer
(
interfaces
.
ISavepoint
)
class
Savepoint
:
class
Savepoint
:
"""Transaction savepoint.
"""Transaction savepoint.
...
@@ -666,6 +669,7 @@ class Savepoint:
...
@@ -666,6 +669,7 @@ class Savepoint:
# Mark the transaction as failed.
# Mark the transaction as failed.
transaction
.
_saveAndRaiseCommitishError
()
# reraises!
transaction
.
_saveAndRaiseCommitishError
()
# reraises!
class
AbortSavepoint
:
class
AbortSavepoint
:
def
__init__
(
self
,
datamanager
,
transaction
):
def
__init__
(
self
,
datamanager
,
transaction
):
...
@@ -676,6 +680,7 @@ class AbortSavepoint:
...
@@ -676,6 +680,7 @@ class AbortSavepoint:
self
.
datamanager
.
abort
(
self
.
transaction
)
self
.
datamanager
.
abort
(
self
.
transaction
)
self
.
transaction
.
_unjoin
(
self
.
datamanager
)
self
.
transaction
.
_unjoin
(
self
.
datamanager
)
class
NoRollbackSavepoint
:
class
NoRollbackSavepoint
:
def
__init__
(
self
,
datamanager
):
def
__init__
(
self
,
datamanager
):
...
...
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