Relstorage

Latest version: v4.1.1

Safety actively analyzes 701671 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 14

2.0.0b6

Not secure
====================

- Use ``setuptools.find_packages`` and ``include_package_data`` to
ensure wheels have all the files necessary. This corrects an issue
with the 2.0.0b5 release on PyPI. See :issue:`121` by Carlos Sanchez.

2.0.0b5

Not secure
====================

- Supporting new databases should be simpler due to a code
restructuring. Note that many internal implementation classes have
moved or been renamed.
- The umysqldb support handles query transformations more efficiently.
- umysqldb now raises a more informative error when the server sends
too large a packet.

.. note:: If you receive "Socket receive buffer full" errors, you
are likely experiencing `this issue <https://github.com/esnme/ultramysql/issues/34>`_ in ultramysql and
will need a patched version, such as the one provided in
`this pull request
<https://github.com/esnme/ultramysql/pull/61>`_.
- The local persistent cache file format has been changed to improve
reading and writing speed. Old files will be cleaned up
automatically. Users of the default settings could see improvements
of up to 3x or more on reading and writing.
- Compression of local persistent cache files has been disabled by
default (but there is still an option to turn it back on).
Operational experience showed that it didn't actually save that much
disk space, while substantially slowing down the reading and writing
process (2-4x).
- Add an option, ``cache-local-dir-read-count`` to limit the maximum
number of persistent local cache files will be used to populate a
storages's cache. This can be useful to reduce startup time if cache
files are large and workers have mostly similar caches.

2.0.0b4

Not secure
====================

- Add experimental support for umysqldb as a MySQL driver for Python
2.7. This is a gevent-compatible driver implemented in C for speed.
Note that it may not be able to store large objects (it has been
observed to fail for a 16M object---it hardcodes a
``max_allowed_packet`` of exactly 16MB for read and write buffers),
and has been observed to have some other stability issues.

2.0.0b3

Not secure
====================

- Add support for ZODB 5. RelStorage continues to run on ZODB 4 >=
4.4.2.
- Add support for tooling to help understand RelStorage cache
behaviour. This can help tune cache sizes and the choice to use
Memcached or not. See :issue:`106` and :pr:`108`.
- Fix a threading issue with certain database drivers.

2.0.0b2

Not secure
====================

Breaking Changes
----------------

- Support for cx_Oracle versions older than 5.0 has been dropped. 5.0
was released in 2008.

- Support for PostgreSQL 8.1 and earlier has been dropped. 8.2 is
likely to still work, but 9.0 or above is recommended. 8.2 was
released in 2006 and is no longer supported by upstream. The oldest
version still supported by upstream is 9.1, released in 2011.


Platform Support
----------------

- Using ZODB >= 4.4.2 (*but not 5.0*) is recommended to avoid
deprecation warnings due to the introduction of a new storage
protocol. The next major release of RelStorage will require ZODB
4.4.2 or above and should work with ZODB 5.0.

- Change the recommended and tested MySQL client for Python 2.7 away
from the unmaintained MySQL-python to the maintained mysqlclient
(the same one used by Python 3).

- PyMySQL now works and is tested on Python 3.

- A pure-Python PostgreSQL driver, pg8000, now works and is tested on
all platforms. This is a gevent-compatible driver. Note that it
requires a PostgreSQL 9.4 server or above for BLOB support.

- Support explicitly specifying the database driver to use. This can
be important when there is a large performance difference between
drivers, and more than one might be installed. (Also, RelStorage no
longer has the side-effect of registering ``PyMySQL`` as ``MySQLdb`` and
``psycopg2cffi`` as ``psycopg2``.) See :issue:`86`.


Bug Fixes
---------

- Memcache connections are explicitly released instead of waiting for
GC to do it for us. This is especially important with PyPy and/or
``python-memcached``. See :issue:`80`.

- The ``poll-interval`` option is now ignored and polling is performed
when the ZODB Connection requests it (at transaction boundaries).
Experience with delayed polling has shown it typically to do more
harm than good, including introducing additional possibilities for
error and leading to database performance issues. It is expected
that most sites won't notice any performance difference. A larger
discussion can be found in :issue:`87`.

Performance
-----------

- Support a persistent on-disk cache. This can greatly speed up
application warmup after a restart (such as when deploying new code).
Some synthetic benchmarks show an 8-10x improvement. See :issue:`92`
for a discussion, and see the options ``cache-local-dir`` and
``cache-local-dir-count``.

- Instances of :class:`.RelStorage` no longer use threading locks by
default and hence are not thread safe. A ZODB :class:`Connection
<ZODB.interfaces.IConnection>` is documented as not being
thread-safe and must be used only by a single thread at a time.
Because RelStorage natively implements MVCC, each Connection has a
unique storage object. It follows that the storage object is used
only by a single thread. Using locks just adds unneeded overhead to
the common case. If this is a breaking change for you, please open
an issue. See :pr:`91`.

