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
3c80054a
Commit
3c80054a
authored
May 17, 2012
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace deprecated class adviser ('zope.interface.implements').
Use instead the decorator ('zope.interface.implementer').
parent
bcabef29
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
33 additions
and
33 deletions
+33
-33
src/BTrees/__init__.py
src/BTrees/__init__.py
+1
-1
src/ZODB/BaseStorage.py
src/ZODB/BaseStorage.py
+2
-2
src/ZODB/ConflictResolution.py
src/ZODB/ConflictResolution.py
+1
-1
src/ZODB/Connection.py
src/ZODB/Connection.py
+7
-7
src/ZODB/DB.py
src/ZODB/DB.py
+2
-2
src/ZODB/DemoStorage.py
src/ZODB/DemoStorage.py
+3
-3
src/ZODB/FileStorage/FileStorage.py
src/ZODB/FileStorage/FileStorage.py
+8
-8
src/ZODB/MappingStorage.py
src/ZODB/MappingStorage.py
+3
-3
src/ZODB/blob.py
src/ZODB/blob.py
+2
-2
src/ZODB/broken.py
src/ZODB/broken.py
+1
-1
src/ZODB/tests/MVCCMappingStorage.py
src/ZODB/tests/MVCCMappingStorage.py
+2
-2
src/ZODB/tests/hexstorage.py
src/ZODB/tests/hexstorage.py
+1
-1
No files found.
src/BTrees/__init__.py
View file @
3c80054a
...
...
@@ -16,8 +16,8 @@ import zope.interface
import
BTrees.Interfaces
@
zope
.
interface
.
implementer
(
BTrees
.
Interfaces
.
IBTreeFamily
)
class
_Family
(
object
):
zope
.
interface
.
implements
(
BTrees
.
Interfaces
.
IBTreeFamily
)
from
BTrees
import
OOBTree
as
OO
...
...
src/ZODB/BaseStorage.py
View file @
3c80054a
...
...
@@ -420,10 +420,10 @@ def checkCurrentSerialInTransaction(self, oid, serial, transaction):
BaseStorage
.
checkCurrentSerialInTransaction
=
checkCurrentSerialInTransaction
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IStorageTransactionInformation
)
class
TransactionRecord
(
object
):
"""Abstract base class for iterator protocol"""
zope
.
interface
.
implements
(
ZODB
.
interfaces
.
IStorageTransactionInformation
)
def
__init__
(
self
,
tid
,
status
,
user
,
description
,
extension
):
self
.
tid
=
tid
...
...
@@ -441,10 +441,10 @@ class TransactionRecord(object):
_extension
=
property
(
fset
=
_ext_set
,
fget
=
_ext_get
)
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IStorageRecordInformation
)
class
DataRecord
(
object
):
"""Abstract base class for iterator protocol"""
zope
.
interface
.
implements
(
ZODB
.
interfaces
.
IStorageRecordInformation
)
version
=
''
...
...
src/ZODB/ConflictResolution.py
View file @
3c80054a
...
...
@@ -112,9 +112,9 @@ class IPersistentReference(zope.interface.Interface):
have two references to the same object that are spelled with different
data (for instance, one with a class and one without).'''
@
zope
.
interface
.
implementer
(
IPersistentReference
)
class
PersistentReference
(
object
):
zope
.
interface
.
implements
(
IPersistentReference
)
weak
=
False
oid
=
database_name
=
klass
=
None
...
...
src/ZODB/Connection.py
View file @
3c80054a
...
...
@@ -34,7 +34,7 @@ from ZODB.blob import Blob, rename_or_copy_blob, remove_committed_dir
from
transaction.interfaces
import
ISavepointDataManager
from
transaction.interfaces
import
IDataManagerSavepoint
from
transaction.interfaces
import
ISynchronizer
from
zope.interface
import
implement
s
from
zope.interface
import
implement
er
import
transaction
...
...
@@ -66,13 +66,13 @@ def resetCaches():
global
global_reset_counter
global_reset_counter
+=
1
@
implementer
(
IConnection
,
ISavepointDataManager
,
IPersistentDataManager
,
ISynchronizer
)
class
Connection
(
ExportImport
,
object
):
"""Connection to ZODB for loading and storing objects."""
implements
(
IConnection
,
ISavepointDataManager
,
IPersistentDataManager
,
ISynchronizer
)
_code_timestamp
=
0
...
...
@@ -1221,9 +1221,9 @@ class Connection(ExportImport, object):
# Savepoint support
#####################################################################
@
implementer
(
IDataManagerSavepoint
)
class
Savepoint
:
implements
(
IDataManagerSavepoint
)
def
__init__
(
self
,
datamanager
,
state
):
self
.
datamanager
=
datamanager
...
...
@@ -1232,10 +1232,10 @@ class Savepoint:
def
rollback
(
self
):
self
.
datamanager
.
_rollback
(
self
.
state
)
@
implementer
(
IBlobStorage
)
class
TmpStore
:
"""A storage-like thing to support savepoints."""
implements
(
IBlobStorage
)
def
__init__
(
self
,
storage
):
self
.
_storage
=
storage
...
...
src/ZODB/DB.py
View file @
3c80054a
...
...
@@ -30,7 +30,7 @@ import ZODB.serialize
import
transaction.weakset
from
zope.interface
import
implement
s
from
zope.interface
import
implement
er
from
ZODB.interfaces
import
IDatabase
from
ZODB.interfaces
import
IMVCCStorage
...
...
@@ -319,6 +319,7 @@ def getTID(at, before):
return
before
@
implementer
(
IDatabase
)
class
DB
(
object
):
"""The Object Database
-------------------
...
...
@@ -359,7 +360,6 @@ class DB(object):
cacheDetailSize, getCacheSize, getHistoricalCacheSize, setCacheSize,
setHistoricalCacheSize
"""
implements
(
IDatabase
)
klass
=
Connection
# Class to use for connections
_activity_monitor
=
next
=
previous
=
None
...
...
src/ZODB/DemoStorage.py
View file @
3c80054a
...
...
@@ -32,12 +32,12 @@ import ZODB.POSException
import
ZODB.utils
import
zope.interface
class
DemoStorage
(
object
):
zope
.
interface
.
implements
(
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IStorage
,
ZODB
.
interfaces
.
IStorageIteration
,
)
class
DemoStorage
(
object
):
def
__init__
(
self
,
name
=
None
,
base
=
None
,
changes
=
None
,
close_base_on_close
=
None
,
close_changes_on_close
=
None
):
...
...
src/ZODB/FileStorage/FileStorage.py
View file @
3c80054a
...
...
@@ -86,14 +86,7 @@ class TempFormatter(FileStorageFormatter):
def
__init__
(
self
,
afile
):
self
.
_file
=
afile
class
FileStorage
(
FileStorageFormatter
,
ZODB
.
blob
.
BlobStorageMixin
,
ConflictResolution
.
ConflictResolvingStorage
,
BaseStorage
.
BaseStorage
,
):
zope
.
interface
.
implements
(
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IStorage
,
ZODB
.
interfaces
.
IStorageRestoreable
,
ZODB
.
interfaces
.
IStorageIteration
,
...
...
@@ -101,6 +94,13 @@ class FileStorage(
ZODB
.
interfaces
.
IStorageCurrentRecordIteration
,
ZODB
.
interfaces
.
IExternalGC
,
)
class
FileStorage
(
FileStorageFormatter
,
ZODB
.
blob
.
BlobStorageMixin
,
ConflictResolution
.
ConflictResolvingStorage
,
BaseStorage
.
BaseStorage
,
):
# Set True while a pack is in progress; undo is blocked for the duration.
_pack_is_in_progress
=
False
...
...
src/ZODB/MappingStorage.py
View file @
3c80054a
...
...
@@ -27,12 +27,12 @@ import ZODB.TimeStamp
import
ZODB.utils
import
zope.interface
class
MappingStorage
(
object
):
zope
.
interface
.
implements
(
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IStorage
,
ZODB
.
interfaces
.
IStorageIteration
,
)
class
MappingStorage
(
object
):
def
__init__
(
self
,
name
=
'MappingStorage'
):
self
.
__name__
=
name
...
...
@@ -351,10 +351,10 @@ class TransactionRecord:
del
self
.
data
[
oid
]
return
not
self
.
data
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IStorageRecordInformation
)
class
DataRecord
(
object
):
"""Abstract base class for iterator protocol"""
zope
.
interface
.
implements
(
ZODB
.
interfaces
.
IStorageRecordInformation
)
version
=
''
data_txn
=
None
...
...
src/ZODB/blob.py
View file @
3c80054a
...
...
@@ -51,10 +51,10 @@ valid_modes = 'r', 'w', 'r+', 'a', 'c'
# via GC in any thread.
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IBlob
)
class
Blob
(
persistent
.
Persistent
):
"""A BLOB supports efficient handling of large data within ZODB."""
zope
.
interface
.
implements
(
ZODB
.
interfaces
.
IBlob
)
_p_blob_uncommitted
=
None
# Filename of the uncommitted (dirty) data
_p_blob_committed
=
None
# Filename of the committed data
...
...
@@ -686,11 +686,11 @@ class BlobStorageMixin(object):
return
self
.
fshelper
.
temp_dir
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IBlobStorage
)
class
BlobStorage
(
BlobStorageMixin
):
"""A wrapper/proxy storage to support blobs.
"""
zope
.
interface
.
implements
(
ZODB
.
interfaces
.
IBlobStorage
)
def
__init__
(
self
,
base_directory
,
storage
,
layout
=
'automatic'
):
assert
not
ZODB
.
interfaces
.
IBlobStorage
.
providedBy
(
storage
)
...
...
src/ZODB/broken.py
View file @
3c80054a
...
...
@@ -25,6 +25,7 @@ import ZODB.interfaces
broken_cache
=
{}
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IBroken
)
class
Broken
(
object
):
"""Broken object base class
...
...
@@ -96,7 +97,6 @@ class Broken(object):
>>> broken_cache.clear()
"""
zope
.
interface
.
implements
(
ZODB
.
interfaces
.
IBroken
)
__Broken_state__
=
__Broken_initargs__
=
None
...
...
src/ZODB/tests/MVCCMappingStorage.py
View file @
3c80054a
...
...
@@ -21,11 +21,11 @@ import ZODB.utils
import
ZODB.POSException
from
ZODB.interfaces
import
IMVCCStorage
from
ZODB.MappingStorage
import
MappingStorage
from
zope.interface
import
implement
s
from
zope.interface
import
implement
er
@
implementer
(
IMVCCStorage
)
class
MVCCMappingStorage
(
MappingStorage
):
implements
(
IMVCCStorage
)
def
__init__
(
self
,
name
=
"MVCC Mapping Storage"
):
MappingStorage
.
__init__
(
self
,
name
=
name
)
...
...
src/ZODB/tests/hexstorage.py
View file @
3c80054a
...
...
@@ -15,9 +15,9 @@ import ZODB.blob
import
ZODB.interfaces
import
zope.interface
@
zope
.
interface
.
implementer
(
ZODB
.
interfaces
.
IStorageWrapper
)
class
HexStorage
(
object
):
zope
.
interface
.
implements
(
ZODB
.
interfaces
.
IStorageWrapper
)
copied_methods
=
(
'close'
,
'getName'
,
'getSize'
,
'history'
,
'isReadOnly'
,
...
...
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