MonetDB / pymonetdb

The Python API for MonetDB
https://www.monetdb.org/
Mozilla Public License 2.0
28 stars 20 forks source link

Fix replysize being None and unnecessary property sets. #30

Closed tandreas closed 7 years ago

tandreas commented 7 years ago

It looks like some extra property sets were committed as part of https://github.com/gijzelaerr/pymonetdb/commit/394174591add894da5a7a20535849679053f05db.

replysize=None can get propagated to Cursor.arraysize and in some cases causes an exception:

  File "pymonetdb/pymonetdb/sql/cursors.py", line 538, in nextset
    end = min(self.rowcount, self.rownumber + self.arraysize)
TypeError: unsupported operand type(s) for +: 'int' and 'NoneType'
coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.08%) to 76.609% when pulling 0247bc57dfe7de3040c33c9d51176750ca89f891 on tandreas:fix_replysize into b9c6223d67dbea4b0b3c73145d1e3b0695e23da3 on gijzelaerr:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.08%) to 76.609% when pulling 0247bc57dfe7de3040c33c9d51176750ca89f891 on tandreas:fix_replysize into b9c6223d67dbea4b0b3c73145d1e3b0695e23da3 on gijzelaerr:master.

gijzelaerr commented 7 years ago

interesting, sorry about that. Can you maybe supply a test that triggers the exception?

gijzelaerr commented 7 years ago

so i think what went wrong, I added that to make the static code analysis tools happy, but I added it on the wrong spot. should work now, making a 1.1.1