-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
api: datastoreIssues related to the googleapis/python-ndb API.Issues related to the googleapis/python-ndb API.
Description
Deprecation warning here in python 3.12:
python-ndb/google/cloud/ndb/tasklets.py
Line 319 in 988d321
| yielded = self.generator.throw(type(error), error, traceback) |
Environment details
- API: python-ndb
- OS type and version: Ubuntu 22.04
- Python version and virtual environment information: 3.12.3
- google-cloud- version: google-cloud-ndb==2.3.1
Steps to reproduce
- Call get_by_id with something that triggers an error, e.g. an out of range value
Code example
from google.cloud import ndb
class MyModel():
foo = ndb.IntegerProperty()
def test_foo():
# trigger an out of range error
MyModel.get_by_id(15521907085945043008)Stack trace
self = _TaskletFuture('get') <126572934096624>, send_value = None
def _advance_tasklet(self, send_value=None, error=None):
"""Advance a tasklet one step by sending in a value or error."""
# Avoid Python 2.7 import error
from google.cloud.ndb import context as context_module
try:
with self.context.use():
# Send the next value or exception into the generator
if error:
traceback = error.__traceback__
> yielded = self.generator.throw(type(error), error, traceback)
E DeprecationWarning: the (type, exc, tb) signature of throw() is deprecated, use the single-arg signature instead.
snarfed
Metadata
Metadata
Assignees
Labels
api: datastoreIssues related to the googleapis/python-ndb API.Issues related to the googleapis/python-ndb API.