velocity-python 0.10.0__py3-none-any.whl → 0.10.2__py3-none-any.whl

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.
velocity/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = version = "0.10.0"
1
+ __version__ = version = "0.10.2"
2
2
 
3
3
  import importlib as _importlib
4
4
 
@@ -77,6 +77,7 @@ class Result:
77
77
  phrase in message
78
78
  for phrase in (
79
79
  "didn't produce a result",
80
+ "didn't produce records", # psycopg >= 3.2
80
81
  "no results to fetch",
81
82
  "no result available",
82
83
  )
@@ -133,6 +134,18 @@ class Result:
133
134
  self._exhausted = True
134
135
  self._first_row_fetched = True
135
136
  return
137
+ # Any statement the driver describes no result set for (SET, DDL,
138
+ # SAVEPOINT, COMMIT ...): no rows, and no fetch. psycopg 3 raises on
139
+ # fetchone() there ("the last operation didn't produce records"), and
140
+ # since 0.9.23 a fetch error is no longer read as "no rows".
141
+ if (
142
+ self._cursor is not None
143
+ and hasattr(self._cursor, "description")
144
+ and self._cursor.description is None
145
+ ):
146
+ self._exhausted = True
147
+ self._first_row_fetched = True
148
+ return
136
149
 
137
150
  try:
138
151
  raw_row = self._cursor.fetchone()
velocity/db/core/table.py CHANGED
@@ -2487,7 +2487,7 @@ class Table:
2487
2487
  return {k: adapt(v) for k, v in data.items()}
2488
2488
 
2489
2489
  @create_missing
2490
- def update(self, data, where=None, pk=None, all_rows=False, **kwds):
2490
+ def update(self, data, where=None, pk=None, *, all_rows=False, **kwds):
2491
2491
  """
2492
2492
  Performs an UPDATE of rows matching `where` or `pk` with `data`.
2493
2493
  A `where` that cannot narrow the rows is refused unless
@@ -3161,7 +3161,7 @@ class Table:
3161
3161
  row = self.tx.execute(sql, vals, cursor=self.cursor()).one()
3162
3162
  return row if row else {}
3163
3163
 
3164
- def delete(self, where, all_rows=False, **kwds):
3164
+ def delete(self, where, *, all_rows=False, **kwds):
3165
3165
  """
3166
3166
  Deletes rows matching `where`. A `where` that cannot narrow the rows
3167
3167
  (falsy, blank, ``1=1``, an empty ``@@and``/``@@or``) is refused unless
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: velocity-python
3
- Version: 0.10.0
3
+ Version: 0.10.2
4
4
  Summary: A rapid application development library for interfacing with data storage
5
5
  Author-email: Velocity Team <info@codeclubs.org>
6
6
  License-Expression: MIT
@@ -1,4 +1,4 @@
1
- velocity/__init__.py,sha256=DRGxVUfT17Rm2wDVNRDGDc8OD1KQPM4_Nw1aN0CTjlY,363
1
+ velocity/__init__.py,sha256=O_gZUrnrbDa6bz63plv7_3VPYyv-SYgiHPc5wZsy514,363
2
2
  velocity/cache.py,sha256=pthvw7gDVEXRzkTcQtA5YVf4Q1IxAamWsba4UReT0RE,8933
3
3
  velocity/hooks.py,sha256=jY_qtAapNHvptmryFSD-Zc7RvLhV6e5nJEH3x2xTgCw,20575
4
4
  velocity/logging.py,sha256=MAsZap1cDSdOBNRc_9ezQxup5dHOS0ARxU9NI_-UK3E,4037
@@ -118,11 +118,11 @@ velocity/db/core/decorators.py,sha256=425EXSTZHWuG4bQwcrVyJm41X4_v-VEu5nZoikiJY1
118
118
  velocity/db/core/engine.py,sha256=rsV0QDWI3ElLFQ-fWapUBw5KZEZ8iwUcycMW67FTnMA,60278
119
119
  velocity/db/core/jsonproxy.py,sha256=gk9drYvc4Av46ZB1faEjBx6e9EBY29tfEacNpf2ZO6s,6257
