Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"""
from zope.interface import Interface
from zope.interface import Attribute
from persistent._compat import use_c_impl
# Allowed values for _p_state. Use the C constants if available (which
# are defined in cPersistence --- there is no cInterfaces --- so we
# need to pass the corresponding ``mod_name``), otherwise define some
# values here.
GHOST = use_c_impl(-1, 'GHOST', mod_name='persistent.persistence')
UPTODATE = use_c_impl(0, 'UPTODATE', mod_name='persistent.persistence')
CHANGED = use_c_impl(1, 'CHANGED', mod_name='persistent.persistence')
STICKY = use_c_impl(2, 'STICKY', mod_name='persistent.persistence')
OID_TYPE = SERIAL_TYPE = bytes
class IPersistent(Interface):
"""Python persistent interface
A persistent object can be in one of several states:
- Unsaved
The object has been created but not saved in a data manager.
In this state, the _p_changed attribute is non-None and false
and the _p_jar attribute is None.
##############################################################################
"""Persistence Interfaces
"""
from zope.interface import Interface
from zope.interface import Attribute
from persistent._compat import use_c_impl
# Allowed values for _p_state. Use the C constants if available (which
# are defined in cPersistence --- there is no cInterfaces --- so we
# need to pass the corresponding ``mod_name``), otherwise define some
# values here.
GHOST = use_c_impl(-1, 'GHOST', mod_name='persistent.persistence')
UPTODATE = use_c_impl(0, 'UPTODATE', mod_name='persistent.persistence')
CHANGED = use_c_impl(1, 'CHANGED', mod_name='persistent.persistence')
STICKY = use_c_impl(2, 'STICKY', mod_name='persistent.persistence')
OID_TYPE = SERIAL_TYPE = bytes
class IPersistent(Interface):
"""Python persistent interface
A persistent object can be in one of several states:
- Unsaved
The object has been created but not saved in a data manager.
In this state, the _p_changed attribute is non-None and false
"""Persistence Interfaces
"""
from zope.interface import Interface
from zope.interface import Attribute
from persistent._compat import use_c_impl
# Allowed values for _p_state. Use the C constants if available (which
# are defined in cPersistence --- there is no cInterfaces --- so we
# need to pass the corresponding ``mod_name``), otherwise define some
# values here.
GHOST = use_c_impl(-1, 'GHOST', mod_name='persistent.persistence')
UPTODATE = use_c_impl(0, 'UPTODATE', mod_name='persistent.persistence')
CHANGED = use_c_impl(1, 'CHANGED', mod_name='persistent.persistence')
STICKY = use_c_impl(2, 'STICKY', mod_name='persistent.persistence')
OID_TYPE = SERIAL_TYPE = bytes
class IPersistent(Interface):
"""Python persistent interface
A persistent object can be in one of several states:
- Unsaved
The object has been created but not saved in a data manager.
In this state, the _p_changed attribute is non-None and false
and the _p_jar attribute is None.
#
##############################################################################
"""Persistence Interfaces
"""
from zope.interface import Interface
from zope.interface import Attribute
from persistent._compat import use_c_impl
# Allowed values for _p_state. Use the C constants if available (which
# are defined in cPersistence --- there is no cInterfaces --- so we
# need to pass the corresponding ``mod_name``), otherwise define some
# values here.
GHOST = use_c_impl(-1, 'GHOST', mod_name='persistent.persistence')
UPTODATE = use_c_impl(0, 'UPTODATE', mod_name='persistent.persistence')
CHANGED = use_c_impl(1, 'CHANGED', mod_name='persistent.persistence')
STICKY = use_c_impl(2, 'STICKY', mod_name='persistent.persistence')
OID_TYPE = SERIAL_TYPE = bytes
class IPersistent(Interface):
"""Python persistent interface
A persistent object can be in one of several states:
- Unsaved
The object has been created but not saved in a data manager.