Skip to content

Commit

Permalink
Merge branch 'wbolster:main' into CI
Browse files Browse the repository at this point in the history
  • Loading branch information
liviaerxin authored Apr 6, 2024
2 parents 1d236ba + 7395215 commit 1f0b8dd
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
version: "2"

build:
os: "ubuntu-22.04"
tools:
python: "3.12"

sphinx:
configuration: doc/conf.py
12 changes: 12 additions & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
Version history
===============

Plyvel 1.5.1
============

Release date: 2024-01-15

* Add Python 3.12 support

* Rebuild Linux wheels, including Python 3.12 wheels.

* Allow using plyvel.DB as a context manager
(`pr #151 <https://github.com/wbolster/plyvel/pull/151>`_)

Plyvel 1.5.0
============

Expand Down
5 changes: 5 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ LevelDB database.

Most arguments are optional; only the database name is required.

Instances of this class can be used as context managers
(Python's ``with`` block). When the ``with`` block terminates,
the database automatically closes without an explicit call to
:py:meth:`DB.close`.

See the descriptions for :cpp:class:`DB`, :cpp:func:`DB::Open`,
:cpp:class:`Cache`, :cpp:class:`FilterPolicy`, and :cpp:class:`Comparator`
in the LevelDB C++ API for more information.
Expand Down
7 changes: 7 additions & 0 deletions doc/user.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ To close the database we just opened, use :py:meth:`DB.close` and inspect the
>>> db.closed
True

:py:class:`DB` instances can also be used as context managers, which
will cause the database to close itself at the end of the ``with``
block::

with plyvel.DB('/tmp/testdb/') as db:
...

Alternatively, you can just delete the variable that points to it, but this
might not close the database immediately, e.g. because active iterators are
using it::
Expand Down
2 changes: 1 addition & 1 deletion plyvel/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# Note: don't add any non-trivial logic here; this file is also loaded
# from setup.py file when the module has not yet been compiled!

__version__ = '1.5.0'
__version__ = '1.5.1'
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
pytest>=3.6
pytest-cov
setuptools
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist = py310, py39, py38, py37
envlist = py312, py311, py310, py39, py38, py37

[testenv]
deps = -rrequirements-test.txt
commands = make test
whitelist_externals = make
allowlist_externals = make

0 comments on commit 1f0b8dd

Please sign in to comment.