Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 1.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #############################################################################
  2. #
  3. # Copyright (c) 2007 Zope Foundation and Contributors.
  4. # All Rights Reserved.
  5. #
  6. # This software is subject to the provisions of the Zope Public License,
  7. # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
  8. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
  9. # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  10. # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
  11. # FOR A PARTICULAR PURPOSE.
  12. #
  13. #############################################################################
  14. import zope.interface
  15. import BTrees.Interfaces
  16. @zope.interface.implementer(BTrees.Interfaces.IBTreeFamily)
  17. class _Family(object):
  18. from BTrees import OOBTree as OO
  19. class _Family32(_Family):
  20. from BTrees import OIBTree as OI
  21. from BTrees import IIBTree as II
  22. from BTrees import IOBTree as IO
  23. from BTrees import IFBTree as IF
  24. maxint = int(2**31-1)
  25. minint = -maxint - 1
  26. def __reduce__(self):
  27. return _family32, ()
  28. class _Family64(_Family):
  29. from BTrees import OLBTree as OI
  30. from BTrees import LLBTree as II
  31. from BTrees import LOBTree as IO
  32. from BTrees import LFBTree as IF
  33. maxint = 2**63-1
  34. minint = -maxint - 1
  35. def __reduce__(self):
  36. return _family64, ()
  37. def _family32():
  38. return family32
  39. _family32.__safe_for_unpickling__ = True
  40. def _family64():
  41. return family64
  42. _family64.__safe_for_unpickling__ = True
  43. family32 = _Family32()
  44. family64 = _Family64()
  45. BTrees.family64.IO.family = family64
  46. BTrees.family64.OI.family = family64
  47. BTrees.family64.IF.family = family64
  48. BTrees.family64.II.family = family64
  49. BTrees.family32.IO.family = family32
  50. BTrees.family32.OI.family = family32
  51. BTrees.family32.IF.family = family32
  52. BTrees.family32.II.family = family32