Skip to content

Commit

Permalink
Merge branch 'main' into support-neq-in-not-in
Browse files Browse the repository at this point in the history
  • Loading branch information
Mariatta committed May 25, 2022
2 parents 70829ac + b9e9cec commit f95867e
Show file tree
Hide file tree
Showing 47 changed files with 2,077 additions and 560 deletions.
2 changes: 1 addition & 1 deletion .flake8
Expand Up @@ -16,7 +16,7 @@

# Generated by synthtool. DO NOT EDIT!
[flake8]
ignore = E203, E266, E501, W503
ignore = E203, E231, E266, E501, W503
exclude =
# Exclude generated code.
**/proto/**
Expand Down
3 changes: 2 additions & 1 deletion .github/.OwlBot.lock.yaml
Expand Up @@ -13,4 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:4e1991042fe54b991db9ca17c8fb386e61b22fe4d1472a568bf0fcac85dcf5d3
digest: sha256:81ed5ecdfc7cac5b699ba4537376f3563f6f04122c4ec9e735d3b3dc1d43dd32
# created: 2022-05-05T22:08:23.383410683Z
8 changes: 4 additions & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -5,8 +5,8 @@
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
# Note: This file is autogenerated. To make changes to the codeowner team, please update .repo-metadata.json.

# @googleapis/yoshi-python @googleapis/firestore-dpe are the default owners for changes in this repo
* @googleapis/yoshi-python @googleapis/firestore-dpe
# @googleapis/yoshi-python @googleapis/cloud-native-db-dpes are the default owners for changes in this repo
* @googleapis/yoshi-python @googleapis/cloud-native-db-dpes

# @googleapis/python-samples-reviewers @googleapis/firestore-dpe are the default owners for samples changes
/samples/ @googleapis/python-samples-reviewers @googleapis/firestore-dpe
# @googleapis/python-samples-reviewers @googleapis/cloud-native-db-dpes are the default owners for samples changes
/samples/ @googleapis/python-samples-reviewers @googleapis/cloud-native-db-dpes
3 changes: 3 additions & 0 deletions .github/auto-approve.yml
@@ -0,0 +1,3 @@
# https://github.com/googleapis/repo-automation-bots/tree/main/packages/auto-approve
processes:
- "OwlBotTemplateChanges"
15 changes: 15 additions & 0 deletions .github/auto-label.yaml
@@ -0,0 +1,15 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
requestsize:
enabled: true
9 changes: 9 additions & 0 deletions .github/release-please.yml
@@ -1,2 +1,11 @@
releaseType: python
handleGHRelease: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
- branch: v1
handleGHRelease: true
releaseType: python
- branch: v0
handleGHRelease: true
releaseType: python
20 changes: 18 additions & 2 deletions .kokoro/docker/docs/Dockerfile
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from ubuntu:20.04
from ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive

Expand Down Expand Up @@ -60,8 +60,24 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /var/cache/apt/archives/*.deb

###################### Install python 3.8.11

# Download python 3.8.11
RUN wget https://www.python.org/ftp/python/3.8.11/Python-3.8.11.tgz

# Extract files
RUN tar -xvf Python-3.8.11.tgz

# Install python 3.8.11
RUN ./Python-3.8.11/configure --enable-optimizations
RUN make altinstall

###################### Install pip
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
&& python3.8 /tmp/get-pip.py \
&& python3 /tmp/get-pip.py \
&& rm /tmp/get-pip.py

# Test pip
RUN python3 -m pip

CMD ["python3.8"]
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -22,7 +22,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 19.10b0
rev: 22.3.0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
Expand Down
2 changes: 1 addition & 1 deletion .repo-metadata.json
Expand Up @@ -11,6 +11,6 @@
"distribution_name": "google-cloud-datastore",
"api_id": "datastore.googleapis.com",
"default_version": "v1",
"codeowner_team": "@googleapis/firestore-dpe",
"codeowner_team": "@googleapis/cloud-native-db-dpes",
"api_shortname": "datastore"
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,18 @@

[1]: https://pypi.org/project/google-cloud-datastore/#history

## [2.6.0](https://github.com/googleapis/python-datastore/compare/v2.5.1...v2.6.0) (2022-05-05)


### Features

* expose new read_time API fields, currently only available in private preview ([8d2bd17](https://github.com/googleapis/python-datastore/commit/8d2bd1788d8dc7da57ab9272b274a29082878ece))


### Documentation

* fix type in docstring for map fields ([8d2bd17](https://github.com/googleapis/python-datastore/commit/8d2bd1788d8dc7da57ab9272b274a29082878ece))

### [2.5.1](https://github.com/googleapis/python-datastore/compare/v2.5.0...v2.5.1) (2022-03-05)


Expand Down
5 changes: 4 additions & 1 deletion docs/conf.py
Expand Up @@ -361,7 +361,10 @@
intersphinx_mapping = {
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
Expand Down
15 changes: 13 additions & 2 deletions google/cloud/datastore/_http.py
Expand Up @@ -53,7 +53,14 @@ def _make_request_pb(request, request_pb_type):


def _request(
http, project, method, data, base_url, client_info, retry=None, timeout=None,
http,
project,
method,
data,
base_url,
client_info,
retry=None,
timeout=None,
):
"""Make a request over the Http transport to the Cloud Datastore API.
Expand Down Expand Up @@ -103,7 +110,11 @@ def _request(

if timeout is not None:
response = requester(
url=api_url, method="POST", headers=headers, data=data, timeout=timeout,
url=api_url,
method="POST",
headers=headers,
data=data,
timeout=timeout,
)
else:
response = requester(url=api_url, method="POST", headers=headers, data=data)
Expand Down
5 changes: 4 additions & 1 deletion google/cloud/datastore/helpers.py
Expand Up @@ -418,7 +418,10 @@ def _get_value_from_value_pb(pb):
]

elif value_type == "geo_point_value":
result = GeoPoint(pb.geo_point_value.latitude, pb.geo_point_value.longitude,)
result = GeoPoint(
pb.geo_point_value.latitude,
pb.geo_point_value.longitude,
)

elif value_type == "null_value":
result = None
Expand Down
8 changes: 4 additions & 4 deletions google/cloud/datastore/key.py
Expand Up @@ -361,7 +361,7 @@ def from_legacy_urlsafe(cls, urlsafe):
reference.ParseFromString(raw_bytes)

project = _clean_app(reference.app)
namespace = _get_empty(reference.name_space, u"")
namespace = _get_empty(reference.name_space, "")
_check_database_id(reference.database_id)
flat_path = _get_flat_path(reference.path)
return cls(*flat_path, project=project, namespace=namespace)
Expand Down Expand Up @@ -554,7 +554,7 @@ def _check_database_id(database_id):
:raises: :exc:`ValueError` if the ``database_id`` is not empty.
"""
if database_id != u"":
if database_id != "":
msg = _DATABASE_ID_TEMPLATE.format(database_id)
raise ValueError(msg)

Expand All @@ -580,13 +580,13 @@ def _add_id_or_name(flat_path, element_pb, empty_allowed):
# NOTE: Below 0 and the empty string are the "null" values for their
# respective types, indicating that the value is unset.
if id_ == 0:
if name == u"":
if name == "":
if not empty_allowed:
raise ValueError(_EMPTY_ELEMENT)
else:
flat_path.append(name)
else:
if name == u"":
if name == "":
flat_path.append(id_)
else:
msg = _BAD_ELEMENT_TEMPLATE.format(id_, name)
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datastore/version.py
Expand Up @@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

__version__ = "2.5.1"
__version__ = "2.6.0"

0 comments on commit f95867e

Please sign in to comment.