mimerpy 1.3.2__tar.gz → 1.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. {mimerpy-1.3.2 → mimerpy-1.3.3}/PKG-INFO +1 -1
  2. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/releasenotes.rst +10 -2
  3. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/_version.py +2 -2
  4. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/cursorPy.py +3 -3
  5. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy.egg-info/PKG-INFO +1 -1
  6. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/testConnection.py +3 -3
  7. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/testCursor.py +2 -2
  8. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/testScrollCursor.py +5 -5
  9. {mimerpy-1.3.2 → mimerpy-1.3.3}/.gitattributes +0 -0
  10. {mimerpy-1.3.2 → mimerpy-1.3.3}/.gitignore +0 -0
  11. {mimerpy-1.3.2 → mimerpy-1.3.3}/LICENSE.txt +0 -0
  12. {mimerpy-1.3.2 → mimerpy-1.3.3}/MANIFEST.in +0 -0
  13. {mimerpy-1.3.2 → mimerpy-1.3.3}/README.rst +0 -0
  14. {mimerpy-1.3.2 → mimerpy-1.3.3}/dist-requirements.txt +0 -0
  15. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/.gitignore +0 -0
  16. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/Makefile +0 -0
  17. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/README.txt +0 -0
  18. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/_static/style.css +0 -0
  19. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/_templates/layout.html +0 -0
  20. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/codeexamples.rst +0 -0
  21. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/conf.py +0 -0
  22. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/datatypes.rst +0 -0
  23. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/dbtest.py +0 -0
  24. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/exceptions.rst +0 -0
  25. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/gettingstarted.rst +0 -0
  26. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/images/mimerhd.png +0 -0
  27. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/images/mimerhd32x32.ico +0 -0
  28. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/images/mimerhd32x32.png +0 -0
  29. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/index.rst +0 -0
  30. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/installationguide.rst +0 -0
  31. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/introduction.rst +0 -0
  32. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/legalnotice.rst +0 -0
  33. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/make_for_windows.bat +0 -0
  34. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/mimerpy.rst +0 -0
  35. {mimerpy-1.3.2 → mimerpy-1.3.3}/doc/userguide.rst +0 -0
  36. {mimerpy-1.3.2 → mimerpy-1.3.3}/pyproject.toml +0 -0
  37. {mimerpy-1.3.2 → mimerpy-1.3.3}/scripts/ebuild.sh +0 -0
  38. {mimerpy-1.3.2 → mimerpy-1.3.3}/scripts/ubuntuAutoRelease.sh +0 -0
  39. {mimerpy-1.3.2 → mimerpy-1.3.3}/scripts/windowsAutoRelease.bat +0 -0
  40. {mimerpy-1.3.2 → mimerpy-1.3.3}/setup.cfg +0 -0
  41. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/__init__.py +0 -0
  42. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/__main__.py +0 -0
  43. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/connectionPy.py +0 -0
  44. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/mimPyErrorCodes.py +0 -0
  45. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/mimPyExceptionHandler.py +0 -0
  46. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/mimPyExceptions.py +0 -0
  47. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/mimerapi.py +0 -0
  48. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/pool.py +0 -0
  49. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy/utils.py +0 -0
  50. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy.egg-info/SOURCES.txt +0 -0
  51. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy.egg-info/dependency_links.txt +0 -0
  52. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy.egg-info/requires.txt +0 -0
  53. {mimerpy-1.3.2 → mimerpy-1.3.3}/src/mimerpy.egg-info/top_level.txt +0 -0
  54. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/__init__.py +0 -0
  55. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/db_config.py +0 -0
  56. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/dropdb.py +0 -0
  57. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/testMimerPool.py +0 -0
  58. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/testMonkey.py +0 -0
  59. {mimerpy-1.3.2 → mimerpy-1.3.3}/tests/testutils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mimerpy
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Python database interface for Mimer SQL
5
5
  Author-email: Erik Gunne <mimerpy@mimer.com>, Magdalena Boström <mimerpy@mimer.com>, Mimer Information Technology AB <mimerpy@mimer.com>
