Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timeout argument #1303

Merged
merged 2 commits into from
May 17, 2023
Merged

Conversation

another-rex
Copy link
Contributor

@another-rex another-rex commented May 17, 2023

Remove the deprecated default option and pass it in directly.

By filling out default options, every query now prints a warning log because of this line in the implementation code:

    if default_options is not None:
        _log.warning(
            "Deprecation warning: passing default_options to the Query"
            "constructor is deprecated. Please directly pass any "
            "arguments you want to use to the Query constructor or its "
            "methods."
        )

https://github.com/googleapis/python-ndb/blob/a3a181a427cc292882691d963b30bc78c05c6592/google/cloud/ndb/query.py#L1339

Though looking at the git blame has been "deprecated" since 4 years ago in version v0.0.1

@andrewpollock
Copy link
Contributor

Remove the deprecated default option and pass it in directly.

I'm not seeing anything at https://googleapis.dev/python/python-ndb/latest/query.html#google.cloud.ndb.query.Query that says the default_options attribute of the Query object is deprecated. Could you add some more context on why this change is necessary to the PR description?

Copy link
Contributor

@andrewpollock andrewpollock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks structurally sound, although I'm not understanding the necessity?

@another-rex
Copy link
Contributor Author

another-rex commented May 17, 2023

By filling out default options, every query now prints a warning log because of this line in the implementation code:

        if default_options is not None:
            _log.warning(
                "Deprecation warning: passing default_options to the Query"
                "constructor is deprecated. Please directly pass any "
                "arguments you want to use to the Query constructor or its "
                "methods."
            )

https://github.com/googleapis/python-ndb/blob/a3a181a427cc292882691d963b30bc78c05c6592/google/cloud/ndb/query.py#L1339

Though looking at the git blame has been "deprecated" since 4 years ago in version v0.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants