Skip to content

Commit

Permalink
Prepare for version 1.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
joerivanruth committed Sep 22, 2023
1 parent 8414606 commit cc67a3b
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 2 deletions.
32 changes: 32 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# 1.7.1

changes since 1.7.0

* Bug fix: let TimeTzFromTicks and TimestampTzFromTicks use the correct time zone

* Feature: add support for the named parameter syntax that will be introduced in
the next major version of MonetDB AFTER Jun2023. (Not Jun2023 itself.)

Example of the named parameters:

```python
import pymonetdb

# classic behavior: paramstyle pyformat
assert pymonetdb.paramstyle == 'pyformat'

with pymonetdb.connect('demo') as conn, conn.cursor() as cursor:
parameters = dict(number=42, fruit="ban'ana")
cursor.execute("SELECT %(number)s, %(fruit)s", parameters)
assert cursor.fetchone() == (42, "ban'ana")

# enable named parameters
pymonetdb.paramstyle = 'named'

with pymonetdb.connect('demo') as conn, conn.cursor() as cursor:
parameters = dict(number=42, fruit="ban'ana")
cursor.execute("SELECT :number, :fruit", parameters)
assert cursor.fetchone() == (42, "ban'ana")
```


# 1.7.0

changes since 1.6.4
Expand Down
5 changes: 3 additions & 2 deletions pymonetdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
from pymonetdb.filetransfer.uploads import Upload, Uploader
from pymonetdb.filetransfer.directoryhandler import SafeDirectoryHandler

__version__ = '1.7.1a0'
__version__ = '1.7.1'

apilevel = "2.0"
threadsafety = 1
paramstyle = "pyformat"

paramstyle = "pyformat" # with sufficiently recent MonetDB versions you can override this to 'named'

__all__ = ['sql', 'mapi', 'exceptions', 'BINARY', 'Binary', 'connect', 'Connection', 'DATE', 'Date', 'Time',
'Timestamp', 'DateFromTicks', 'TimeFromTicks', 'TimestampFromTicks', 'DataError', 'DatabaseError', 'Error',
Expand Down

0 comments on commit cc67a3b

Please sign in to comment.