6
6
  Maintainer-email: Mimer Information Technology AB <mimerpy@mimer.com>
@@ -56,9 +56,17 @@ Major changes:
56
56
 
57
57
  MimerPy Version 1.3.2
58
58
  ---------------------
59
- MimerPy version 1.3.2 is a minor buggfix release that fix a problem with datetime in Python version 3.9 and older
59
+ MimerPy version 1.3.2 is a minor buggfix release that fix a problem with datetime in Python version 3.9 and older.
60
60
 
61
- Major changes:
61
+ Minor changes:
62
62
 
63
63
  * Use a safe datetime and time parser
64
64
  * On Python 3.6, use dateutil module to parse ISO 8601 date strings
65
+
66
+ MimerPy Version 1.3.3
67
+ ---------------------
68
+ MimerPy version 1.3.3 is a buggfix release that correct the behavior for fetchone()
69
+
70
+ Major changes:
71
+
72
+ * fetchone() now returns None when no more rows are available, in accordance with the DB-API 2.0 specification.
@@ -1,4 +1,4 @@
1
1
  # file generated by setuptools_scm
2
2
  # don't change, don't track in version control
3
- __version__ = version = '1.3.2'
4
- __version_tuple__ = version_tuple = (1, 3, 2)
3
+ __version__ = version = '1.3.3'
4
+ __version_tuple__ = version_tuple = (1, 3, 3)
@@ -323,7 +323,7 @@ class Cursor:
323
323
  def __next__(self):
324
324
  self.__check_if_open()
325
325
  return_value = self.fetchone()
326
- if return_value == []:
326
+ if return_value is None:
327
327
  raise StopIteration
328
328
  return return_value
329
329
 
@@ -609,7 +609,7 @@ class Cursor:
609
609
 
610
610
  # Return value of mimerFetch == 100 implies end of result set
611
611
  if (rc_value == 100):
612
- return []
612
+ return None
613
613
 
614
614
  for cur_column in range(1, self._number_of_columns + 1):
