Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
feat: Add support for python 3.11 (#99)
Browse files Browse the repository at this point in the history
* feat: Add support for python 3.11

chore: Update gapic-generator-python to v1.8.0
PiperOrigin-RevId: 500768693

Source-Link: googleapis/googleapis@190b612

Source-Link: googleapis/googleapis-gen@7bf29a4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiN2JmMjlhNDE0YjllY2FjMzE3MGYwYjY1YmRjMmE5NTcwNWMwZWYxYSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 10, 2023
1 parent cac4fae commit 95d8ee6
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def get_mtls_endpoint_and_cert_source(
The API endpoint is determined in the following order:
(1) if `client_options.api_endpoint` if provided, use the provided one.
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
default mTLS endpoint; if the environment variabel is "never", use the default API
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def get_mtls_endpoint_and_cert_source(
The API endpoint is determined in the following order:
(1) if `client_options.api_endpoint` if provided, use the provided one.
(2) if `GOOGLE_API_USE_CLIENT_CERTIFICATE` environment variable is "always", use the
default mTLS endpoint; if the environment variabel is "never", use the default API
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
Expand Down
37 changes: 37 additions & 0 deletions google/cloud/optimization_v1/types/fleet_routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class OptimizeToursRequest(proto.Message):
defines the shipment model to solve as well as optimization
parameters.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
parent (str):
Required. Target project and location to make a call.
Expand Down Expand Up @@ -616,6 +619,9 @@ class ShipmentModel(proto.Message):
- the unperformed shipment penalties.
- the cost of the global duration of the shipments
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
shipments (MutableSequence[google.cloud.optimization_v1.types.Shipment]):
Set of shipments which must be performed in
Expand Down Expand Up @@ -874,6 +880,9 @@ class PrecedenceRule(proto.Message):
Furthermore, precedences only apply when both shipments are
performed and are otherwise ignored.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
first_index (int):
Shipment index of the "first" event. This
Expand Down Expand Up @@ -1139,6 +1148,9 @@ class Shipment(proto.Message):
visit one of its delivery locations later on (and therefore
re-increase its spare capacities accordingly).
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
pickups (MutableSequence[google.cloud.optimization_v1.types.Shipment.VisitRequest]):
Set of pickup alternatives associated to the
Expand Down Expand Up @@ -1595,6 +1607,9 @@ class Vehicle(proto.Message):
``end_location`` for this vehicle. A route is a sequence of visits
(see ``ShipmentRoute``).
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
travel_mode (google.cloud.optimization_v1.types.Vehicle.TravelMode):
The travel mode which affects the roads usable by the
Expand Down Expand Up @@ -1826,6 +1841,9 @@ class LoadLimit(proto.Message):
only carry up to 3500 kg". See
[load_limits][google.cloud.optimization.v1.Vehicle.load_limits].
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
max_load (int):
The maximum acceptable amount of load.
Expand Down Expand Up @@ -1855,6 +1873,8 @@ class LoadLimit(proto.Message):
class Interval(proto.Message):
r"""Interval of acceptable load amounts.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
min_ (int):
A minimum acceptable load. Must be ≥ 0. If they're both
Expand Down Expand Up @@ -1914,6 +1934,9 @@ class DurationLimit(proto.Message):
When a soft limit field is defined, both the soft max threshold
and its associated cost must be defined together.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
max_duration (google.protobuf.duration_pb2.Duration):
A hard limit constraining the duration to be at most
Expand Down Expand Up @@ -2163,6 +2186,9 @@ class TimeWindow(proto.Message):
0 <= `start_time` <= `soft_start_time` <= `end_time` and
0 <= `start_time` <= `soft_end_time` <= `end_time`.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
start_time (google.protobuf.timestamp_pb2.Timestamp):
The hard time window start time. If unspecified it will be
Expand Down Expand Up @@ -2260,6 +2286,8 @@ class CapacityQuantity(proto.Message):
class CapacityQuantityInterval(proto.Message):
r"""Deprecated: Use [Vehicle.LoadLimit.Interval][] instead.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
type_ (str):
Expand Down Expand Up @@ -2295,6 +2323,9 @@ class DistanceLimit(proto.Message):
``cost_per_kilometer_above_soft_max`` must be defined and be
nonnegative.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
max_meters (int):
A hard limit constraining the distance to be at most
Expand Down Expand Up @@ -2489,6 +2520,9 @@ class Location(proto.Message):
r"""Encapsulates a location (a geographic point, and an optional
heading).
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
lat_lng (google.type.latlng_pb2.LatLng):
The waypoint's geographic coordinates.
Expand Down Expand Up @@ -3354,6 +3388,9 @@ class Reason(proto.Message):
3) and at least one vehicle's distance limit would be exceeded
(including vehicle 1).
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
code (google.cloud.optimization_v1.types.SkippedShipment.Reason.Code):
Refer to the comments of Code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-optimization",
"version": "1.2.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
dependencies = [
"google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*",
"proto-plus >= 1.22.0, <2.0.0dev",
"proto-plus >= 1.22.2, <2.0.0dev; python_version>='3.11'",
"protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5",
]
url = "https://github.com/googleapis/python-optimization"
Expand Down Expand Up @@ -79,6 +80,7 @@
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Operating System :: OS Independent",
"Topic :: Internet",
],
Expand Down
6 changes: 6 additions & 0 deletions testing/constraints-3.12.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# -*- coding: utf-8 -*-
# This constraints file is required for unit tests.
# List all library dependencies and extras in this file.
google-api-core
proto-plus
protobuf

0 comments on commit 95d8ee6

Please sign in to comment.