Skip to content

Commit 53b87e8

Browse files
committed
Release 0.4.0
1 parent dfe04bf commit 53b87e8

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,17 @@ with connect(
3535
results = curr.fetchall()
3636
print(results)
3737
```
38+
39+
The `Cursor` also supports the context manager protocol, so you can use
40+
it within a `with` statement when needed:
41+
42+
```python
43+
with connect(...) as conn:
44+
with conn.cursor() as curr:
45+
curr.execute(...)
46+
results = curr.fetchall()
47+
```
48+
49+
It also implements the `close()` method, as suggested by the PEP-2049
50+
specification, to support situations where the cursor is wrapped in a
51+
`contextmanager.closing()`.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "wherobots-python-dbapi"
3-
version = "0.3.1"
3+
version = "0.4.0"
44
description = "Python DB-API driver for Wherobots DB"
55
authors = ["Maxime Petazzoni <max@wherobots.com>"]
66
license = "Apache 2.0"

0 commit comments

Comments
 (0)