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.

DESCRIPTION.rst 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. =======================================
  2. ZODB, a Python object-oriented database
  3. =======================================
  4. .. image:: https://img.shields.io/pypi/v/ZODB.svg
  5. :target: https://pypi.python.org/pypi/ZODB/
  6. :alt: Latest release
  7. .. image:: https://img.shields.io/pypi/pyversions/ZODB.svg
  8. :target: https://pypi.org/project/ZODB/
  9. :alt: Supported Python versions
  10. .. image:: https://travis-ci.org/zopefoundation/ZODB.svg?branch=master
  11. :target: https://travis-ci.org/zopefoundation/ZODB
  12. :alt: Build status
  13. .. image:: https://coveralls.io/repos/github/zopefoundation/ZODB/badge.svg
  14. :target: https://coveralls.io/github/zopefoundation/ZODB
  15. :alt: Coverage status
  16. .. image:: https://readthedocs.org/projects/zodb/badge/?version=latest
  17. :target: https://zodb.readthedocs.io/en/latest/
  18. :alt: Documentation status
  19. ZODB provides an object-oriented database for Python that provides a
  20. high-degree of transparency. ZODB runs on Python 2.7 or Python 3.4 and
  21. above. It also runs on PyPy.
  22. - no separate language for database operations
  23. - very little impact on your code to make objects persistent
  24. - no database mapper that partially hides the database.
  25. Using an object-relational mapping **is not** like using an
  26. object-oriented database.
  27. - almost no seam between code and database.
  28. ZODB is an ACID Transactional database.
  29. To learn more, visit: http://www.zodb.org
  30. The github repository is: at https://github.com/zopefoundation/zodb
  31. If you're interested in contributing to ZODB itself, see the
  32. `developer notes
  33. <https://github.com/zopefoundation/ZODB/blob/master/DEVELOPERS.rst>`_.
  34. ================
  35. Change History
  36. ================
  37. 5.5.0 (2018-10-13)
  38. ==================
  39. - Add support for Python 3.7.
  40. - Bump the dependency on zodbpickle to at least 1.0.1. This is
  41. required to avoid a memory leak on Python 2.7. See `issue 203
  42. <https://github.com/zopefoundation/ZODB/issues/203>`_.
  43. - Bump the dependency on persistent to at least 4.4.0.
  44. - Make the internal support functions for dealing with OIDs (``p64``
  45. and ``u64``) somewhat faster and raise more informative
  46. exceptions on certain types of bad input. See `issue 216
  47. <https://github.com/zopefoundation/ZODB/issues/216>`_.
  48. - Remove support for ``python setup.py test``. It hadn't been working
  49. for some time. See `issue #218
  50. <https://github.com/zopefoundation/ZODB/issues/218>`_.
  51. - Make the tests run faster by avoiding calls to ``time.sleep()``.
  52. 5.4.0 (2018-03-26)
  53. ==================
  54. - ZODB now uses pickle protocol 3 for both Python 2 and Python 3.
  55. (Previously, protocol 2 was used for Python 2.)
  56. The zodbpickle package provides a `zodbpickle.binary` string type
  57. that should be used in Python 2 to cause binary strings to be saved
  58. in a pickle binary format, so they can be loaded correctly in
  59. Python 3. Pickle protocol 3 is needed for this to work correctly.
  60. - Object identifiers in persistent references are saved as
  61. `zodbpickle.binary` strings in Python 2, so that they are loaded
  62. correctly in Python 3.
  63. - If an object is missing from the index while packing a ``FileStorage``,
  64. report its full ``oid``.
  65. - Storage imports are a bit faster.
  66. - Storages can be important from non-seekable sources, like
  67. file-wrapped pipes.
  68. 5.3.0 (2017-08-30)
  69. ==================
  70. - Add support for Python 3.6.
  71. - Drop support for Python 3.3.
  72. - Ensure that the ``HistoricalStorageAdapter`` forwards the ``release`` method to
  73. its base instance. See `issue 78 <https://github.com/zopefoundation/ZODB/issues/788>`_.
  74. - Use a higher pickle protocol (2) for serializing objects on Python
  75. 2; previously protocol 1 was used. This is *much* more efficient for
  76. new-style classes (all persistent objects are new-style), at the
  77. cost of being very slightly less efficient for old-style classes.
  78. .. note:: On Python 2, this will now allow open ``file`` objects
  79. (but **not** open blobs or sockets) to be pickled (loading
  80. the object will result in a closed file); previously this
  81. would result in a ``TypeError``. Doing so is not
  82. recommended as they cannot be loaded in Python 3.
  83. See `issue 179 <https://github.com/zopefoundation/ZODB/pull/179>`_.
  84. 5.2.4 (2017-05-17)
  85. ==================
  86. - ``DB.close`` now explicitly frees internal resources. This is
  87. helpful to avoid false positives in tests that check for leaks.
  88. - Optimize getting the path to a blob file. See
  89. `issue 161 <https://github.com/zopefoundation/ZODB/pull/161>`_.
  90. - All classes are new-style classes on Python 2 (they were already
  91. new-style on Python 3). This improves performance on PyPy. See
  92. `issue 160 <https://github.com/zopefoundation/ZODB/pull/160>`_.
  93. 5.2.3 (2017-04-11)
  94. ==================
  95. - Fix an import error. See `issue 158 <https://github.com/zopefoundation/ZODB/issues/158>`_.
  96. 5.2.2 (2017-04-11)
  97. ==================
  98. - Fixed: A blob misfeature set blob permissions so that blobs and blob
  99. directories were only readable by the database process owner, rather
  100. than honoring user-controlled permissions (e.g. ``umask``).
  101. See `issue 155 <https://github.com/zopefoundation/ZODB/issues/155>`_.
  102. 5.2.1 (2017-04-08)
  103. ==================
  104. - Fixed: When opening FileStorages in read-only mode, non-existent
  105. files were silently created. Creating a read-only file-storage
  106. against a non-existent file errors.
  107. 5.2.0 (2017-02-09)
  108. ==================
  109. - Call new afterCompletion API on storages to allow them to free
  110. resources after transaction complete.
  111. See `issue 147 <https://github.com/zodb/relstorage/issues/147>`__.
  112. - Take advantage of the new transaction-manager explicit mode to avoid
  113. starting transactions unnecessarily when transactions end.
  114. - ``Connection.new_oid`` delegates to its storage, not the DB. This is
  115. helpful for improving concurrency in MVCC storages like RelStorage.
  116. See `issue 139 <https://github.com/zopefoundation/ZODB/issues/139>`_.
  117. - ``persistent`` is no longer required at setup time.
  118. See `issue 119 <https://github.com/zopefoundation/ZODB/issues/119>`_.
  119. - ``Connection.close`` and ``Connection.open`` no longer race on
  120. ``self.transaction_manager``, which could lead to
  121. ``AttributeError``. This was a bug introduced in 5.0.1. See `issue
  122. 142 <https://github.com/zopefoundation/ZODB/pull/143>`_.
  123. 5.1.1 (2016-11-18)
  124. ==================
  125. - Fixed: ``ZODB.Connection.TransactionMetaData`` didn't support custom data
  126. storage that some storages rely on.
  127. 5.1.0 (2016-11-17)
  128. ==================
  129. - ZODB now translates transaction meta data, ``user`` and
  130. ``description`` from text to bytes before passing them to storages,
  131. and converts them back to text when retrieving them from storages in
  132. the ``history``, ``undoLog`` and ``undoInfo`` methods.
  133. The ``IDatabase`` interface was updated to reflect that ``history``,
  134. ``undoLog`` and ``undoInfo`` are available on database objects.
  135. (They were always available, but not documented in the interface.)
  136. 5.0.1 (2016-11-17)
  137. ==================
  138. - Fix an AttributeError that DemoStorage could raise if it was asked
  139. to store a blob into a temporary changes before reading a blob. See
  140. `issue 103 <https://github.com/zopefoundation/ZODB/issues/103>`_.
  141. - Call _p_resolveConflict() even if a conflicting change doesn't change the
  142. state. This reverts to the behaviour of 3.10.3 and older.
  143. - Closing a Connection now reverts its ``transaction_manager`` to
  144. None. This helps prevent errors and release resources when the
  145. ``transaction_manager`` was the (default) thread-local manager. See
  146. `issue 114 <https://github.com/zopefoundation/ZODB/issues/114>`_.
  147. - Many docstrings have been improved.
  148. 5.0.0 (2016-09-06)
  149. ==================
  150. Major internal improvements and cleanups plus:
  151. - Added a connection ``prefetch`` method that can be used to request
  152. that a storage prefetch data an application will need::
  153. conn.prefetch(obj, ...)
  154. Where arguments can be objects, object ids, or iterables of objects
  155. or object ids.
  156. Added optional ``prefetch`` methods to the storage APIs. If a
  157. storage doesn't support prefetch, then the connection prefetch
  158. method is a noop.
  159. - fstail: print the txn offset and header size, instead of only the data offset.
  160. fstail can now be used to truncate a DB at the right offset.
  161. - Drop support for old commit protocol. All of the build-in storages
  162. implement the new protocol. This new protocol allows storages to
  163. provide better write performance by allowing multiple commits to
  164. execute in parallel.
  165. 5.0.0b1 (2016-08-04)
  166. ====================
  167. - fstail: print the txn offset and header size, instead of only the data offset.
  168. fstail can now be used to truncate a DB at the right offset.
  169. Numerous internal cleanups, including:
  170. - Changed the way the root object was created. Now the root object is
  171. created using a database connection, rather than by making low-level
  172. storage calls.
  173. - Drop support for the old commit protocol.
  174. - Internal FileStorage-undo fixes that should allow undo in some cases
  175. where it didn't work before.
  176. - Drop the ``version`` argument to some methods where it was the last
  177. argument and optional.
  178. 5.0.0a6 (2016-07-21)
  179. ====================
  180. - Added a connection ``prefetch`` method that can be used to request
  181. that a storage prefect data an application will need::
  182. conn.prefetch(obj, ...)
  183. Where arguments can be objects, object ids, or iterables of objects
  184. or object ids.
  185. Added optional ``prefetch`` methods to the storage APIs. If a
  186. storage doesn't support prefetch, then the connection prefetch
  187. method is a noop.
  188. 5.0.0a5 (2016-07-06)
  189. ====================
  190. Drop support for old commit protocol. All of the build-in storages
  191. implement the new protocol. This new protocol allows storages to
  192. provide better write performance by allowing multiple commits to
  193. execute in parallel.
  194. 5.0.0a4 (2016-07-05)
  195. ====================
  196. See 4.4.2.
  197. 5.0.0a3 (2016-07-01)
  198. ====================
  199. See 4.4.1.
  200. 5.0.0a2 (2016-07-01)
  201. ====================
  202. See 4.4.0.
  203. 5.0.0a1 (2016-06-20)
  204. ====================
  205. Major **internal** implementation changes to the Multi Version
  206. Concurrency Control (MVCC) implementation:
  207. - For storages that implement IMVCCStorage (RelStorage), no longer
  208. implement MVCC in ZODB.
  209. - For other storages, MVCC is implemented using an additional storage
  210. layer. This underlying layer works by calling ``loadBefore``. The
  211. low-level storage ``load`` method isn't used any more.
  212. This change allows server-based storages like ZEO and NEO to be
  213. implemented more simply and cleanly.
  214. 4.4.3 (2016-08-04)
  215. ==================
  216. - Internal FileStorage-undo fixes that should allow undo in some cases
  217. where it didn't work before.
  218. - fstail: print the txn offset and header size, instead of only the data offset.
  219. fstail can now be used to truncate a DB at the right offset.
  220. 4.4.2 (2016-07-08)
  221. ==================
  222. Better support of the new commit protocol. This fixes issues with blobs and
  223. undo. See pull requests #77, #80, #83
  224. 4.4.1 (2016-07-01)
  225. ==================
  226. Added IMultiCommitStorage to directly represent the changes in the 4.4.0
  227. release and to make complient storages introspectable.
  228. 4.4.0 (2016-06-30)
  229. ==================
  230. This release begins evolution to a more effcient commit protocol that
  231. allows storage implementations, like `NEO <http://www.neoppod.org/>`_,
  232. to support multiple transactions committing at the same time, for
  233. greater write parallelism.
  234. This release updates IStorage:
  235. - The committed transaction's ID is returned by ``tpc_finish``, rather
  236. than being returned in response store and tpc_vote results.
  237. - ``tpc_vote`` is now expected to return ``None`` or a list of object
  238. ids for objects for which conflicts were resolved.
  239. This release works with storages that implemented the older version of
  240. the storage interface, but also supports storages that implement the
  241. updated interface.
  242. 4.3.1 (2016-06-06)
  243. ==================
  244. - Fixed: FileStorage loadBefore didn't handle deleted/undone data correctly.
  245. 4.3.0 (2016-05-31)
  246. ==================
  247. - Drop support for Python 2.6 and 3.2.
  248. - Make the ``zodbpickle`` dependency required and not conditional.
  249. This fixes various packaging issues involving pip and its wheel
  250. cache. zodbpickle was only optional under Python 2.6 so this change
  251. only impacts users of that version. See
  252. https://github.com/zopefoundation/ZODB/pull/42.
  253. - Add support for Python 3.5.
  254. - Avoid failure during cleanup of nested databases that provide MVCC
  255. on storage level (Relstorage).
  256. https://github.com/zopefoundation/ZODB/issues/45
  257. - Remove useless dependency to `zdaemon` in setup.py. Remove ZEO documentation.
  258. Both were leftovers from the time where ZEO was part of this repository.
  259. - Fix possible data corruption after FileStorage is truncated to roll back a
  260. transaction.
  261. https://github.com/zopefoundation/ZODB/pull/52
  262. - DemoStorage: add support for conflict resolution and fix history()
  263. https://github.com/zopefoundation/ZODB/pull/58
  264. - Fixed a test that depended on implementation-specific behavior in tpc_finish
  265. 4.2.0 (2015-06-02)
  266. ==================
  267. - Declare conditional dependencies using PEP-426 environment markers
  268. (fixing interation between pip 7's wheel cache and tox). See
  269. https://github.com/zopefoundation/ZODB/issues/36.
  270. 4.2.0b1 (2015-05-22)
  271. ====================
  272. - Log failed conflict resolution attempts at ``DEBUG`` level. See:
  273. https://github.com/zopefoundation/ZODB/pull/29.
  274. - Fix command-line parsing of ``--verbose`` and ``--verify`` arguments.
  275. (The short versions, ``-v`` and ``-V``, were parsed correctly.)
  276. - Add support for PyPy.
  277. - Fix the methods in ``ZODB.serialize`` that find object references
  278. under Python 2.7 (used in scripts like ``referrers``, ``netspace``,
  279. and ``fsrecover`` among others). This requires the addition of the
  280. ``zodbpickle`` dependency.
  281. - FileStorage: fix an edge case when disk space runs out while packing,
  282. do not leave the ``.pack`` file around. That would block any write to the
  283. to-be-packed ``Data.fs``, because the disk would stay at 0 bytes free.
  284. See https://github.com/zopefoundation/ZODB/pull/21.
  285. 4.1.0 (2015-01-11)
  286. ==================
  287. - Fix registration of custom logging level names ("BLATHER", "TRACE").
  288. We have been registering them in the wrong order since 2004. Before
  289. Python 3.4, the stdlib ``logging`` module masked the error by registering
  290. them in *both* directions.
  291. - Add support for Python 3.4.
  292. 4.0.1 (2014-07-13)
  293. ==================
  294. - Fix ``POSKeyError`` during ``transaction.commit`` when after
  295. ``savepoint.rollback``. See
  296. https://github.com/zopefoundation/ZODB/issues/16
  297. - Ensure that the pickler used in PyPy always has a ``persistent_id``
  298. attribute (``inst_persistent_id`` is not present on the pure-Python
  299. pickler). (PR #17)
  300. - Provide better error reporting when trying to load an object on a
  301. closed connection.
  302. 4.0.0 (2013-08-18)
  303. ==================
  304. Finally released.
  305. 4.0.0b3 (2013-06-11)
  306. ====================
  307. - Switch to using non-backward-compatible pickles (protocol 3, without
  308. storing bytes as strings) under Python 3. Updated the magic number
  309. for file-storage files under Python3 to indicate the incompatibility.
  310. - Fixed: A ``UnicodeDecodeError`` could happen for non-ASCII OIDs
  311. when using bushy blob layout.
  312. 4.0.0b2 (2013-05-14)
  313. ====================
  314. - Extended the filename renormalizer used for blob doctests to support
  315. the filenames used by ZEO in non-shared mode.
  316. - Added ``url`` parameter to ``setup()`` (PyPI says it is required).
  317. 4.0.0b1 (2013-05-10)
  318. =====================
  319. - Skipped non-unit tests in ``setup.py test``. Use the buildout to run tests
  320. requiring "layer" support.
  321. - Included the filename in the exception message to support debugging in case
  322. ``loadBlob`` does not find the file.
  323. - Added support for Python 3.2 / 3.3.
  324. .. note::
  325. ZODB 4.0.x is supported on Python 3.x for *new* applications only.
  326. Due to changes in the standard library's pickle support, the Python3
  327. support does **not** provide forward- or backward-compatibility
  328. at the data level with Python2. A future version of ZODB may add
  329. such support.
  330. Applications which need migrate data from Python2 to Python3 should
  331. plan to script this migration using separte databases, e.g. via a
  332. "dump-and-reload" approach, or by providing explicit fix-ups of the
  333. pickled values as transactions are copied between storages.
  334. 4.0.0a4 (2012-12-17)
  335. =====================
  336. - Enforced usage of bytes for ``_p_serial`` of persistent objects (fixes
  337. compatibility with recent persistent releases).
  338. 4.0.0a3 (2012-12-01)
  339. =====================
  340. - Fixed: An elaborate test for trvial logic corrupted module state in a
  341. way that made other tests fail spuriously.
  342. 4.0.0a2 (2012-11-13)
  343. =====================
  344. Bugs Fixed
  345. ----------
  346. - An unneeded left-over setting in setup.py caused installation with
  347. pip to fail.
  348. 4.0.0a1 (2012-11-07)
  349. =====================
  350. New Features
  351. ------------
  352. - The ``persistent`` and ``BTrees`` packages are now released as separate
  353. distributions, on which ZODB now depends.
  354. - ZODB no longer depends on zope.event. It now uses ZODB.event, which
  355. uses zope.event if it is installed. You can override
  356. ZODB.event.notify to provide your own event handling, although
  357. zope.event is recommended.
  358. - BTrees allowed object keys with insane comparison. (Comparison
  359. inherited from object, which compares based on in-process address.)
  360. Now BTrees raise TypeError if an attempt is made to save a key with
  361. comparison inherited from object. (This doesn't apply to old-style
  362. class instances.)
  363. Bugs Fixed
  364. ----------
  365. - Ensured that the export file and index file created by ``repozo`` share
  366. the same timestamp.
  367. https://bugs.launchpad.net/zodb/+bug/993350
  368. - Pinned the ``transaction`` and ``manuel`` dependencies to Python 2.5-
  369. compatible versions when installing under Python 2.5.
  370. .. note::
  371. Please see https://github.com/zopefoundation/ZODB/blob/master/HISTORY.rst
  372. for older versions of ZODB.