120
120
  velocity/db/core/lazy_engine.py,sha256=yFJFN0WIrEQhZh-tSMeWWBOTvi6pyYiMNHQP32MFZMc,4939
121
- velocity/db/core/result.py,sha256=gC5WgXvb-S052JOehD66NAbs9EXg1pcZ4M-6a8Crk-M,17853
121
+ velocity/db/core/result.py,sha256=vKhJtfXN82EqRasTMpMqqtu4h87go1npp8D0uaw4Cdk,18471
122
122
  velocity/db/core/row.py,sha256=0lbrmnJGAOCUWEF0kNUU3kgYGZwJ7bVChZqAs0Ay8uw,19932
123
123
  velocity/db/core/sequence.py,sha256=25CcZu92Lkxhqd4RXew3CvQx4j_aTEBvD2sZ4ArbQgc,4235
124
124
  velocity/db/core/source_policy.py,sha256=KfBb7fnmky4PwdYi_X1eK9YC5Dv9Zbfv7mKorInenYs,1272
125
- velocity/db/core/table.py,sha256=3GWd1PgEqtKZWevPPND0Dc9akuHxxFeQIxdfHippQvA,129537
125
+ velocity/db/core/table.py,sha256=-FCyyXGg8E29u4vqMPfQbmhyZAv7J41WvSe07SH3JGs,129543
126
126
  velocity/db/core/transaction.py,sha256=fJeyM3VnUiJxgrrZpR2O3hh0Fh2_Z4dy160x0WLvu_U,76973
127
127
  velocity/db/core/view.py,sha256=TKzYXNOATsydGwU3AbHv-GRsb8eAjjnXvNb6qce0GMY,5397
128
128
  velocity/db/lane/__init__.py,sha256=L0VpbpPy0G0OysvOeI-foGH4qNjG8Y2oVEXzclnt0dg,2009
@@ -281,9 +281,9 @@ velocity/workflow/points.py,sha256=g_vQ3cdHdx_JloVCS5dVjo_jJoSolO92K5p3suDzxlE,1
281
281
  velocity/workflow/schema.py,sha256=1ZAkGZ_4YrTAfY6TIPCviWQJGLhhmAJmkxisfLyy2og,21597
282
282
  velocity/workflow/traveler.py,sha256=Ik1InoEo69sZB1wVV-UinVo4P0P5QlcV_hh858p3OWE,20562
283
283
  velocity/workflow/views.py,sha256=oTPjpuheND8y4VbcTY8c-4fMdSHKb0jgGzXMuT_G7_s,32175
284
- velocity_python-0.10.0.dist-info/licenses/LICENSE,sha256=aoN245GG8s9oRUU89KNiGTU4_4OtnNmVi4hQeChg6rM,1076
285
- velocity_python-0.10.0.dist-info/METADATA,sha256=QAhDc6nwrHP06xgN8khBanWMSadSB0gkoEo-0vMElPY,17709
286
- velocity_python-0.10.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
287
- velocity_python-0.10.0.dist-info/entry_points.txt,sha256=nXUKJHkOGQCSPoagdmMNd_qycrle1LVU-GhYknLGM1M,56
288
- velocity_python-0.10.0.dist-info/top_level.txt,sha256=JW2vJPmodgdgSz7H6yoZvnxF8S3fTMIv-YJWCT1sNW0,9
289
- velocity_python-0.10.0.dist-info/RECORD,,
284
+ velocity_python-0.10.2.dist-info/licenses/LICENSE,sha256=aoN245GG8s9oRUU89KNiGTU4_4OtnNmVi4hQeChg6rM,1076
285
+ velocity_python-0.10.2.dist-info/METADATA,sha256=zSRJ8C0Mt27YQZNt7gb-1cXJqXF0KPMr90aogM6v7vs,17709
286
+ velocity_python-0.10.2.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
287
+ velocity_python-0.10.2.dist-info/entry_points.txt,sha256=nXUKJHkOGQCSPoagdmMNd_qycrle1LVU-GhYknLGM1M,56
288
+ velocity_python-0.10.2.dist-info/top_level.txt,sha256=JW2vJPmodgdgSz7H6yoZvnxF8S3fTMIv-YJWCT1sNW0,9
289
+ velocity_python-0.10.2.dist-info/RECORD,,