diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a8300c294..c2cc9e27df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.32.3](https://www.github.com/googleapis/gapic-generator-python/compare/v0.32.2...v0.32.3) (2020-08-28) + + +### Bug Fixes + +* stabilize the order of resource helper methods and ([#582](https://www.github.com/googleapis/gapic-generator-python/issues/582)) ([7d2adde](https://www.github.com/googleapis/gapic-generator-python/commit/7d2adde3a1ae81ac88ced822d6dfdfb26ffbfdf0)) + ### [0.32.2](https://www.github.com/googleapis/gapic-generator-python/compare/v0.32.1...v0.32.2) (2020-08-20) diff --git a/gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 b/gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 index 4396dbce98..9f1a0e6b4f 100644 --- a/gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 +++ b/gapic/ads-templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 @@ -748,7 +748,7 @@ def test_{{ service.name|snake_case }}_grpc_lro_client(): {% endif -%} -{% for message in service.resource_messages -%} +{% for message in service.resource_messages|sort(attribute="resource_type") -%} {% with molluscs = cycler("squid", "clam", "whelk", "octopus", "oyster", "nudibranch", "cuttlefish", "mussel", "winkle", "nautilus", "scallop", "abalone") -%} def test_{{ message.resource_type|snake_case }}_path(): {% for arg in message.resource_path_args -%} diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 index d6882d95f4..5d874c0d19 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 @@ -38,9 +38,9 @@ class {{ service.async_client_name }}: DEFAULT_ENDPOINT = {{ service.client_name }}.DEFAULT_ENDPOINT DEFAULT_MTLS_ENDPOINT = {{ service.client_name }}.DEFAULT_MTLS_ENDPOINT - {% for message in service.resource_messages -%} + {% for message in service.resource_messages|sort(attribute="resource_type") -%} {{ message.resource_type|snake_case }}_path = staticmethod({{ service.client_name }}.{{ message.resource_type|snake_case }}_path) - + parse_{{ message.resource_type|snake_case}}_path = staticmethod({{ service.client_name }}.parse_{{ message.resource_type|snake_case }}_path) {% endfor %} from_service_account_file = {{ service.client_name }}.from_service_account_file diff --git a/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 b/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 index f8d6af0bdb..8543eae2ab 100644 --- a/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 +++ b/gapic/templates/tests/unit/gapic/%name_%version/%sub/test_%service.py.j2 @@ -1343,7 +1343,7 @@ def test_{{ service.name|snake_case }}_grpc_lro_async_client(): {% endif -%} -{% for message in service.resource_messages -%} +{% for message in service.resource_messages|sort(attribute="resource_type") -%} {% with molluscs = cycler("squid", "clam", "whelk", "octopus", "oyster", "nudibranch", "cuttlefish", "mussel", "winkle", "nautilus", "scallop", "abalone") -%} def test_{{ message.resource_type|snake_case }}_path(): {% for arg in message.resource_path_args -%} diff --git a/setup.py b/setup.py index 3d1d723b4d..9b9604e4fc 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ PACKAGE_ROOT = os.path.abspath(os.path.dirname(__file__)) -version = "0.32.2" +version = "0.32.3" with io.open(os.path.join(PACKAGE_ROOT, "README.rst")) as file_obj: README = file_obj.read()