- MySQL uses (what should be) a slightly more efficient poll query.
See :issue:`89`.

- The in-memory cache allows for higher levels of concurrent
operation via finer-grained locks. For example, compression and
decompression are no longer done while holding a lock.

- The in-memory cache now uses a better approximation of a LRU
algorithm with less overhead, so more data should fit in the same
size cache. (For best performance, CFFI should be installed; a
warning is generated if that is not the case.)

- The in-memory cache is now smart enough not to store compressed
objects that grow during compression, and it uses the same
compression markers as zc.zlibstorage to avoid double-compression.
It can also gracefully handle changes to the compression format in
persistent files.

2.0.0b1

Not secure
====================

Breaking Changes
----------------

- Update the ZODB dependency from ZODB3 3.7.0 to ZODB 4.3.1. Support
for ZODB older than 3.10 has been removed; ZODB 3.10 may work, but
only ZODB 4.3 is tested.

- Remove support for Python 2.6 and below. Python 2.7 is now required.

Platform Support
----------------

- Add support for PyPy on MySQL and PostgreSQL using PyMySQL and
psycopg2cffi respectively. PyPy can be substantially faster than
CPython in some scenarios; see :pr:`23`.

- Add initial support for Python 3.4+ for MySQL (using mysqlclient), PostgreSQL,
and Oracle.

Bug Fixes
---------

- Fixed ``loadBefore`` of a deleted/undone object to correctly raise a
POSKeyError instead of returning an empty state. (Revealed by
updated tests for FileStorage in ZODB 4.3.1.)

- Oracle: Packing should no longer produce LOB errors. This partially
reverts the speedups in 1.6.0b2. Reported in :issue:`30` by Peter
Jacobs.

- :meth:`.RelStorage.registerDB` and :meth:`.RelStorage.new_instance`
now work with storage wrappers like zc.zlibstorage. See :issue:`70`
and :issue:`71`.

Included Utilities
------------------

- zodbconvert: The ``--incremental`` option is supported with a
FileStorage (or any storage that implements
``IStorage.lastTransaction()``) as a destination, not just
RelStorages.

- zodbconvert: The ``--incremental`` option works correctly with a
RelStorage as a destination. See :pr:`22`. With contributions by
Sylvain Viollon, Mauro Amico, and Peter Jacobs. Originally reported
by Jan-Wijbrand Kolman.

- PostgreSQL: ``zodbconvert --clear`` should be much faster when the
destination is a PostgreSQL schema containing lots of data. *NOTE*:
There can be no other open RelStorage connections to the destination,
or any PostgreSQL connection in general that might be holding locks
on the RelStorage tables, or ``zodbconvert`` will block indefinitely
waiting for the locks to be released. Partial fix for :issue:`16`
reported by Chris McDonough.

- ``zodbconvert`` and ``zodbpack`` use :mod:`argparse` instead of
:mod:`optparse` for command line handling.

Performance
-----------

- MySQL: Use the "binary" character set to avoid producing "Invalid
utf8 character string" warnings. See :issue:`57`.

- Conflict resolution uses the locally cached state instead of
re-reading it from the database (they are guaranteed to be the
same). See :issue:`38`.

- Conflict resolution reads all conflicts from the database in one
query, instead of querying for each individual conflict. See
:issue:`39`.

- PostgreSQL no longer encodes and decodes object state in Base64
during database communication thanks to database driver
improvements. This should reduce network overhead and CPU usage for
both the RelStorage client and the database server. psycopg2 2.4.1
or above is required; 2.6.1 or above is recommended. (Or
psycopg2cffi 2.7.4.)

- PostgreSQL 9.3: Support ``commit-lock-timeout``. Contributed in :pr:`20`
by Sean Upton.


Other Enhancements
------------------

- Raise a specific exception when acquiring the commit lock
(:exc:`~relstorage.adapters.interfaces.UnableToAcquireCommitLockError`) or pack
lock (:exc:`~relstorage.adapters.interfaces.UnableToAcquirePackUndoLockError`)
fails. See :pr:`18`.

- ``RelStorage.lastTransaction()`` is more consistent with FileStorage
and ClientStorage, returning a useful value in more cases.

- Oracle: Add support for getting the database size. Contributed in
:pr:`21` by Mauro Amico.

- Support :class:`ZODB.interfaces.IExternalGC` for history-free
databases, allowing multi-database garbage collection with
``zc.zodbdgc``. See :issue:`47`.

Project Details
---------------

- Travis CI is now used to run RelStorage tests against MySQL and
PostgreSQL on every push and pull request. CPython 2 and 3 and PyPy
are all tested with the recommended database drivers.

- Documentation has been reorganized and moved to `readthedocs
<http://relstorage.readthedocs.io>`_.

- Updated the buildout configuration to just run relstorage tests and
to select which databases to use at build time.

Page 10 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.