615
615
  func_tuple = get_funcs[self._column_type[cur_column - 1]
@@ -835,7 +835,7 @@ class ScrollCursor(Cursor):
835
835
  values = values + self.__result_set[self.rownumber]
836
836
  self.rownumber = self.rownumber + 1
837
837
  except IndexError:
838
- return []
838
+ return None
839
839
  return values
840
840
 
841
841
  def fetchmany(self, *arg):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: mimerpy
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Python database interface for Mimer SQL
5
5
  Author-email: Erik Gunne <mimerpy@mimer.com>, Magdalena Boström <mimerpy@mimer.com>, Mimer Information Technology AB <mimerpy@mimer.com>
6
6
  Maintainer-email: Mimer Information Technology AB <mimerpy@mimer.com>
@@ -320,7 +320,7 @@ class TestConnectionMethods(unittest.TestCase):
320
320
  a.close()
321
321
 
322
322
  b = self.tstcon.execute("select * from bob6")
323
- self.assertEqual(b.fetchone(), [])
323
+ self.assertIsNone(b.fetchone())
324
324
  b.close()
325
325
 
326
326
  def test_autocommit(self):
@@ -363,7 +363,7 @@ class TestConnectionMethods(unittest.TestCase):
363
363
  a.close()
364
364
 
365
365
  b = self.tstcon.execute("select * from bob63")
366
- self.assertEqual(b.fetchone(), [])
366
+ self.assertIsNone(b.fetchone())
367
367
  b.close()
368
368
 
369
369
  def test_autocommit_4(self):
@@ -376,7 +376,7 @@ class TestConnectionMethods(unittest.TestCase):
376
376
  a.close()
377
377
 
378
378
  b = self.tstcon.execute("select * from bob64")
379
- self.assertEqual(b.fetchone(), [])
379
+ self.assertIsNone(b.fetchone())
380
380
  b.close()
381
381
 
382
382
 
@@ -670,7 +670,7 @@ class TestCursorMethods(unittest.TestCase):
670
670
  c.execute("insert into bob556 values (3)")
671
671
  self.tstcon.rollback()
672
672
  c.execute("select * from bob556")
673
- self.assertEqual(c.fetchone(), [])
673
+ self.assertIsNone(c.fetchone())
674
674
 
675
675
  def test_invalid_sequence_insert(self):
676
676
  with self.tstcon.cursor() as c:
@@ -869,7 +869,7 @@ class TestCursorMethods(unittest.TestCase):
869
869
  c.execute("SELECT * from jonNone")
870
870
  for i in range(1, 10):
871
871
  c.fetchone()
872
- self.assertEqual(c.fetchone(), [])
872
+ self.assertIsNone(c.fetchone())
873
873
 
874
874
  def test_empty_sequence_is_returned_many(self):
875
875
  with self.tstcon.cursor() as c:
@@ -670,7 +670,7 @@ class TestScrollCursorMethods(unittest.TestCase):
670
670
  c.execute("SELECT * from jonNone")
671
671
  for i in range(1,10):
672
672
  c.fetchone()
673
- self.assertEqual(c.fetchone(), [])
673
+ self.assertIsNone(c.fetchone())
674
674
 
675
675
  def test_empty_sequence_is_returned_many(self):
676
676
  with self.tstcon.cursor(scrollable = True) as c:
@@ -1033,7 +1033,7 @@ class TestScrollCursorMethods(unittest.TestCase):
1033
1033
  self.assertEqual(c.fetchone(), (9, 'bob9'))
1034
1034
  self.assertEqual(c.fetchone(), (10, 'bob10'))
1035
1035
  self.assertEqual(c.fetchone(), (11, 'bob11'))
1036
- self.assertEqual(c.fetchone(), [])
1036
+ self.assertIsNone(c.fetchone())
1037
1037
 
1038
1038
  def test_fetchone_rownumber(self):
1039
1039
  with self.tstcon.cursor(scrollable = True) as c:
@@ -1049,7 +1049,7 @@ class TestScrollCursorMethods(unittest.TestCase):
1049
1049
  self.assertEqual(c.rownumber, 2)
1050
1050
  self.assertEqual(c.fetchone(), (11, 'bob11'))
1051
1051
  self.assertEqual(c.rownumber, 3)
1052
- self.assertEqual(c.fetchone(), [])
1052
+ self.assertIsNone(c.fetchone())
1053
1053
  self.assertEqual(c.rownumber, 3)
1054
1054
 
1055
1055
  def test_fetchmany_rownumber(self):
@@ -1107,7 +1107,7 @@ class TestScrollCursorMethods(unittest.TestCase):
1107
1107
  [(6, 'bob6'),(7, 'bob7'),(8, 'bob8'),
1108
1108
  (9, 'bob9'),(10, 'bob10')])
1109
1109
  self.assertEqual(c.rownumber, 10)
1110
- self.assertEqual(c.fetchone(), [])
1110
+ self.assertIsNone(c.fetchone())
1111
1111
  self.assertEqual(c.fetchmany(21), [])
1112
1112
  self.assertEqual(c.fetchall(), [])
1113
1113
 
@@ -1224,7 +1224,7 @@ class TestScrollCursorMethods(unittest.TestCase):
1224
1224
  self.tstcon.rollback()
1225
1225
  c.execute("select * from bobnoselect")
1226
1226
  r = c.fetchone()
1227
- self.assertEqual(len(r), 0)
1227
+ self.assertIsNone(r)
1228
1228
 
1229
1229
  def test_no_select2(self):
1230
1230
  with self.tstcon.cursor(scrollable = True) as c:
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes