From 8bc861cc3ccf3b070634f62658a80b47ecd74710 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Wed, 13 May 2026 14:36:28 +0000 Subject: [PATCH] feat: regenerate google-cloud-[e-i] packages This Pull Request drops support for Python <=3.9 in generated packages. This is part of our ongoing effort to modernize the Cloud Python SDK libraries and remove support for End-of-Life (EOL) Python versions. - Removed Python <=3.9 from testing, configuration, and constraints files. - Resolved dependency conflicts arising from dropping Python <=3.9 support. - Cleaned up obsolete code related to Python <=3.9 support. - Updated select copyright dates - Updated some autogenerated headings - Updated some tests to resolve issues discovered during this migration. --- .../google-cloud-edgecontainer/docs/conf.py | 4 +- .../google/cloud/edgecontainer_v1/__init__.py | 25 +-- .../services/edge_container/async_client.py | 38 ++--- .../google-cloud-edgecontainer/noxfile.py | 4 +- ...ted_edge_container_create_cluster_async.py | 6 +- ...d_edge_container_create_node_pool_async.py | 6 +- ...e_container_create_vpn_connection_async.py | 6 +- ...ted_edge_container_delete_cluster_async.py | 6 +- ...d_edge_container_delete_node_pool_async.py | 6 +- ...e_container_delete_vpn_connection_async.py | 6 +- ...ted_edge_container_update_cluster_async.py | 6 +- ...d_edge_container_update_node_pool_async.py | 6 +- ...ed_edge_container_upgrade_cluster_async.py | 6 +- packages/google-cloud-edgecontainer/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../edgecontainer_v1/test_edge_container.py | 76 ++++----- .../google-cloud-edgenetwork/docs/conf.py | 4 +- .../google/cloud/edgenetwork_v1/__init__.py | 25 +-- .../services/edge_network/async_client.py | 42 ++--- .../cloud/edgenetwork_v1/types/resources.py | 4 +- packages/google-cloud-edgenetwork/noxfile.py | 4 +- ...rk_create_interconnect_attachment_async.py | 6 +- ...rated_edge_network_create_network_async.py | 6 +- ...erated_edge_network_create_router_async.py | 6 +- ...erated_edge_network_create_subnet_async.py | 6 +- ...rk_delete_interconnect_attachment_async.py | 6 +- ...rated_edge_network_delete_network_async.py | 6 +- ...erated_edge_network_delete_router_async.py | 6 +- ...erated_edge_network_delete_subnet_async.py | 6 +- ...erated_edge_network_update_router_async.py | 6 +- ...erated_edge_network_update_subnet_async.py | 6 +- packages/google-cloud-edgenetwork/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../gapic/edgenetwork_v1/test_edge_network.py | 100 +++++------- .../docs/conf.py | 4 +- .../enterpriseknowledgegraph_v1/__init__.py | 25 +-- .../types/service.py | 3 +- .../noxfile.py | 4 +- .../setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- ...test_enterprise_knowledge_graph_service.py | 36 ++--- .../google-cloud-error-reporting/docs/conf.py | 4 +- .../cloud/errorreporting_v1beta1/__init__.py | 25 +-- .../google-cloud-error-reporting/noxfile.py | 4 +- .../google-cloud-error-reporting/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 14 -- .../test_error_group_service.py | 18 +-- .../test_error_stats_service.py | 32 ++-- .../test_report_errors_service.py | 16 +- .../docs/conf.py | 4 +- .../cloud/essential_contacts_v1/__init__.py | 25 +-- .../noxfile.py | 4 +- .../google-cloud-essential-contacts/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../test_essential_contacts_service.py | 40 ++--- .../docs/conf.py | 4 +- .../cloud/eventarc_publishing_v1/__init__.py | 25 +-- .../noxfile.py | 4 +- .../google-cloud-eventarc-publishing/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../eventarc_publishing_v1/test_publisher.py | 16 +- packages/google-cloud-eventarc/docs/conf.py | 4 +- .../google/cloud/eventarc_v1/__init__.py | 25 +-- .../services/eventarc/async_client.py | 82 +++++----- packages/google-cloud-eventarc/noxfile.py | 4 +- ...generated_eventarc_create_channel_async.py | 6 +- ...ventarc_create_channel_connection_async.py | 6 +- ...erated_eventarc_create_enrollment_async.py | 6 +- ...eventarc_create_google_api_source_async.py | 6 +- ...rated_eventarc_create_message_bus_async.py | 6 +- ...enerated_eventarc_create_pipeline_async.py | 6 +- ...generated_eventarc_create_trigger_async.py | 6 +- ...generated_eventarc_delete_channel_async.py | 6 +- ...ventarc_delete_channel_connection_async.py | 6 +- ...erated_eventarc_delete_enrollment_async.py | 6 +- ...eventarc_delete_google_api_source_async.py | 6 +- ...rated_eventarc_delete_message_bus_async.py | 6 +- ...enerated_eventarc_delete_pipeline_async.py | 6 +- ...generated_eventarc_delete_trigger_async.py | 6 +- ...generated_eventarc_update_channel_async.py | 6 +- ...erated_eventarc_update_enrollment_async.py | 6 +- ...eventarc_update_google_api_source_async.py | 6 +- ...rated_eventarc_update_message_bus_async.py | 6 +- ...enerated_eventarc_update_pipeline_async.py | 6 +- ...generated_eventarc_update_trigger_async.py | 6 +- packages/google-cloud-eventarc/setup.py | 11 +- .../testing/constraints-3.10.txt | 23 +-- .../testing/constraints-3.9.txt | 14 -- .../unit/gapic/eventarc_v1/test_eventarc.py | 140 ++++++---------- packages/google-cloud-filestore/docs/conf.py | 4 +- .../google/cloud/filestore_v1/__init__.py | 25 +-- .../cloud_filestore_manager/async_client.py | 50 +++--- packages/google-cloud-filestore/noxfile.py | 4 +- ...d_filestore_manager_create_backup_async.py | 6 +- ...filestore_manager_create_instance_async.py | 6 +- ...filestore_manager_create_snapshot_async.py | 6 +- ...d_filestore_manager_delete_backup_async.py | 6 +- ...filestore_manager_delete_instance_async.py | 6 +- ...filestore_manager_delete_snapshot_async.py | 6 +- ...filestore_manager_promote_replica_async.py | 6 +- ...ilestore_manager_restore_instance_async.py | 6 +- ...filestore_manager_revert_instance_async.py | 6 +- ...d_filestore_manager_update_backup_async.py | 6 +- ...filestore_manager_update_instance_async.py | 6 +- ...filestore_manager_update_snapshot_async.py | 6 +- packages/google-cloud-filestore/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 14 -- .../test_cloud_filestore_manager.py | 66 +++----- .../docs/conf.py | 4 +- .../cloud/financialservices_v1/__init__.py | 25 +-- .../services/aml/async_client.py | 98 +++++------ .../google-cloud-financialservices/noxfile.py | 4 +- ...erated_aml_create_backtest_result_async.py | 6 +- ...s_v1_generated_aml_create_dataset_async.py | 6 +- ...enerated_aml_create_engine_config_async.py | 6 +- ..._v1_generated_aml_create_instance_async.py | 6 +- ...ces_v1_generated_aml_create_model_async.py | 6 +- ...ated_aml_create_prediction_result_async.py | 6 +- ...erated_aml_delete_backtest_result_async.py | 6 +- ...s_v1_generated_aml_delete_dataset_async.py | 6 +- ...enerated_aml_delete_engine_config_async.py | 6 +- ..._v1_generated_aml_delete_instance_async.py | 6 +- ...ces_v1_generated_aml_delete_model_async.py | 6 +- ...ated_aml_delete_prediction_result_async.py | 6 +- ...l_export_backtest_result_metadata_async.py | 6 +- ...aml_export_engine_config_metadata_async.py | 6 +- ...nerated_aml_export_model_metadata_async.py | 6 +- ...export_prediction_result_metadata_async.py | 6 +- ...ted_aml_export_registered_parties_async.py | 6 +- ...ted_aml_import_registered_parties_async.py | 6 +- ...erated_aml_update_backtest_result_async.py | 6 +- ...s_v1_generated_aml_update_dataset_async.py | 6 +- ...enerated_aml_update_engine_config_async.py | 6 +- ..._v1_generated_aml_update_instance_async.py | 6 +- ...ces_v1_generated_aml_update_model_async.py | 6 +- ...ated_aml_update_prediction_result_async.py | 6 +- .../google-cloud-financialservices/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../gapic/financialservices_v1/test_aml.py | 134 ++++++--------- packages/google-cloud-firestore/docs/conf.py | 4 +- .../services/firestore_admin/async_client.py | 42 ++--- .../google/cloud/firestore_bundle/__init__.py | 25 +-- packages/google-cloud-firestore/noxfile.py | 4 +- ...store_admin_bulk_delete_documents_async.py | 6 +- ...ed_firestore_admin_clone_database_async.py | 6 +- ...d_firestore_admin_create_database_async.py | 6 +- ...ated_firestore_admin_create_index_async.py | 6 +- ...d_firestore_admin_delete_database_async.py | 6 +- ..._firestore_admin_export_documents_async.py | 6 +- ..._firestore_admin_import_documents_async.py | 6 +- ..._firestore_admin_restore_database_async.py | 6 +- ...d_firestore_admin_update_database_async.py | 6 +- ...ated_firestore_admin_update_field_async.py | 6 +- packages/google-cloud-firestore/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 14 -- .../test_firestore_admin.py | 90 +++++------ .../unit/gapic/firestore_v1/test_firestore.py | 62 +++---- packages/google-cloud-functions/docs/conf.py | 4 +- .../google/cloud/functions_v1/__init__.py | 25 +-- .../cloud_functions_service/async_client.py | 14 +- .../google/cloud/functions_v2/__init__.py | 25 +-- .../services/function_service/async_client.py | 14 +- packages/google-cloud-functions/noxfile.py | 4 +- ...functions_service_create_function_async.py | 6 +- ...functions_service_delete_function_async.py | 6 +- ...functions_service_update_function_async.py | 6 +- ..._function_service_create_function_async.py | 6 +- ..._function_service_delete_function_async.py | 6 +- ..._function_service_update_function_async.py | 6 +- packages/google-cloud-functions/setup.py | 11 +- .../testing/constraints-3.10.txt | 23 +-- .../testing/constraints-3.9.txt | 14 -- .../test_cloud_functions_service.py | 36 ++--- .../functions_v2/test_function_service.py | 36 ++--- .../docs/conf.py | 4 +- .../gdchardwaremanagement_v1alpha/__init__.py | 25 +-- .../gdc_hardware_management/async_client.py | 82 +++++----- .../types/resources.py | 11 +- .../noxfile.py | 4 +- ..._hardware_management_cancel_order_async.py | 6 +- ...ardware_management_create_comment_async.py | 6 +- ...rdware_management_create_hardware_async.py | 6 +- ..._management_create_hardware_group_async.py | 6 +- ..._hardware_management_create_order_async.py | 6 +- ...c_hardware_management_create_site_async.py | 6 +- ...c_hardware_management_create_zone_async.py | 6 +- ...rdware_management_delete_hardware_async.py | 6 +- ..._management_delete_hardware_group_async.py | 6 +- ..._hardware_management_delete_order_async.py | 6 +- ...c_hardware_management_delete_site_async.py | 6 +- ...c_hardware_management_delete_zone_async.py | 6 +- ...agement_request_order_date_change_async.py | 6 +- ...ware_management_signal_zone_state_async.py | 6 +- ..._hardware_management_submit_order_async.py | 6 +- ...rdware_management_update_hardware_async.py | 6 +- ..._management_update_hardware_group_async.py | 6 +- ..._hardware_management_update_order_async.py | 6 +- ...c_hardware_management_update_site_async.py | 6 +- ...c_hardware_management_update_zone_async.py | 6 +- .../setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../test_gdc_hardware_management.py | 136 ++++++---------- .../docs/conf.py | 4 +- .../cloud/geminidataanalytics_v1/__init__.py | 25 +-- .../data_agent_service/async_client.py | 14 +- .../geminidataanalytics_v1alpha/__init__.py | 25 +-- .../data_agent_service/async_client.py | 14 +- .../geminidataanalytics_v1beta/__init__.py | 25 +-- .../data_agent_service/async_client.py | 14 +- .../noxfile.py | 4 +- ...a_agent_service_create_data_agent_async.py | 6 +- ...a_agent_service_delete_data_agent_async.py | 6 +- ...a_agent_service_update_data_agent_async.py | 6 +- ...a_agent_service_create_data_agent_async.py | 6 +- ...a_agent_service_delete_data_agent_async.py | 6 +- ...a_agent_service_update_data_agent_async.py | 6 +- ...a_agent_service_create_data_agent_async.py | 6 +- ...a_agent_service_delete_data_agent_async.py | 6 +- ...a_agent_service_update_data_agent_async.py | 6 +- .../google-cloud-geminidataanalytics/setup.py | 11 +- .../testing/constraints-3.10.txt | 23 +-- .../testing/constraints-3.9.txt | 14 -- .../test_data_agent_service.py | 48 ++---- .../test_data_chat_service.py | 38 ++--- .../test_data_agent_service.py | 48 ++---- .../test_data_chat_service.py | 40 ++--- .../test_data_agent_service.py | 48 ++---- .../test_data_chat_service.py | 40 ++--- packages/google-cloud-gke-backup/docs/conf.py | 4 +- .../google/cloud/gke_backup_v1/__init__.py | 25 +-- .../services/backup_for_gke/async_client.py | 74 ++++----- packages/google-cloud-gke-backup/noxfile.py | 4 +- ...ated_backup_for_gke_create_backup_async.py | 6 +- ...kup_for_gke_create_backup_channel_async.py | 6 +- ...backup_for_gke_create_backup_plan_async.py | 6 +- ...ted_backup_for_gke_create_restore_async.py | 6 +- ...up_for_gke_create_restore_channel_async.py | 6 +- ...ackup_for_gke_create_restore_plan_async.py | 6 +- ...ated_backup_for_gke_delete_backup_async.py | 6 +- ...kup_for_gke_delete_backup_channel_async.py | 6 +- ...backup_for_gke_delete_backup_plan_async.py | 6 +- ...ted_backup_for_gke_delete_restore_async.py | 6 +- ...up_for_gke_delete_restore_channel_async.py | 6 +- ...ackup_for_gke_delete_restore_plan_async.py | 6 +- ...ated_backup_for_gke_update_backup_async.py | 6 +- ...kup_for_gke_update_backup_channel_async.py | 6 +- ...backup_for_gke_update_backup_plan_async.py | 6 +- ...ted_backup_for_gke_update_restore_async.py | 6 +- ...up_for_gke_update_restore_channel_async.py | 6 +- ...ackup_for_gke_update_restore_plan_async.py | 6 +- packages/google-cloud-gke-backup/setup.py | 11 +- .../testing/constraints-3.10.txt | 23 +-- .../testing/constraints-3.9.txt | 14 -- .../gke_backup_v1/test_backup_for_gke.py | 152 ++++++------------ .../docs/conf.py | 4 +- .../cloud/gkeconnect/gateway_v1/__init__.py | 25 +-- .../gkeconnect/gateway_v1beta1/__init__.py | 25 +-- .../noxfile.py | 4 +- .../google-cloud-gke-connect-gateway/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../gapic/gateway_v1/test_gateway_control.py | 16 +- .../gateway_v1beta1/test_gateway_control.py | 16 +- packages/google-cloud-gke-hub/docs/conf.py | 4 +- .../google/cloud/gkehub_v1/__init__.py | 25 +-- .../services/gke_hub/async_client.py | 98 +++++------ .../google/cloud/gkehub_v1beta1/__init__.py | 25 +-- .../async_client.py | 14 +- packages/google-cloud-gke-hub/noxfile.py | 4 +- ..._generated_gke_hub_create_feature_async.py | 6 +- ...v1_generated_gke_hub_create_fleet_async.py | 6 +- ...nerated_gke_hub_create_membership_async.py | 6 +- ...gke_hub_create_membership_binding_async.py | 6 +- ...eate_membership_rbac_role_binding_async.py | 6 +- ...v1_generated_gke_hub_create_scope_async.py | 6 +- ...ed_gke_hub_create_scope_namespace_async.py | 6 +- ...ub_create_scope_rbac_role_binding_async.py | 6 +- ..._generated_gke_hub_delete_feature_async.py | 6 +- ...v1_generated_gke_hub_delete_fleet_async.py | 6 +- ...nerated_gke_hub_delete_membership_async.py | 6 +- ...gke_hub_delete_membership_binding_async.py | 6 +- ...lete_membership_rbac_role_binding_async.py | 6 +- ...v1_generated_gke_hub_delete_scope_async.py | 6 +- ...ed_gke_hub_delete_scope_namespace_async.py | 6 +- ...ub_delete_scope_rbac_role_binding_async.py | 6 +- ..._generated_gke_hub_update_feature_async.py | 6 +- ...v1_generated_gke_hub_update_fleet_async.py | 6 +- ...nerated_gke_hub_update_membership_async.py | 6 +- ...gke_hub_update_membership_binding_async.py | 6 +- ...date_membership_rbac_role_binding_async.py | 6 +- ...v1_generated_gke_hub_update_scope_async.py | 6 +- ...ed_gke_hub_update_scope_namespace_async.py | 6 +- ...ub_update_scope_rbac_role_binding_async.py | 6 +- ...bership_service_create_membership_async.py | 6 +- ...bership_service_delete_membership_async.py | 6 +- ...bership_service_update_membership_async.py | 6 +- packages/google-cloud-gke-hub/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 14 -- .../unit/gapic/gkehub_v1/test_gke_hub.py | 148 ++++++----------- .../test_gke_hub_membership_service.py | 36 ++--- .../google-cloud-gke-multicloud/docs/conf.py | 4 +- .../cloud/gke_multicloud_v1/__init__.py | 25 +-- .../attached_clusters/async_client.py | 18 +-- .../services/aws_clusters/async_client.py | 30 ++-- .../services/azure_clusters/async_client.py | 34 ++-- .../google-cloud-gke-multicloud/noxfile.py | 4 +- ..._clusters_create_attached_cluster_async.py | 6 +- ..._clusters_delete_attached_cluster_async.py | 6 +- ..._clusters_import_attached_cluster_async.py | 6 +- ..._clusters_update_attached_cluster_async.py | 6 +- ...d_aws_clusters_create_aws_cluster_async.py | 6 +- ...aws_clusters_create_aws_node_pool_async.py | 6 +- ...d_aws_clusters_delete_aws_cluster_async.py | 6 +- ...aws_clusters_delete_aws_node_pool_async.py | 6 +- ...ers_rollback_aws_node_pool_update_async.py | 6 +- ...d_aws_clusters_update_aws_cluster_async.py | 6 +- ...aws_clusters_update_aws_node_pool_async.py | 6 +- ...zure_clusters_create_azure_client_async.py | 6 +- ...ure_clusters_create_azure_cluster_async.py | 6 +- ...e_clusters_create_azure_node_pool_async.py | 6 +- ...zure_clusters_delete_azure_client_async.py | 6 +- ...ure_clusters_delete_azure_cluster_async.py | 6 +- ...e_clusters_delete_azure_node_pool_async.py | 6 +- ...ure_clusters_update_azure_cluster_async.py | 6 +- ...e_clusters_update_azure_node_pool_async.py | 6 +- packages/google-cloud-gke-multicloud/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../test_attached_clusters.py | 38 ++--- .../gke_multicloud_v1/test_aws_clusters.py | 58 +++---- .../gke_multicloud_v1/test_azure_clusters.py | 70 +++----- .../google-cloud-gkerecommender/docs/conf.py | 4 +- .../cloud/gkerecommender_v1/__init__.py | 25 +-- .../google-cloud-gkerecommender/noxfile.py | 4 +- packages/google-cloud-gkerecommender/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../test_gke_inference_quickstart.py | 46 ++---- .../google-cloud-gsuiteaddons/docs/conf.py | 4 +- .../google/cloud/gsuiteaddons_v1/__init__.py | 25 +-- packages/google-cloud-gsuiteaddons/noxfile.py | 4 +- packages/google-cloud-gsuiteaddons/setup.py | 11 +- .../testing/constraints-3.10.txt | 23 +-- .../testing/constraints-3.9.txt | 14 -- .../gsuiteaddons_v1/test_g_suite_add_ons.py | 38 ++--- .../docs/conf.py | 4 +- .../cloud/hypercomputecluster_v1/__init__.py | 25 +-- .../hypercompute_cluster/async_client.py | 14 +- .../hypercomputecluster_v1beta/__init__.py | 25 +-- .../hypercompute_cluster/async_client.py | 14 +- .../noxfile.py | 4 +- ...percompute_cluster_create_cluster_async.py | 6 +- ...percompute_cluster_delete_cluster_async.py | 6 +- ...percompute_cluster_update_cluster_async.py | 6 +- ...percompute_cluster_create_cluster_async.py | 6 +- ...percompute_cluster_delete_cluster_async.py | 6 +- ...percompute_cluster_update_cluster_async.py | 6 +- .../google-cloud-hypercomputecluster/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../test_hypercompute_cluster.py | 30 ++-- .../test_hypercompute_cluster.py | 30 ++-- .../google-cloud-iam-logging/docs/conf.py | 4 +- .../google/cloud/iam_logging_v1/__init__.py | 25 +-- packages/google-cloud-iam-logging/noxfile.py | 4 +- packages/google-cloud-iam-logging/setup.py | 11 +- .../testing/constraints-3.10.txt | 23 +-- .../testing/constraints-3.9.txt | 14 -- packages/google-cloud-iam/docs/conf.py | 4 +- .../google/cloud/iam_admin_v1/__init__.py | 25 +-- .../cloud/iam_credentials_v1/__init__.py | 25 +-- .../google/cloud/iam_v2/__init__.py | 25 +-- .../iam_v2/services/policies/async_client.py | 14 +- .../google/cloud/iam_v2beta/__init__.py | 25 +-- .../services/policies/async_client.py | 14 +- .../google/cloud/iam_v3/__init__.py | 25 +-- .../services/policy_bindings/async_client.py | 14 +- .../async_client.py | 14 +- .../google/cloud/iam_v3beta/__init__.py | 25 +-- .../services/access_policies/async_client.py | 14 +- .../services/policy_bindings/async_client.py | 14 +- .../async_client.py | 14 +- packages/google-cloud-iam/noxfile.py | 4 +- ..._generated_policies_create_policy_async.py | 6 +- ..._generated_policies_delete_policy_async.py | 6 +- ..._generated_policies_update_policy_async.py | 6 +- ..._generated_policies_create_policy_async.py | 6 +- ..._generated_policies_delete_policy_async.py | 6 +- ..._generated_policies_update_policy_async.py | 6 +- ...cy_bindings_create_policy_binding_async.py | 6 +- ...cy_bindings_delete_policy_binding_async.py | 6 +- ...cy_bindings_update_policy_binding_async.py | 6 +- ..._principal_access_boundary_policy_async.py | 6 +- ..._principal_access_boundary_policy_async.py | 6 +- ..._principal_access_boundary_policy_async.py | 6 +- ...ess_policies_create_access_policy_async.py | 6 +- ...ess_policies_delete_access_policy_async.py | 6 +- ...ess_policies_update_access_policy_async.py | 6 +- ...cy_bindings_create_policy_binding_async.py | 6 +- ...cy_bindings_delete_policy_binding_async.py | 6 +- ...cy_bindings_update_policy_binding_async.py | 6 +- ..._principal_access_boundary_policy_async.py | 6 +- ..._principal_access_boundary_policy_async.py | 6 +- ..._principal_access_boundary_policy_async.py | 6 +- packages/google-cloud-iam/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 14 -- .../tests/unit/gapic/iam_admin_v1/test_iam.py | 38 +---- .../test_iam_credentials.py | 22 +-- .../tests/unit/gapic/iam_v2/test_policies.py | 30 ++-- .../unit/gapic/iam_v2beta/test_policies.py | 20 +-- .../unit/gapic/iam_v3/test_policy_bindings.py | 36 ++--- ...test_principal_access_boundary_policies.py | 34 ++-- .../gapic/iam_v3beta/test_access_policies.py | 36 ++--- .../gapic/iam_v3beta/test_policy_bindings.py | 36 ++--- ...test_principal_access_boundary_policies.py | 34 ++-- .../docs/conf.py | 4 +- .../__init__.py | 25 +-- .../async_client.py | 6 +- .../noxfile.py | 4 +- ...ials_service_retrieve_credentials_async.py | 6 +- .../setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../test_iam_connector_credentials_service.py | 18 +-- packages/google-cloud-iap/docs/conf.py | 4 +- .../google/cloud/iap_v1/__init__.py | 25 +-- packages/google-cloud-iap/noxfile.py | 4 +- packages/google-cloud-iap/setup.py | 11 +- .../testing/constraints-3.10.txt | 23 +-- .../testing/constraints-3.9.txt | 14 -- ...test_identity_aware_proxy_admin_service.py | 42 ++--- ...est_identity_aware_proxy_o_auth_service.py | 34 ++-- packages/google-cloud-ids/docs/conf.py | 4 +- .../google/cloud/ids_v1/__init__.py | 25 +-- .../cloud/ids_v1/services/ids/async_client.py | 10 +- packages/google-cloud-ids/noxfile.py | 4 +- ..._v1_generated_ids_create_endpoint_async.py | 6 +- ..._v1_generated_ids_delete_endpoint_async.py | 6 +- packages/google-cloud-ids/setup.py | 11 +- .../testing/constraints-3.10.txt | 21 +-- .../testing/constraints-3.9.txt | 13 -- .../tests/unit/gapic/ids_v1/test_ids.py | 30 ++-- 454 files changed, 2569 insertions(+), 4282 deletions(-) delete mode 100644 packages/google-cloud-edgecontainer/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-edgenetwork/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-error-reporting/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-essential-contacts/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-eventarc-publishing/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-eventarc/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-filestore/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-financialservices/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-firestore/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-functions/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-gdchardwaremanagement/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-geminidataanalytics/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-gke-backup/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-gke-connect-gateway/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-gke-hub/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-gke-multicloud/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-gkerecommender/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-gsuiteaddons/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-hypercomputecluster/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-iam-logging/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-iam/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-iamconnectorcredentials/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-iap/testing/constraints-3.9.txt delete mode 100644 packages/google-cloud-ids/testing/constraints-3.9.txt diff --git a/packages/google-cloud-edgecontainer/docs/conf.py b/packages/google-cloud-edgecontainer/docs/conf.py index 845780991e4e..a26e95649103 100644 --- a/packages/google-cloud-edgecontainer/docs/conf.py +++ b/packages/google-cloud-edgecontainer/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-edgecontainer" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/__init__.py b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/__init__.py index 4dac2936478a..49ba75ed766e 100644 --- a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/__init__.py +++ b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.edge_container import EdgeContainerAsyncClient, EdgeContainerClient from .types.resources import ( @@ -93,28 +87,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.edgecontainer_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py index b5aa85aec205..71257742f959 100644 --- a/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py +++ b/packages/google-cloud-edgecontainer/google/cloud/edgecontainer_v1/services/edge_container/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -597,11 +597,11 @@ async def sample_create_cluster(): ) # Make the request - operation = client.create_cluster(request=request) + operation = await client.create_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -738,11 +738,11 @@ async def sample_update_cluster(): ) # Make the request - operation = client.update_cluster(request=request) + operation = await client.update_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -879,11 +879,11 @@ async def sample_upgrade_cluster(): ) # Make the request - operation = client.upgrade_cluster(request=request) + operation = await client.upgrade_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1020,11 +1020,11 @@ async def sample_delete_cluster(): ) # Make the request - operation = client.delete_cluster(request=request) + operation = await client.delete_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1615,11 +1615,11 @@ async def sample_create_node_pool(): ) # Make the request - operation = client.create_node_pool(request=request) + operation = await client.create_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1755,11 +1755,11 @@ async def sample_update_node_pool(): ) # Make the request - operation = client.update_node_pool(request=request) + operation = await client.update_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1892,11 +1892,11 @@ async def sample_delete_node_pool(): ) # Make the request - operation = client.delete_node_pool(request=request) + operation = await client.delete_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2502,11 +2502,11 @@ async def sample_create_vpn_connection(): ) # Make the request - operation = client.create_vpn_connection(request=request) + operation = await client.create_vpn_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2645,11 +2645,11 @@ async def sample_delete_vpn_connection(): ) # Make the request - operation = client.delete_vpn_connection(request=request) + operation = await client.delete_vpn_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/noxfile.py b/packages/google-cloud-edgecontainer/noxfile.py index 74d5b46b07c3..49f3fca93d7a 100644 --- a/packages/google-cloud-edgecontainer/noxfile.py +++ b/packages/google-cloud-edgecontainer/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py index 90a9a34b1ae4..dda425f8b4a6 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -59,11 +59,11 @@ async def sample_create_cluster(): ) # Make the request - operation = client.create_cluster(request=request) + operation = await client.create_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py index 943873fea13a..f40e751145a4 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_node_pool(): ) # Make the request - operation = client.create_node_pool(request=request) + operation = await client.create_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py index 7461d7b7d6b0..bbd911d203bf 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_create_vpn_connection_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_vpn_connection(): ) # Make the request - operation = client.create_vpn_connection(request=request) + operation = await client.create_vpn_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py index 29209498c64b..92f2883024e6 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_cluster(): ) # Make the request - operation = client.delete_cluster(request=request) + operation = await client.delete_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py index 7d12e173d636..6372238452ee 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_node_pool(): ) # Make the request - operation = client.delete_node_pool(request=request) + operation = await client.delete_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py index 108618998ad7..d9030d168885 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_delete_vpn_connection_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_vpn_connection(): ) # Make the request - operation = client.delete_vpn_connection(request=request) + operation = await client.delete_vpn_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py index 387e96f2e29c..09b1759674ba 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_cluster(): request = edgecontainer_v1.UpdateClusterRequest() # Make the request - operation = client.update_cluster(request=request) + operation = await client.update_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py index 8d56f28d393e..23876fd5e3f7 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_update_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_node_pool(): request = edgecontainer_v1.UpdateNodePoolRequest() # Make the request - operation = client.update_node_pool(request=request) + operation = await client.update_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_upgrade_cluster_async.py b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_upgrade_cluster_async.py index 256c2549c201..5c1d0b4ccf79 100644 --- a/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_upgrade_cluster_async.py +++ b/packages/google-cloud-edgecontainer/samples/generated_samples/edgecontainer_v1_generated_edge_container_upgrade_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_upgrade_cluster(): ) # Make the request - operation = client.upgrade_cluster(request=request) + operation = await client.upgrade_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgecontainer/setup.py b/packages/google-cloud-edgecontainer/setup.py index b34844d97b1f..ec3453f3baf6 100644 --- a/packages/google-cloud-edgecontainer/setup.py +++ b/packages/google-cloud-edgecontainer/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-edgecontainer/testing/constraints-3.10.txt b/packages/google-cloud-edgecontainer/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-edgecontainer/testing/constraints-3.10.txt +++ b/packages/google-cloud-edgecontainer/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-edgecontainer/testing/constraints-3.9.txt b/packages/google-cloud-edgecontainer/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-edgecontainer/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py b/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py index b73503bb150c..50fac72bfdf7 100644 --- a/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py +++ b/packages/google-cloud-edgecontainer/tests/unit/gapic/edgecontainer_v1/test_edge_container.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,19 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import re - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os +import re from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1839,11 +1833,7 @@ async def test_list_clusters_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_clusters(request={}) - ).pages: + async for page_ in (await client.list_clusters(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4806,11 +4796,7 @@ async def test_list_node_pools_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_node_pools(request={}) - ).pages: + async for page_ in (await client.list_node_pools(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6691,11 +6677,7 @@ async def test_list_machines_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_machines(request={}) - ).pages: + async for page_ in (await client.list_machines(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7579,11 +7561,7 @@ async def test_list_vpn_connections_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_vpn_connections(request={}) - ).pages: + async for page_ in (await client.list_vpn_connections(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9126,7 +9104,7 @@ def test_list_clusters_rest_required_fields(request_type=service.ListClustersReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_clusters_rest_unset_required_fields(): @@ -9372,7 +9350,7 @@ def test_get_cluster_rest_required_fields(request_type=service.GetClusterRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_cluster_rest_unset_required_fields(): @@ -9569,7 +9547,7 @@ def test_create_cluster_rest_required_fields(request_type=service.CreateClusterR ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_cluster_rest_unset_required_fields(): @@ -9868,7 +9846,7 @@ def test_upgrade_cluster_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_upgrade_cluster_rest_unset_required_fields(): @@ -10057,7 +10035,7 @@ def test_delete_cluster_rest_required_fields(request_type=service.DeleteClusterR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_cluster_rest_unset_required_fields(): @@ -10237,7 +10215,7 @@ def test_generate_access_token_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_access_token_rest_unset_required_fields(): @@ -10422,7 +10400,7 @@ def test_generate_offline_credential_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_offline_credential_rest_unset_required_fields(): @@ -10611,7 +10589,7 @@ def test_list_node_pools_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_node_pools_rest_unset_required_fields(): @@ -10862,7 +10840,7 @@ def test_get_node_pool_rest_required_fields(request_type=service.GetNodePoolRequ expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_node_pool_rest_unset_required_fields(): @@ -11066,7 +11044,7 @@ def test_create_node_pool_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_node_pool_rest_unset_required_fields(): @@ -11371,7 +11349,7 @@ def test_delete_node_pool_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_node_pool_rest_unset_required_fields(): @@ -11556,7 +11534,7 @@ def test_list_machines_rest_required_fields(request_type=service.ListMachinesReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_machines_rest_unset_required_fields(): @@ -11802,7 +11780,7 @@ def test_get_machine_rest_required_fields(request_type=service.GetMachineRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_machine_rest_unset_required_fields(): @@ -11992,7 +11970,7 @@ def test_list_vpn_connections_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_vpn_connections_rest_unset_required_fields(): @@ -12247,7 +12225,7 @@ def test_get_vpn_connection_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_vpn_connection_rest_unset_required_fields(): @@ -12454,7 +12432,7 @@ def test_create_vpn_connection_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_vpn_connection_rest_unset_required_fields(): @@ -12656,7 +12634,7 @@ def test_delete_vpn_connection_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_vpn_connection_rest_unset_required_fields(): @@ -12836,7 +12814,7 @@ def test_get_server_config_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_server_config_rest_unset_required_fields(): diff --git a/packages/google-cloud-edgenetwork/docs/conf.py b/packages/google-cloud-edgenetwork/docs/conf.py index 0d61ec61f2ed..d42fc294e2be 100644 --- a/packages/google-cloud-edgenetwork/docs/conf.py +++ b/packages/google-cloud-edgenetwork/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-edgenetwork" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/__init__.py b/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/__init__.py index 32b2e3d74114..315857c34d38 100644 --- a/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/__init__.py +++ b/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.edge_network import EdgeNetworkAsyncClient, EdgeNetworkClient from .types.resources import ( @@ -93,28 +87,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.edgenetwork_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/services/edge_network/async_client.py b/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/services/edge_network/async_client.py index fd18d1e8d862..60ab87b052c9 100644 --- a/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/services/edge_network/async_client.py +++ b/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/services/edge_network/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -1053,11 +1053,11 @@ async def sample_create_network(): ) # Make the request - operation = client.create_network(request=request) + operation = await client.create_network(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1193,11 +1193,11 @@ async def sample_delete_network(): ) # Make the request - operation = client.delete_network(request=request) + operation = await client.delete_network(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1563,11 +1563,11 @@ async def sample_create_subnet(): ) # Make the request - operation = client.create_subnet(request=request) + operation = await client.create_subnet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1708,11 +1708,11 @@ async def sample_update_subnet(): ) # Make the request - operation = client.update_subnet(request=request) + operation = await client.update_subnet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1846,11 +1846,11 @@ async def sample_delete_subnet(): ) # Make the request - operation = client.delete_subnet(request=request) + operation = await client.delete_subnet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2574,11 +2574,11 @@ async def sample_create_interconnect_attachment(): ) # Make the request - operation = client.create_interconnect_attachment(request=request) + operation = await client.create_interconnect_attachment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2718,11 +2718,11 @@ async def sample_delete_interconnect_attachment(): ) # Make the request - operation = client.delete_interconnect_attachment(request=request) + operation = await client.delete_interconnect_attachment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3200,11 +3200,11 @@ async def sample_create_router(): ) # Make the request - operation = client.create_router(request=request) + operation = await client.create_router(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3345,11 +3345,11 @@ async def sample_update_router(): ) # Make the request - operation = client.update_router(request=request) + operation = await client.update_router(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3483,11 +3483,11 @@ async def sample_delete_router(): ) # Make the request - operation = client.delete_router(request=request) + operation = await client.delete_router(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/types/resources.py b/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/types/resources.py index ec273aae1fae..2e88cb320cdd 100644 --- a/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/types/resources.py +++ b/packages/google-cloud-edgenetwork/google/cloud/edgenetwork_v1/types/resources.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -1050,7 +1050,7 @@ class BgpPeerStatus(proto.Message): Time this session has been up. Format: - 14 years, 51 weeks, 6 days, 23 hours, 59 + 14 years, 51 weeks, 6 days, 23 hours, 59 minutes, 59 seconds uptime_seconds (int): Time this session has been up, in seconds. diff --git a/packages/google-cloud-edgenetwork/noxfile.py b/packages/google-cloud-edgenetwork/noxfile.py index 64fcbb19b148..6479e2d17498 100644 --- a/packages/google-cloud-edgenetwork/noxfile.py +++ b/packages/google-cloud-edgenetwork/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_interconnect_attachment_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_interconnect_attachment_async.py index 20af9a737704..d1abc352f71b 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_interconnect_attachment_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_interconnect_attachment_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_create_interconnect_attachment(): ) # Make the request - operation = client.create_interconnect_attachment(request=request) + operation = await client.create_interconnect_attachment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_network_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_network_async.py index 038b5be55382..2d6db429835f 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_network_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_network_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_network(): ) # Make the request - operation = client.create_network(request=request) + operation = await client.create_network(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_router_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_router_async.py index 8886c7a32ce2..c75d586daf0f 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_router_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_router_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_router(): ) # Make the request - operation = client.create_router(request=request) + operation = await client.create_router(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_subnet_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_subnet_async.py index 22b3b60b96e4..f2ce1cc77de0 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_subnet_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_create_subnet_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_subnet(): ) # Make the request - operation = client.create_subnet(request=request) + operation = await client.create_subnet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_interconnect_attachment_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_interconnect_attachment_async.py index f7acd404c3db..d39e56f60465 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_interconnect_attachment_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_interconnect_attachment_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_interconnect_attachment(): ) # Make the request - operation = client.delete_interconnect_attachment(request=request) + operation = await client.delete_interconnect_attachment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_network_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_network_async.py index bfa449fd9dc1..38d6485e8f1b 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_network_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_network_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_network(): ) # Make the request - operation = client.delete_network(request=request) + operation = await client.delete_network(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_router_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_router_async.py index 4308bbef35bc..300d6f00287b 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_router_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_router_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_router(): ) # Make the request - operation = client.delete_router(request=request) + operation = await client.delete_router(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_subnet_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_subnet_async.py index 2e897addec3d..b9ae8c4ca34d 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_subnet_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_delete_subnet_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_subnet(): ) # Make the request - operation = client.delete_subnet(request=request) + operation = await client.delete_subnet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_router_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_router_async.py index ec820f41b3e3..4968c6aacec1 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_router_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_router_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_update_router(): ) # Make the request - operation = client.update_router(request=request) + operation = await client.update_router(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_subnet_async.py b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_subnet_async.py index b1c15c7162dd..2513ebede255 100644 --- a/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_subnet_async.py +++ b/packages/google-cloud-edgenetwork/samples/generated_samples/edgenetwork_v1_generated_edge_network_update_subnet_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_update_subnet(): ) # Make the request - operation = client.update_subnet(request=request) + operation = await client.update_subnet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-edgenetwork/setup.py b/packages/google-cloud-edgenetwork/setup.py index 988e46c34f2f..37c95d17a4b9 100644 --- a/packages/google-cloud-edgenetwork/setup.py +++ b/packages/google-cloud-edgenetwork/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-edgenetwork/testing/constraints-3.10.txt b/packages/google-cloud-edgenetwork/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-edgenetwork/testing/constraints-3.10.txt +++ b/packages/google-cloud-edgenetwork/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-edgenetwork/testing/constraints-3.9.txt b/packages/google-cloud-edgenetwork/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-edgenetwork/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-edgenetwork/tests/unit/gapic/edgenetwork_v1/test_edge_network.py b/packages/google-cloud-edgenetwork/tests/unit/gapic/edgenetwork_v1/test_edge_network.py index 8f3f46254b68..b1a71517a129 100644 --- a/packages/google-cloud-edgenetwork/tests/unit/gapic/edgenetwork_v1/test_edge_network.py +++ b/packages/google-cloud-edgenetwork/tests/unit/gapic/edgenetwork_v1/test_edge_network.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2116,11 +2110,7 @@ async def test_list_zones_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_zones(request={}) - ).pages: + async for page_ in (await client.list_zones(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2964,11 +2954,7 @@ async def test_list_networks_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_networks(request={}) - ).pages: + async for page_ in (await client.list_networks(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4817,11 +4803,7 @@ async def test_list_subnets_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_subnets(request={}) - ).pages: + async for page_ in (await client.list_subnets(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6732,11 +6714,7 @@ async def test_list_interconnects_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_interconnects(request={}) - ).pages: + async for page_ in (await client.list_interconnects(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7984,9 +7962,7 @@ async def test_list_interconnect_attachments_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_interconnect_attachments(request={}) ).pages: pages.append(page_) @@ -9608,11 +9584,7 @@ async def test_list_routers_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_routers(request={}) - ).pages: + async for page_ in (await client.list_routers(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -11394,7 +11366,7 @@ def test_initialize_zone_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_initialize_zone_rest_unset_required_fields(): @@ -11579,7 +11551,7 @@ def test_list_zones_rest_required_fields(request_type=service.ListZonesRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_zones_rest_unset_required_fields(): @@ -11825,7 +11797,7 @@ def test_get_zone_rest_required_fields(request_type=service.GetZoneRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_zone_rest_unset_required_fields(): @@ -12009,7 +11981,7 @@ def test_list_networks_rest_required_fields(request_type=service.ListNetworksReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_networks_rest_unset_required_fields(): @@ -12256,7 +12228,7 @@ def test_get_network_rest_required_fields(request_type=service.GetNetworkRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_network_rest_unset_required_fields(): @@ -12438,7 +12410,7 @@ def test_diagnose_network_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_diagnose_network_rest_unset_required_fields(): @@ -12638,7 +12610,7 @@ def test_create_network_rest_required_fields(request_type=service.CreateNetworkR ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_network_rest_unset_required_fields(): @@ -12833,7 +12805,7 @@ def test_delete_network_rest_required_fields(request_type=service.DeleteNetworkR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_network_rest_unset_required_fields(): @@ -13018,7 +12990,7 @@ def test_list_subnets_rest_required_fields(request_type=service.ListSubnetsReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_subnets_rest_unset_required_fields(): @@ -13265,7 +13237,7 @@ def test_get_subnet_rest_required_fields(request_type=service.GetSubnetRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_subnet_rest_unset_required_fields(): @@ -13465,7 +13437,7 @@ def test_create_subnet_rest_required_fields(request_type=service.CreateSubnetReq ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_subnet_rest_unset_required_fields(): @@ -13661,7 +13633,7 @@ def test_update_subnet_rest_required_fields(request_type=service.UpdateSubnetReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_subnet_rest_unset_required_fields(): @@ -13857,7 +13829,7 @@ def test_delete_subnet_rest_required_fields(request_type=service.DeleteSubnetReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_subnet_rest_unset_required_fields(): @@ -14048,7 +14020,7 @@ def test_list_interconnects_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_interconnects_rest_unset_required_fields(): @@ -14299,7 +14271,7 @@ def test_get_interconnect_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_interconnect_rest_unset_required_fields(): @@ -14484,7 +14456,7 @@ def test_diagnose_interconnect_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_diagnose_interconnect_rest_unset_required_fields(): @@ -14678,7 +14650,7 @@ def test_list_interconnect_attachments_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_interconnect_attachments_rest_unset_required_fields(): @@ -14936,7 +14908,7 @@ def test_get_interconnect_attachment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_interconnect_attachment_rest_unset_required_fields(): @@ -15149,7 +15121,7 @@ def test_create_interconnect_attachment_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_interconnect_attachment_rest_unset_required_fields(): @@ -15353,7 +15325,7 @@ def test_delete_interconnect_attachment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_interconnect_attachment_rest_unset_required_fields(): @@ -15540,7 +15512,7 @@ def test_list_routers_rest_required_fields(request_type=service.ListRoutersReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_routers_rest_unset_required_fields(): @@ -15787,7 +15759,7 @@ def test_get_router_rest_required_fields(request_type=service.GetRouterRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_router_rest_unset_required_fields(): @@ -15967,7 +15939,7 @@ def test_diagnose_router_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_diagnose_router_rest_unset_required_fields(): @@ -16167,7 +16139,7 @@ def test_create_router_rest_required_fields(request_type=service.CreateRouterReq ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_router_rest_unset_required_fields(): @@ -16363,7 +16335,7 @@ def test_update_router_rest_required_fields(request_type=service.UpdateRouterReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_router_rest_unset_required_fields(): @@ -16559,7 +16531,7 @@ def test_delete_router_rest_required_fields(request_type=service.DeleteRouterReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_router_rest_unset_required_fields(): diff --git a/packages/google-cloud-enterpriseknowledgegraph/docs/conf.py b/packages/google-cloud-enterpriseknowledgegraph/docs/conf.py index 7839e3f04f2b..4665c09a347a 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/docs/conf.py +++ b/packages/google-cloud-enterpriseknowledgegraph/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-enterpriseknowledgegraph" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/__init__.py b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/__init__.py index 3e14962909a3..3c70c813e8a3 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/__init__.py +++ b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.enterprise_knowledge_graph_service import ( EnterpriseKnowledgeGraphServiceAsyncClient, @@ -69,28 +63,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.enterpriseknowledgegraph_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/types/service.py b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/types/service.py index 27f48506a12c..a16faf20d4bf 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/types/service.py +++ b/packages/google-cloud-enterpriseknowledgegraph/google/cloud/enterpriseknowledgegraph_v1/types/service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -192,7 +192,6 @@ class Options(proto.Message): - schema.org/addressLocality - schema.org/addressRegion - schema.org/addressCountry - Warning: processing will no longer be regionalized! """ diff --git a/packages/google-cloud-enterpriseknowledgegraph/noxfile.py b/packages/google-cloud-enterpriseknowledgegraph/noxfile.py index 753c70a55c41..a48020e6e34e 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/noxfile.py +++ b/packages/google-cloud-enterpriseknowledgegraph/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-enterpriseknowledgegraph/setup.py b/packages/google-cloud-enterpriseknowledgegraph/setup.py index b1d1b0a578de..b942bd7a438c 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/setup.py +++ b/packages/google-cloud-enterpriseknowledgegraph/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.10.txt b/packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.10.txt +++ b/packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.9.txt b/packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-enterpriseknowledgegraph/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py b/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py index d9db5a4053f1..081c43b78386 100644 --- a/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py +++ b/packages/google-cloud-enterpriseknowledgegraph/tests/unit/gapic/enterpriseknowledgegraph_v1/test_enterprise_knowledge_graph_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2706,9 +2700,7 @@ async def test_list_entity_reconciliation_jobs_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_entity_reconciliation_jobs(request={}) ).pages: pages.append(page_) @@ -4804,7 +4796,7 @@ def test_create_entity_reconciliation_job_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_entity_reconciliation_job_rest_unset_required_fields(): @@ -5003,7 +4995,7 @@ def test_get_entity_reconciliation_job_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_entity_reconciliation_job_rest_unset_required_fields(): @@ -5198,7 +5190,7 @@ def test_list_entity_reconciliation_jobs_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_entity_reconciliation_jobs_rest_unset_required_fields(): @@ -5455,7 +5447,7 @@ def test_cancel_entity_reconciliation_job_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_cancel_entity_reconciliation_job_rest_unset_required_fields(): @@ -5637,7 +5629,7 @@ def test_delete_entity_reconciliation_job_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_entity_reconciliation_job_rest_unset_required_fields(): @@ -5835,7 +5827,7 @@ def test_lookup_rest_required_fields(request_type=service.LookupRequest): ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_lookup_rest_unset_required_fields(): @@ -6048,7 +6040,7 @@ def test_search_rest_required_fields(request_type=service.SearchRequest): ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_search_rest_unset_required_fields(): @@ -6265,7 +6257,7 @@ def test_lookup_public_kg_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_lookup_public_kg_rest_unset_required_fields(): @@ -6482,7 +6474,7 @@ def test_search_public_kg_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_search_public_kg_rest_unset_required_fields(): diff --git a/packages/google-cloud-error-reporting/docs/conf.py b/packages/google-cloud-error-reporting/docs/conf.py index a7e85a8bd506..bc3c7522258b 100644 --- a/packages/google-cloud-error-reporting/docs/conf.py +++ b/packages/google-cloud-error-reporting/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-error-reporting" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-error-reporting/google/cloud/errorreporting_v1beta1/__init__.py b/packages/google-cloud-error-reporting/google/cloud/errorreporting_v1beta1/__init__.py index 930b9ece3d3c..5f955693de7c 100644 --- a/packages/google-cloud-error-reporting/google/cloud/errorreporting_v1beta1/__init__.py +++ b/packages/google-cloud-error-reporting/google/cloud/errorreporting_v1beta1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.error_group_service import ( ErrorGroupServiceAsyncClient, @@ -81,28 +75,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.errorreporting_v1beta1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-error-reporting/noxfile.py b/packages/google-cloud-error-reporting/noxfile.py index 1f4fd2f44b39..e10f7aa81a9c 100644 --- a/packages/google-cloud-error-reporting/noxfile.py +++ b/packages/google-cloud-error-reporting/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -391,7 +390,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-error-reporting/setup.py b/packages/google-cloud-error-reporting/setup.py index cc21be84fe69..53e7d39aca33 100644 --- a/packages/google-cloud-error-reporting/setup.py +++ b/packages/google-cloud-error-reporting/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,12 +41,12 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "google-cloud-logging>=3.9.0, <4.0.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -74,7 +74,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -82,7 +82,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -93,7 +92,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-error-reporting/testing/constraints-3.10.txt b/packages/google-cloud-error-reporting/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-error-reporting/testing/constraints-3.10.txt +++ b/packages/google-cloud-error-reporting/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-error-reporting/testing/constraints-3.9.txt b/packages/google-cloud-error-reporting/testing/constraints-3.9.txt deleted file mode 100644 index c0fceb81ae54..000000000000 --- a/packages/google-cloud-error-reporting/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-cloud-logging==3.9.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_group_service.py b/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_group_service.py index 4a450567f334..80c65f31d6fb 100644 --- a/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_group_service.py +++ b/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_group_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2106,7 +2100,7 @@ def test_get_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_group_rest_unset_required_fields(): @@ -2279,7 +2273,7 @@ def test_update_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_group_rest_unset_required_fields(): diff --git a/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_stats_service.py b/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_stats_service.py index 384ad3cb91f6..a684eb5d9d34 100644 --- a/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_stats_service.py +++ b/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_error_stats_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1889,11 +1883,7 @@ async def test_list_group_stats_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_group_stats(request={}) - ).pages: + async for page_ in (await client.list_group_stats(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2420,11 +2410,7 @@ async def test_list_events_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_events(request={}) - ).pages: + async for page_ in (await client.list_events(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2872,7 +2858,7 @@ def test_list_group_stats_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_group_stats_rest_unset_required_fields(): @@ -3156,7 +3142,7 @@ def test_list_events_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_events_rest_unset_required_fields(): @@ -3414,7 +3400,7 @@ def test_delete_events_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_events_rest_unset_required_fields(): diff --git a/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_report_errors_service.py b/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_report_errors_service.py index 0dfb0c49eefa..3d152aba09f9 100644 --- a/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_report_errors_service.py +++ b/packages/google-cloud-error-reporting/tests/unit/gapic/errorreporting_v1beta1/test_report_errors_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1846,7 +1840,7 @@ def test_report_error_event_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_report_error_event_rest_unset_required_fields(): diff --git a/packages/google-cloud-essential-contacts/docs/conf.py b/packages/google-cloud-essential-contacts/docs/conf.py index 03123e1c9fa8..071f5684c553 100644 --- a/packages/google-cloud-essential-contacts/docs/conf.py +++ b/packages/google-cloud-essential-contacts/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-essential-contacts" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/__init__.py b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/__init__.py index 823cd59fbe49..1478133cb01c 100644 --- a/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/__init__.py +++ b/packages/google-cloud-essential-contacts/google/cloud/essential_contacts_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.essential_contacts_service import ( EssentialContactsServiceAsyncClient, @@ -56,28 +50,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.essential_contacts_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-essential-contacts/noxfile.py b/packages/google-cloud-essential-contacts/noxfile.py index caa82cdb2bb3..324debbca8b0 100644 --- a/packages/google-cloud-essential-contacts/noxfile.py +++ b/packages/google-cloud-essential-contacts/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-essential-contacts/setup.py b/packages/google-cloud-essential-contacts/setup.py index f7d7f8cab3e3..409134a456a0 100644 --- a/packages/google-cloud-essential-contacts/setup.py +++ b/packages/google-cloud-essential-contacts/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-essential-contacts/testing/constraints-3.10.txt b/packages/google-cloud-essential-contacts/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-essential-contacts/testing/constraints-3.10.txt +++ b/packages/google-cloud-essential-contacts/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-essential-contacts/testing/constraints-3.9.txt b/packages/google-cloud-essential-contacts/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-essential-contacts/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py b/packages/google-cloud-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py index be7b8cc89f5e..5f2d41e8a1f5 100644 --- a/packages/google-cloud-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py +++ b/packages/google-cloud-essential-contacts/tests/unit/gapic/essential_contacts_v1/test_essential_contacts_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2590,11 +2584,7 @@ async def test_list_contacts_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_contacts(request={}) - ).pages: + async for page_ in (await client.list_contacts(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3679,11 +3669,7 @@ async def test_compute_contacts_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.compute_contacts(request={}) - ).pages: + async for page_ in (await client.compute_contacts(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4039,7 +4025,7 @@ def test_create_contact_rest_required_fields(request_type=service.CreateContactR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_contact_rest_unset_required_fields(): @@ -4221,7 +4207,7 @@ def test_update_contact_rest_required_fields(request_type=service.UpdateContactR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_contact_rest_unset_required_fields(): @@ -4405,7 +4391,7 @@ def test_list_contacts_rest_required_fields(request_type=service.ListContactsReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_contacts_rest_unset_required_fields(): @@ -4648,7 +4634,7 @@ def test_get_contact_rest_required_fields(request_type=service.GetContactRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_contact_rest_unset_required_fields(): @@ -4819,7 +4805,7 @@ def test_delete_contact_rest_required_fields(request_type=service.DeleteContactR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_contact_rest_unset_required_fields(): @@ -5003,7 +4989,7 @@ def test_compute_contacts_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_compute_contacts_rest_unset_required_fields(): @@ -5197,7 +5183,7 @@ def test_send_test_message_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_send_test_message_rest_unset_required_fields(): diff --git a/packages/google-cloud-eventarc-publishing/docs/conf.py b/packages/google-cloud-eventarc-publishing/docs/conf.py index f5b780f6a552..f1f0e0611d1f 100644 --- a/packages/google-cloud-eventarc-publishing/docs/conf.py +++ b/packages/google-cloud-eventarc-publishing/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-eventarc-publishing" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/__init__.py b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/__init__.py index 8098232f8629..c294d86fde47 100644 --- a/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/__init__.py +++ b/packages/google-cloud-eventarc-publishing/google/cloud/eventarc_publishing_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.publisher import PublisherAsyncClient, PublisherClient from .types.cloud_event import CloudEvent @@ -49,28 +43,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.eventarc_publishing_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-eventarc-publishing/noxfile.py b/packages/google-cloud-eventarc-publishing/noxfile.py index d1b3e6027eee..bec13ef8f983 100644 --- a/packages/google-cloud-eventarc-publishing/noxfile.py +++ b/packages/google-cloud-eventarc-publishing/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-eventarc-publishing/setup.py b/packages/google-cloud-eventarc-publishing/setup.py index 3ea3c6080214..5c6bccc69cf9 100644 --- a/packages/google-cloud-eventarc-publishing/setup.py +++ b/packages/google-cloud-eventarc-publishing/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-eventarc-publishing/testing/constraints-3.10.txt b/packages/google-cloud-eventarc-publishing/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-eventarc-publishing/testing/constraints-3.10.txt +++ b/packages/google-cloud-eventarc-publishing/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-eventarc-publishing/testing/constraints-3.9.txt b/packages/google-cloud-eventarc-publishing/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-eventarc-publishing/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-eventarc-publishing/tests/unit/gapic/eventarc_publishing_v1/test_publisher.py b/packages/google-cloud-eventarc-publishing/tests/unit/gapic/eventarc_publishing_v1/test_publisher.py index bc9541780add..cdafd5dc027a 100644 --- a/packages/google-cloud-eventarc-publishing/tests/unit/gapic/eventarc_publishing_v1/test_publisher.py +++ b/packages/google-cloud-eventarc-publishing/tests/unit/gapic/eventarc_publishing_v1/test_publisher.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2173,7 +2167,7 @@ def test_publish_rest_required_fields(request_type=publisher.PublishRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_publish_rest_unset_required_fields(): diff --git a/packages/google-cloud-eventarc/docs/conf.py b/packages/google-cloud-eventarc/docs/conf.py index 1d1df26159c0..4bffb729782f 100644 --- a/packages/google-cloud-eventarc/docs/conf.py +++ b/packages/google-cloud-eventarc/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-eventarc" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/__init__.py b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/__init__.py index e2fb52e5f7c5..d201f36ee0e7 100644 --- a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/__init__.py +++ b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.eventarc import EventarcAsyncClient, EventarcClient from .types.channel import Channel @@ -112,28 +106,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.eventarc_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py index 3d4b1e2e6c02..ddd603004c96 100644 --- a/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py +++ b/packages/google-cloud-eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -639,11 +639,11 @@ async def sample_create_trigger(): ) # Make the request - operation = client.create_trigger(request=request) + operation = await client.create_trigger(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -782,11 +782,11 @@ async def sample_update_trigger(): ) # Make the request - operation = client.update_trigger(request=request) + operation = await client.update_trigger(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -930,11 +930,11 @@ async def sample_delete_trigger(): ) # Make the request - operation = client.delete_trigger(request=request) + operation = await client.delete_trigger(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1317,11 +1317,11 @@ async def sample_create_channel(): ) # Make the request - operation = client.create_channel(request=request) + operation = await client.create_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1462,11 +1462,11 @@ async def sample_update_channel(): ) # Make the request - operation = client.update_channel(request=request) + operation = await client.update_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1602,11 +1602,11 @@ async def sample_delete_channel(): ) # Make the request - operation = client.delete_channel(request=request) + operation = await client.delete_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2218,11 +2218,11 @@ async def sample_create_channel_connection(): ) # Make the request - operation = client.create_channel_connection(request=request) + operation = await client.create_channel_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2364,11 +2364,11 @@ async def sample_delete_channel_connection(): ) # Make the request - operation = client.delete_channel_connection(request=request) + operation = await client.delete_channel_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3121,11 +3121,11 @@ async def sample_create_message_bus(): ) # Make the request - operation = client.create_message_bus(request=request) + operation = await client.create_message_bus(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3266,11 +3266,11 @@ async def sample_update_message_bus(): ) # Make the request - operation = client.update_message_bus(request=request) + operation = await client.update_message_bus(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3409,11 +3409,11 @@ async def sample_delete_message_bus(): ) # Make the request - operation = client.delete_message_bus(request=request) + operation = await client.delete_message_bus(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3797,11 +3797,11 @@ async def sample_create_enrollment(): ) # Make the request - operation = client.create_enrollment(request=request) + operation = await client.create_enrollment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3947,11 +3947,11 @@ async def sample_update_enrollment(): ) # Make the request - operation = client.update_enrollment(request=request) + operation = await client.update_enrollment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4089,11 +4089,11 @@ async def sample_delete_enrollment(): ) # Make the request - operation = client.delete_enrollment(request=request) + operation = await client.delete_enrollment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4471,11 +4471,11 @@ async def sample_create_pipeline(): ) # Make the request - operation = client.create_pipeline(request=request) + operation = await client.create_pipeline(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4618,11 +4618,11 @@ async def sample_update_pipeline(): ) # Make the request - operation = client.update_pipeline(request=request) + operation = await client.update_pipeline(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4757,11 +4757,11 @@ async def sample_delete_pipeline(): ) # Make the request - operation = client.delete_pipeline(request=request) + operation = await client.delete_pipeline(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5140,11 +5140,11 @@ async def sample_create_google_api_source(): ) # Make the request - operation = client.create_google_api_source(request=request) + operation = await client.create_google_api_source(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5291,11 +5291,11 @@ async def sample_update_google_api_source(): ) # Make the request - operation = client.update_google_api_source(request=request) + operation = await client.update_google_api_source(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5433,11 +5433,11 @@ async def sample_delete_google_api_source(): ) # Make the request - operation = client.delete_google_api_source(request=request) + operation = await client.delete_google_api_source(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/noxfile.py b/packages/google-cloud-eventarc/noxfile.py index 0a423fa2f88e..5a257fdced24 100644 --- a/packages/google-cloud-eventarc/noxfile.py +++ b/packages/google-cloud-eventarc/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_async.py index 36e8f23598a9..b78c24bcf3ab 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_channel(): ) # Make the request - operation = client.create_channel(request=request) + operation = await client.create_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_async.py index 424204fe827a..fc34af9a2624 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_channel_connection_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_channel_connection(): ) # Make the request - operation = client.create_channel_connection(request=request) + operation = await client.create_channel_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_enrollment_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_enrollment_async.py index 018116e23774..56453b1cb2c7 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_enrollment_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_enrollment_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_create_enrollment(): ) # Make the request - operation = client.create_enrollment(request=request) + operation = await client.create_enrollment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_google_api_source_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_google_api_source_async.py index 8c7d6ee27d0c..f13f15ab4b3f 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_google_api_source_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_google_api_source_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_google_api_source(): ) # Make the request - operation = client.create_google_api_source(request=request) + operation = await client.create_google_api_source(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_message_bus_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_message_bus_async.py index afc49ee74ae5..c956aa89469f 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_message_bus_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_message_bus_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_message_bus(): ) # Make the request - operation = client.create_message_bus(request=request) + operation = await client.create_message_bus(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_pipeline_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_pipeline_async.py index 84216cd611a5..330fb16ff2fd 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_pipeline_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_pipeline_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_pipeline(): ) # Make the request - operation = client.create_pipeline(request=request) + operation = await client.create_pipeline(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py index efa68ba8873d..9032a8e69914 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_create_trigger_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -53,11 +53,11 @@ async def sample_create_trigger(): ) # Make the request - operation = client.create_trigger(request=request) + operation = await client.create_trigger(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_async.py index bbe2618cac2f..60b766e60fb0 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_channel(): ) # Make the request - operation = client.delete_channel(request=request) + operation = await client.delete_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_async.py index 42a90fb26e08..c631faffe36f 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_channel_connection_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_channel_connection(): ) # Make the request - operation = client.delete_channel_connection(request=request) + operation = await client.delete_channel_connection(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_enrollment_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_enrollment_async.py index 23cb5a95b362..92159b2930e1 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_enrollment_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_enrollment_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_enrollment(): ) # Make the request - operation = client.delete_enrollment(request=request) + operation = await client.delete_enrollment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_google_api_source_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_google_api_source_async.py index e2bf27648e7c..df96f91b6c21 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_google_api_source_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_google_api_source_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_google_api_source(): ) # Make the request - operation = client.delete_google_api_source(request=request) + operation = await client.delete_google_api_source(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_message_bus_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_message_bus_async.py index 2f477acb2022..1ef18b8d14c9 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_message_bus_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_message_bus_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_message_bus(): ) # Make the request - operation = client.delete_message_bus(request=request) + operation = await client.delete_message_bus(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_pipeline_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_pipeline_async.py index 82decb850b03..d96bb3a0d7d9 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_pipeline_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_pipeline_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_pipeline(): ) # Make the request - operation = client.delete_pipeline(request=request) + operation = await client.delete_pipeline(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_async.py index 619d5fb9a38c..cc64580e3d9a 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_delete_trigger_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_trigger(): ) # Make the request - operation = client.delete_trigger(request=request) + operation = await client.delete_trigger(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_async.py index 6d3df0d32380..f8cb2b107217 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_channel(): request = eventarc_v1.UpdateChannelRequest() # Make the request - operation = client.update_channel(request=request) + operation = await client.update_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_enrollment_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_enrollment_async.py index 736fb82bf1a1..553973c1c5bf 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_enrollment_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_enrollment_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_update_enrollment(): ) # Make the request - operation = client.update_enrollment(request=request) + operation = await client.update_enrollment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_api_source_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_api_source_async.py index ab6c75b826ab..9a3e75b6efaa 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_api_source_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_google_api_source_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_update_google_api_source(): ) # Make the request - operation = client.update_google_api_source(request=request) + operation = await client.update_google_api_source(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_message_bus_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_message_bus_async.py index 490cad541ced..c378e09f6baf 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_message_bus_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_message_bus_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_message_bus(): request = eventarc_v1.UpdateMessageBusRequest() # Make the request - operation = client.update_message_bus(request=request) + operation = await client.update_message_bus(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_pipeline_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_pipeline_async.py index 3c5c702ae8c9..604c4cba30ce 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_pipeline_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_pipeline_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_pipeline(): ) # Make the request - operation = client.update_pipeline(request=request) + operation = await client.update_pipeline(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_async.py b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_async.py index 740e323df7cb..70c3b4bc7f60 100644 --- a/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_async.py +++ b/packages/google-cloud-eventarc/samples/generated_samples/eventarc_v1_generated_eventarc_update_trigger_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_trigger(): request = eventarc_v1.UpdateTriggerRequest() # Make the request - operation = client.update_trigger(request=request) + operation = await client.update_trigger(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-eventarc/setup.py b/packages/google-cloud-eventarc/setup.py index e55a624dec8e..d5406a8900bb 100644 --- a/packages/google-cloud-eventarc/setup.py +++ b/packages/google-cloud-eventarc/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-eventarc/testing/constraints-3.10.txt b/packages/google-cloud-eventarc/testing/constraints-3.10.txt index 1cd0c5a2c3d4..a92801e1c8e2 100644 --- a/packages/google-cloud-eventarc/testing/constraints-3.10.txt +++ b/packages/google-cloud-eventarc/testing/constraints-3.10.txt @@ -1,11 +1,12 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography -grpc-google-iam-v1 +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 +grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-eventarc/testing/constraints-3.9.txt b/packages/google-cloud-eventarc/testing/constraints-3.9.txt deleted file mode 100644 index dcb9a9b3d8ed..000000000000 --- a/packages/google-cloud-eventarc/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 -grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py b/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py index 22b95bd666b7..38a1df161b77 100644 --- a/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py +++ b/packages/google-cloud-eventarc/tests/unit/gapic/eventarc_v1/test_eventarc.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2152,11 +2146,7 @@ async def test_list_triggers_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_triggers(request={}) - ).pages: + async for page_ in (await client.list_triggers(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4052,11 +4042,7 @@ async def test_list_channels_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_channels(request={}) - ).pages: + async for page_ in (await client.list_channels(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5911,11 +5897,7 @@ async def test_list_providers_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_providers(request={}) - ).pages: + async for page_ in (await client.list_providers(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6819,11 +6801,7 @@ async def test_list_channel_connections_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_channel_connections(request={}) - ).pages: + async for page_ in (await client.list_channel_connections(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9142,11 +9120,7 @@ async def test_list_message_buses_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_message_buses(request={}) - ).pages: + async for page_ in (await client.list_message_buses(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9699,9 +9673,7 @@ async def test_list_message_bus_enrollments_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_message_bus_enrollments(request={}) ).pages: pages.append(page_) @@ -11650,11 +11622,7 @@ async def test_list_enrollments_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_enrollments(request={}) - ).pages: + async for page_ in (await client.list_enrollments(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -13585,11 +13553,7 @@ async def test_list_pipelines_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_pipelines(request={}) - ).pages: + async for page_ in (await client.list_pipelines(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -15522,11 +15486,7 @@ async def test_list_google_api_sources_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_google_api_sources(request={}) - ).pages: + async for page_ in (await client.list_google_api_sources(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -16716,7 +16676,7 @@ def test_get_trigger_rest_required_fields(request_type=eventarc.GetTriggerReques expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_trigger_rest_unset_required_fields(): @@ -16900,7 +16860,7 @@ def test_list_triggers_rest_required_fields(request_type=eventarc.ListTriggersRe expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_triggers_rest_unset_required_fields(): @@ -17170,7 +17130,7 @@ def test_create_trigger_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_trigger_rest_unset_required_fields(): @@ -17474,7 +17434,7 @@ def test_delete_trigger_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_trigger_rest_unset_required_fields(): @@ -17658,7 +17618,7 @@ def test_get_channel_rest_required_fields(request_type=eventarc.GetChannelReques expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_channel_rest_unset_required_fields(): @@ -17841,7 +17801,7 @@ def test_list_channels_rest_required_fields(request_type=eventarc.ListChannelsRe expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_channels_rest_unset_required_fields(): @@ -18110,7 +18070,7 @@ def test_create_channel_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_channel_rest_unset_required_fields(): @@ -18406,7 +18366,7 @@ def test_delete_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_channel_rest_unset_required_fields(): @@ -18579,7 +18539,7 @@ def test_get_provider_rest_required_fields(request_type=eventarc.GetProviderRequ expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_provider_rest_unset_required_fields(): @@ -18767,7 +18727,7 @@ def test_list_providers_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_providers_rest_unset_required_fields(): @@ -19020,7 +18980,7 @@ def test_get_channel_connection_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_channel_connection_rest_unset_required_fields(): @@ -19212,7 +19172,7 @@ def test_list_channel_connections_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_channel_connections_rest_unset_required_fields(): @@ -19486,7 +19446,7 @@ def test_create_channel_connection_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_channel_connection_rest_unset_required_fields(): @@ -19685,7 +19645,7 @@ def test_delete_channel_connection_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_channel_connection_rest_unset_required_fields(): @@ -19868,7 +19828,7 @@ def test_get_google_channel_config_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_google_channel_config_rest_unset_required_fields(): @@ -20053,7 +20013,7 @@ def test_update_google_channel_config_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_google_channel_config_rest_unset_required_fields(): @@ -20241,7 +20201,7 @@ def test_get_message_bus_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_message_bus_rest_unset_required_fields(): @@ -20434,7 +20394,7 @@ def test_list_message_buses_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_message_buses_rest_unset_required_fields(): @@ -20695,7 +20655,7 @@ def test_list_message_bus_enrollments_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_message_bus_enrollments_rest_unset_required_fields(): @@ -20974,7 +20934,7 @@ def test_create_message_bus_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_message_bus_rest_unset_required_fields(): @@ -21177,7 +21137,7 @@ def test_update_message_bus_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_message_bus_rest_unset_required_fields(): @@ -21381,7 +21341,7 @@ def test_delete_message_bus_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_message_bus_rest_unset_required_fields(): @@ -21570,7 +21530,7 @@ def test_get_enrollment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_enrollment_rest_unset_required_fields(): @@ -21761,7 +21721,7 @@ def test_list_enrollments_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_enrollments_rest_unset_required_fields(): @@ -22034,7 +21994,7 @@ def test_create_enrollment_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_enrollment_rest_unset_required_fields(): @@ -22235,7 +22195,7 @@ def test_update_enrollment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_enrollment_rest_unset_required_fields(): @@ -22437,7 +22397,7 @@ def test_delete_enrollment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_enrollment_rest_unset_required_fields(): @@ -22624,7 +22584,7 @@ def test_get_pipeline_rest_required_fields(request_type=eventarc.GetPipelineRequ expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_pipeline_rest_unset_required_fields(): @@ -22812,7 +22772,7 @@ def test_list_pipelines_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_pipelines_rest_unset_required_fields(): @@ -23082,7 +23042,7 @@ def test_create_pipeline_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_pipeline_rest_unset_required_fields(): @@ -23280,7 +23240,7 @@ def test_update_pipeline_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_pipeline_rest_unset_required_fields(): @@ -23478,7 +23438,7 @@ def test_delete_pipeline_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_pipeline_rest_unset_required_fields(): @@ -23671,7 +23631,7 @@ def test_get_google_api_source_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_google_api_source_rest_unset_required_fields(): @@ -23865,7 +23825,7 @@ def test_list_google_api_sources_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_google_api_sources_rest_unset_required_fields(): @@ -24145,7 +24105,7 @@ def test_create_google_api_source_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_google_api_source_rest_unset_required_fields(): @@ -24349,7 +24309,7 @@ def test_update_google_api_source_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_google_api_source_rest_unset_required_fields(): @@ -24554,7 +24514,7 @@ def test_delete_google_api_source_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_google_api_source_rest_unset_required_fields(): diff --git a/packages/google-cloud-filestore/docs/conf.py b/packages/google-cloud-filestore/docs/conf.py index f6bab80e3bba..b9350b6cd1e8 100644 --- a/packages/google-cloud-filestore/docs/conf.py +++ b/packages/google-cloud-filestore/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-filestore" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-filestore/google/cloud/filestore_v1/__init__.py b/packages/google-cloud-filestore/google/cloud/filestore_v1/__init__.py index caa6bf474138..a6c56bc8612a 100644 --- a/packages/google-cloud-filestore/google/cloud/filestore_v1/__init__.py +++ b/packages/google-cloud-filestore/google/cloud/filestore_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.cloud_filestore_manager import ( CloudFilestoreManagerAsyncClient, @@ -74,28 +68,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.filestore_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-filestore/google/cloud/filestore_v1/services/cloud_filestore_manager/async_client.py b/packages/google-cloud-filestore/google/cloud/filestore_v1/services/cloud_filestore_manager/async_client.py index 4afc3bf3b308..a7ddeb119fb2 100644 --- a/packages/google-cloud-filestore/google/cloud/filestore_v1/services/cloud_filestore_manager/async_client.py +++ b/packages/google-cloud-filestore/google/cloud/filestore_v1/services/cloud_filestore_manager/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -622,11 +622,11 @@ async def sample_create_instance(): ) # Make the request - operation = client.create_instance(request=request) + operation = await client.create_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -771,11 +771,11 @@ async def sample_update_instance(): ) # Make the request - operation = client.update_instance(request=request) + operation = await client.update_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -921,11 +921,11 @@ async def sample_restore_instance(): ) # Make the request - operation = client.restore_instance(request=request) + operation = await client.restore_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1027,11 +1027,11 @@ async def sample_revert_instance(): ) # Make the request - operation = client.revert_instance(request=request) + operation = await client.revert_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1132,11 +1132,11 @@ async def sample_delete_instance(): ) # Make the request - operation = client.delete_instance(request=request) + operation = await client.delete_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1510,11 +1510,11 @@ async def sample_create_snapshot(): ) # Make the request - operation = client.create_snapshot(request=request) + operation = await client.create_snapshot(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1661,11 +1661,11 @@ async def sample_delete_snapshot(): ) # Make the request - operation = client.delete_snapshot(request=request) + operation = await client.delete_snapshot(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1796,11 +1796,11 @@ async def sample_update_snapshot(): ) # Make the request - operation = client.update_snapshot(request=request) + operation = await client.update_snapshot(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2179,11 +2179,11 @@ async def sample_create_backup(): ) # Make the request - operation = client.create_backup(request=request) + operation = await client.create_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2332,11 +2332,11 @@ async def sample_delete_backup(): ) # Make the request - operation = client.delete_backup(request=request) + operation = await client.delete_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2466,11 +2466,11 @@ async def sample_update_backup(): ) # Make the request - operation = client.update_backup(request=request) + operation = await client.update_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2605,11 +2605,11 @@ async def sample_promote_replica(): ) # Make the request - operation = client.promote_replica(request=request) + operation = await client.promote_replica(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/noxfile.py b/packages/google-cloud-filestore/noxfile.py index 3f3181edcbc1..3553bb55d50c 100644 --- a/packages/google-cloud-filestore/noxfile.py +++ b/packages/google-cloud-filestore/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_backup_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_backup_async.py index 3e3005d95ca5..49e667612853 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_backup_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_backup_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_backup(): ) # Make the request - operation = client.create_backup(request=request) + operation = await client.create_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_instance_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_instance_async.py index 6bb0f2493099..98f16bce3fbc 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_instance_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_instance(): ) # Make the request - operation = client.create_instance(request=request) + operation = await client.create_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_snapshot_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_snapshot_async.py index 780f8af31bcb..e3b07a73d925 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_snapshot_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_create_snapshot_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_snapshot(): ) # Make the request - operation = client.create_snapshot(request=request) + operation = await client.create_snapshot(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_backup_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_backup_async.py index 50587d43d427..e250d177ad2f 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_backup_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_backup_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_backup(): ) # Make the request - operation = client.delete_backup(request=request) + operation = await client.delete_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_instance_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_instance_async.py index f45c4b1b3d09..0f3f06bd3f70 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_instance_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_instance(): ) # Make the request - operation = client.delete_instance(request=request) + operation = await client.delete_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_snapshot_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_snapshot_async.py index 7821fba5aab8..f7be9e8114cf 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_snapshot_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_delete_snapshot_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_snapshot(): ) # Make the request - operation = client.delete_snapshot(request=request) + operation = await client.delete_snapshot(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_promote_replica_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_promote_replica_async.py index 8f1304568b54..16e01452e2eb 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_promote_replica_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_promote_replica_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_promote_replica(): ) # Make the request - operation = client.promote_replica(request=request) + operation = await client.promote_replica(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_restore_instance_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_restore_instance_async.py index 23a01a9ff00e..dba90bb49c62 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_restore_instance_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_restore_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,11 +46,11 @@ async def sample_restore_instance(): ) # Make the request - operation = client.restore_instance(request=request) + operation = await client.restore_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_revert_instance_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_revert_instance_async.py index 8b3cabbf3c03..13400dfae765 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_revert_instance_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_revert_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_revert_instance(): ) # Make the request - operation = client.revert_instance(request=request) + operation = await client.revert_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_backup_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_backup_async.py index 1b04768ec4fe..567f0ef4c9db 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_backup_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_backup_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_backup(): request = filestore_v1.UpdateBackupRequest() # Make the request - operation = client.update_backup(request=request) + operation = await client.update_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_instance_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_instance_async.py index eb23f19cf6a5..fbac37e78763 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_instance_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_instance(): request = filestore_v1.UpdateInstanceRequest() # Make the request - operation = client.update_instance(request=request) + operation = await client.update_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_snapshot_async.py b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_snapshot_async.py index acc9173b9fe4..f97045ac3963 100644 --- a/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_snapshot_async.py +++ b/packages/google-cloud-filestore/samples/generated_samples/file_v1_generated_cloud_filestore_manager_update_snapshot_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_snapshot(): request = filestore_v1.UpdateSnapshotRequest() # Make the request - operation = client.update_snapshot(request=request) + operation = await client.update_snapshot(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-filestore/setup.py b/packages/google-cloud-filestore/setup.py index c5cd15cb7b07..7735ff3cdbbf 100644 --- a/packages/google-cloud-filestore/setup.py +++ b/packages/google-cloud-filestore/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,12 +39,12 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "google-cloud-common >= 1.0.0, <2.0.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-filestore/testing/constraints-3.10.txt b/packages/google-cloud-filestore/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-filestore/testing/constraints-3.10.txt +++ b/packages/google-cloud-filestore/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-filestore/testing/constraints-3.9.txt b/packages/google-cloud-filestore/testing/constraints-3.9.txt deleted file mode 100644 index 11fcf4f341b2..000000000000 --- a/packages/google-cloud-filestore/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-cloud-common==1.0.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-filestore/tests/unit/gapic/filestore_v1/test_cloud_filestore_manager.py b/packages/google-cloud-filestore/tests/unit/gapic/filestore_v1/test_cloud_filestore_manager.py index 46051dc68662..5b75ebe29f59 100644 --- a/packages/google-cloud-filestore/tests/unit/gapic/filestore_v1/test_cloud_filestore_manager.py +++ b/packages/google-cloud-filestore/tests/unit/gapic/filestore_v1/test_cloud_filestore_manager.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1904,11 +1898,7 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_instances(request={}) - ).pages: + async for page_ in (await client.list_instances(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4324,11 +4314,7 @@ async def test_list_snapshots_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_snapshots(request={}) - ).pages: + async for page_ in (await client.list_snapshots(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6200,11 +6186,7 @@ async def test_list_backups_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_backups(request={}) - ).pages: + async for page_ in (await client.list_backups(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7965,7 +7947,7 @@ def test_list_instances_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_instances_rest_unset_required_fields(): @@ -8215,7 +8197,7 @@ def test_get_instance_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_instance_rest_unset_required_fields(): @@ -8411,7 +8393,7 @@ def test_create_instance_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_instance_rest_unset_required_fields(): @@ -8707,7 +8689,7 @@ def test_restore_instance_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_restore_instance_rest_unset_required_fields(): @@ -8841,7 +8823,7 @@ def test_revert_instance_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_revert_instance_rest_unset_required_fields(): @@ -8972,7 +8954,7 @@ def test_delete_instance_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_instance_rest_unset_required_fields(): @@ -9161,7 +9143,7 @@ def test_list_snapshots_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_snapshots_rest_unset_required_fields(): @@ -9417,7 +9399,7 @@ def test_get_snapshot_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_snapshot_rest_unset_required_fields(): @@ -9614,7 +9596,7 @@ def test_create_snapshot_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_snapshot_rest_unset_required_fields(): @@ -9806,7 +9788,7 @@ def test_delete_snapshot_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_snapshot_rest_unset_required_fields(): @@ -9983,7 +9965,7 @@ def test_update_snapshot_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_snapshot_rest_unset_required_fields(): @@ -10182,7 +10164,7 @@ def test_list_backups_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backups_rest_unset_required_fields(): @@ -10432,7 +10414,7 @@ def test_get_backup_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_rest_unset_required_fields(): @@ -10626,7 +10608,7 @@ def test_create_backup_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_backup_rest_unset_required_fields(): @@ -10815,7 +10797,7 @@ def test_delete_backup_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_backup_rest_unset_required_fields(): @@ -10989,7 +10971,7 @@ def test_update_backup_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_backup_rest_unset_required_fields(): @@ -11179,7 +11161,7 @@ def test_promote_replica_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_promote_replica_rest_unset_required_fields(): diff --git a/packages/google-cloud-financialservices/docs/conf.py b/packages/google-cloud-financialservices/docs/conf.py index 4783a5ee61eb..93c8788a493f 100644 --- a/packages/google-cloud-financialservices/docs/conf.py +++ b/packages/google-cloud-financialservices/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-financialservices" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-financialservices/google/cloud/financialservices_v1/__init__.py b/packages/google-cloud-financialservices/google/cloud/financialservices_v1/__init__.py index d31214700e04..986dfd5f4f49 100644 --- a/packages/google-cloud-financialservices/google/cloud/financialservices_v1/__init__.py +++ b/packages/google-cloud-financialservices/google/cloud/financialservices_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.aml import AMLAsyncClient, AMLClient from .types.backtest_result import ( @@ -115,28 +109,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.financialservices_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-financialservices/google/cloud/financialservices_v1/services/aml/async_client.py b/packages/google-cloud-financialservices/google/cloud/financialservices_v1/services/aml/async_client.py index 93a46ff3ca07..905ee9370359 100644 --- a/packages/google-cloud-financialservices/google/cloud/financialservices_v1/services/aml/async_client.py +++ b/packages/google-cloud-financialservices/google/cloud/financialservices_v1/services/aml/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -616,11 +616,11 @@ async def sample_create_instance(): ) # Make the request - operation = client.create_instance(request=request) + operation = await client.create_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -768,11 +768,11 @@ async def sample_update_instance(): ) # Make the request - operation = client.update_instance(request=request) + operation = await client.update_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -911,11 +911,11 @@ async def sample_delete_instance(): ) # Make the request - operation = client.delete_instance(request=request) + operation = await client.delete_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1051,11 +1051,11 @@ async def sample_import_registered_parties(): ) # Make the request - operation = client.import_registered_parties(request=request) + operation = await client.import_registered_parties(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1220,11 +1220,11 @@ async def sample_export_registered_parties(): ) # Make the request - operation = client.export_registered_parties(request=request) + operation = await client.export_registered_parties(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1606,11 +1606,11 @@ async def sample_create_dataset(): ) # Make the request - operation = client.create_dataset(request=request) + operation = await client.create_dataset(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1751,11 +1751,11 @@ async def sample_update_dataset(): ) # Make the request - operation = client.update_dataset(request=request) + operation = await client.update_dataset(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1892,11 +1892,11 @@ async def sample_delete_dataset(): ) # Make the request - operation = client.delete_dataset(request=request) + operation = await client.delete_dataset(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2268,11 +2268,11 @@ async def sample_create_model(): ) # Make the request - operation = client.create_model(request=request) + operation = await client.create_model(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2417,11 +2417,11 @@ async def sample_update_model(): ) # Make the request - operation = client.update_model(request=request) + operation = await client.update_model(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2566,11 +2566,11 @@ async def sample_export_model_metadata(): ) # Make the request - operation = client.export_model_metadata(request=request) + operation = await client.export_model_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2700,11 +2700,11 @@ async def sample_delete_model(): ) # Make the request - operation = client.delete_model(request=request) + operation = await client.delete_model(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3079,11 +3079,11 @@ async def sample_create_engine_config(): ) # Make the request - operation = client.create_engine_config(request=request) + operation = await client.create_engine_config(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3230,11 +3230,11 @@ async def sample_update_engine_config(): ) # Make the request - operation = client.update_engine_config(request=request) + operation = await client.update_engine_config(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3382,11 +3382,11 @@ async def sample_export_engine_config_metadata(): ) # Make the request - operation = client.export_engine_config_metadata(request=request) + operation = await client.export_engine_config_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3519,11 +3519,11 @@ async def sample_delete_engine_config(): ) # Make the request - operation = client.delete_engine_config(request=request) + operation = await client.delete_engine_config(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4143,11 +4143,11 @@ async def sample_create_prediction_result(): ) # Make the request - operation = client.create_prediction_result(request=request) + operation = await client.create_prediction_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4296,11 +4296,11 @@ async def sample_update_prediction_result(): ) # Make the request - operation = client.update_prediction_result(request=request) + operation = await client.update_prediction_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4450,11 +4450,11 @@ async def sample_export_prediction_result_metadata(): ) # Make the request - operation = client.export_prediction_result_metadata(request=request) + operation = await client.export_prediction_result_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4593,11 +4593,11 @@ async def sample_delete_prediction_result(): ) # Make the request - operation = client.delete_prediction_result(request=request) + operation = await client.delete_prediction_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4977,11 +4977,11 @@ async def sample_create_backtest_result(): ) # Make the request - operation = client.create_backtest_result(request=request) + operation = await client.create_backtest_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5130,11 +5130,11 @@ async def sample_update_backtest_result(): ) # Make the request - operation = client.update_backtest_result(request=request) + operation = await client.update_backtest_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5283,11 +5283,11 @@ async def sample_export_backtest_result_metadata(): ) # Make the request - operation = client.export_backtest_result_metadata(request=request) + operation = await client.export_backtest_result_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5424,11 +5424,11 @@ async def sample_delete_backtest_result(): ) # Make the request - operation = client.delete_backtest_result(request=request) + operation = await client.delete_backtest_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/noxfile.py b/packages/google-cloud-financialservices/noxfile.py index 3bc3142cd191..847094797737 100644 --- a/packages/google-cloud-financialservices/noxfile.py +++ b/packages/google-cloud-financialservices/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_backtest_result_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_backtest_result_async.py index ca49eab1cf64..f65504e59fa0 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_backtest_result_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_backtest_result_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_create_backtest_result(): ) # Make the request - operation = client.create_backtest_result(request=request) + operation = await client.create_backtest_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_dataset_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_dataset_async.py index c182da8319ef..15a2edaba519 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_dataset_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_dataset_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_dataset(): ) # Make the request - operation = client.create_dataset(request=request) + operation = await client.create_dataset(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_engine_config_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_engine_config_async.py index 5d07a14bdd51..6b3b761638e4 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_engine_config_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_engine_config_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_engine_config(): ) # Make the request - operation = client.create_engine_config(request=request) + operation = await client.create_engine_config(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_instance_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_instance_async.py index 4cfad389b2bd..867ae2d0619b 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_instance_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_instance(): ) # Make the request - operation = client.create_instance(request=request) + operation = await client.create_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_model_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_model_async.py index 1c1655401cc1..a26657177d95 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_model_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_model_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_model(): ) # Make the request - operation = client.create_model(request=request) + operation = await client.create_model(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_prediction_result_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_prediction_result_async.py index c11349b3cf84..d67f9a069a22 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_prediction_result_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_create_prediction_result_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -53,11 +53,11 @@ async def sample_create_prediction_result(): ) # Make the request - operation = client.create_prediction_result(request=request) + operation = await client.create_prediction_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_backtest_result_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_backtest_result_async.py index 2ae2a945634e..f2a0179b5e30 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_backtest_result_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_backtest_result_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_backtest_result(): ) # Make the request - operation = client.delete_backtest_result(request=request) + operation = await client.delete_backtest_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_dataset_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_dataset_async.py index a8c7f320a23c..10ceb5aaadc3 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_dataset_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_dataset_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_dataset(): ) # Make the request - operation = client.delete_dataset(request=request) + operation = await client.delete_dataset(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_engine_config_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_engine_config_async.py index 8c9f3975af3e..bab96a233fab 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_engine_config_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_engine_config_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_engine_config(): ) # Make the request - operation = client.delete_engine_config(request=request) + operation = await client.delete_engine_config(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_instance_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_instance_async.py index 909c9d55d652..4de7fcda5aac 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_instance_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_instance(): ) # Make the request - operation = client.delete_instance(request=request) + operation = await client.delete_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_model_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_model_async.py index 2bf79a5a3155..6c717a96366c 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_model_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_model_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_model(): ) # Make the request - operation = client.delete_model(request=request) + operation = await client.delete_model(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_prediction_result_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_prediction_result_async.py index 155db4aae2c5..dedcea4eeea4 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_prediction_result_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_delete_prediction_result_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_prediction_result(): ) # Make the request - operation = client.delete_prediction_result(request=request) + operation = await client.delete_prediction_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_backtest_result_metadata_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_backtest_result_metadata_async.py index bbd6df7f56e5..6cf0e320eed8 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_backtest_result_metadata_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_backtest_result_metadata_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_export_backtest_result_metadata(): ) # Make the request - operation = client.export_backtest_result_metadata(request=request) + operation = await client.export_backtest_result_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_engine_config_metadata_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_engine_config_metadata_async.py index 81894d07bf64..f3047f081d13 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_engine_config_metadata_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_engine_config_metadata_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_export_engine_config_metadata(): ) # Make the request - operation = client.export_engine_config_metadata(request=request) + operation = await client.export_engine_config_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_model_metadata_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_model_metadata_async.py index 3d8ea3186907..18ebfb96de61 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_model_metadata_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_model_metadata_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_export_model_metadata(): ) # Make the request - operation = client.export_model_metadata(request=request) + operation = await client.export_model_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_prediction_result_metadata_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_prediction_result_metadata_async.py index 60a5d257cded..9c73730692e8 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_prediction_result_metadata_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_prediction_result_metadata_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_export_prediction_result_metadata(): ) # Make the request - operation = client.export_prediction_result_metadata(request=request) + operation = await client.export_prediction_result_metadata(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_registered_parties_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_registered_parties_async.py index 8ebc04c0da59..abb22eeb2a45 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_registered_parties_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_export_registered_parties_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_export_registered_parties(): ) # Make the request - operation = client.export_registered_parties(request=request) + operation = await client.export_registered_parties(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_import_registered_parties_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_import_registered_parties_async.py index bceeef1e89d7..2c15c83fc868 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_import_registered_parties_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_import_registered_parties_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,11 +46,11 @@ async def sample_import_registered_parties(): ) # Make the request - operation = client.import_registered_parties(request=request) + operation = await client.import_registered_parties(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_backtest_result_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_backtest_result_async.py index 97e0d62369fb..6b7e1d67c95c 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_backtest_result_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_backtest_result_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_update_backtest_result(): ) # Make the request - operation = client.update_backtest_result(request=request) + operation = await client.update_backtest_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_dataset_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_dataset_async.py index 815d4577869f..c3844c263c16 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_dataset_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_dataset_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_dataset(): request = financialservices_v1.UpdateDatasetRequest() # Make the request - operation = client.update_dataset(request=request) + operation = await client.update_dataset(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_engine_config_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_engine_config_async.py index 9ac1b1470252..64ac0c34bbca 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_engine_config_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_engine_config_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_engine_config(): ) # Make the request - operation = client.update_engine_config(request=request) + operation = await client.update_engine_config(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_instance_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_instance_async.py index 6043c11a250f..43b50bdf808f 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_instance_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_instance_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_instance(): ) # Make the request - operation = client.update_instance(request=request) + operation = await client.update_instance(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_model_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_model_async.py index 411b010261e3..f1b94c3be87c 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_model_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_model_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_update_model(): ) # Make the request - operation = client.update_model(request=request) + operation = await client.update_model(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_prediction_result_async.py b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_prediction_result_async.py index 47b75a9e49a2..c39bd4d8d934 100644 --- a/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_prediction_result_async.py +++ b/packages/google-cloud-financialservices/samples/generated_samples/financialservices_v1_generated_aml_update_prediction_result_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_update_prediction_result(): ) # Make the request - operation = client.update_prediction_result(request=request) + operation = await client.update_prediction_result(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-financialservices/setup.py b/packages/google-cloud-financialservices/setup.py index 01509b011bbb..1a7282829e2f 100644 --- a/packages/google-cloud-financialservices/setup.py +++ b/packages/google-cloud-financialservices/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-financialservices/testing/constraints-3.10.txt b/packages/google-cloud-financialservices/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-financialservices/testing/constraints-3.10.txt +++ b/packages/google-cloud-financialservices/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-financialservices/testing/constraints-3.9.txt b/packages/google-cloud-financialservices/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-financialservices/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-financialservices/tests/unit/gapic/financialservices_v1/test_aml.py b/packages/google-cloud-financialservices/tests/unit/gapic/financialservices_v1/test_aml.py index 3ddd3eeda302..474b0cede342 100644 --- a/packages/google-cloud-financialservices/tests/unit/gapic/financialservices_v1/test_aml.py +++ b/packages/google-cloud-financialservices/tests/unit/gapic/financialservices_v1/test_aml.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,19 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import re - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os +import re from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1766,11 +1760,7 @@ async def test_list_instances_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_instances(request={}) - ).pages: + async for page_ in (await client.list_instances(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4389,11 +4379,7 @@ async def test_list_datasets_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_datasets(request={}) - ).pages: + async for page_ in (await client.list_datasets(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6256,11 +6242,7 @@ async def test_list_models_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_models(request={}) - ).pages: + async for page_ in (await client.list_models(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8527,11 +8509,7 @@ async def test_list_engine_configs_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_engine_configs(request={}) - ).pages: + async for page_ in (await client.list_engine_configs(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -11230,11 +11208,7 @@ async def test_list_engine_versions_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_engine_versions(request={}) - ).pages: + async for page_ in (await client.list_engine_versions(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -11785,11 +11759,7 @@ async def test_list_prediction_results_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_prediction_results(request={}) - ).pages: + async for page_ in (await client.list_prediction_results(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -14145,11 +14115,7 @@ async def test_list_backtest_results_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_backtest_results(request={}) - ).pages: + async for page_ in (await client.list_backtest_results(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -16076,7 +16042,7 @@ def test_list_instances_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_instances_rest_unset_required_fields(): @@ -16322,7 +16288,7 @@ def test_get_instance_rest_required_fields(request_type=instance.GetInstanceRequ expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_instance_rest_unset_required_fields(): @@ -16523,7 +16489,7 @@ def test_create_instance_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_instance_rest_unset_required_fields(): @@ -16720,7 +16686,7 @@ def test_update_instance_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_instance_rest_unset_required_fields(): @@ -16911,7 +16877,7 @@ def test_delete_instance_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_instance_rest_unset_required_fields(): @@ -17095,7 +17061,7 @@ def test_import_registered_parties_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_import_registered_parties_rest_unset_required_fields(): @@ -17295,7 +17261,7 @@ def test_export_registered_parties_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_export_registered_parties_rest_unset_required_fields(): @@ -17497,7 +17463,7 @@ def test_list_datasets_rest_required_fields(request_type=dataset.ListDatasetsReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_datasets_rest_unset_required_fields(): @@ -17748,7 +17714,7 @@ def test_get_dataset_rest_required_fields(request_type=dataset.GetDatasetRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_dataset_rest_unset_required_fields(): @@ -17950,7 +17916,7 @@ def test_create_dataset_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_dataset_rest_unset_required_fields(): @@ -18150,7 +18116,7 @@ def test_update_dataset_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_dataset_rest_unset_required_fields(): @@ -18341,7 +18307,7 @@ def test_delete_dataset_rest_required_fields(request_type=dataset.DeleteDatasetR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_dataset_rest_unset_required_fields(): @@ -18526,7 +18492,7 @@ def test_list_models_rest_required_fields(request_type=model.ListModelsRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_models_rest_unset_required_fields(): @@ -18777,7 +18743,7 @@ def test_get_model_rest_required_fields(request_type=model.GetModelRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_model_rest_unset_required_fields(): @@ -18977,7 +18943,7 @@ def test_create_model_rest_required_fields(request_type=gcf_model.CreateModelReq ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_model_rest_unset_required_fields(): @@ -19175,7 +19141,7 @@ def test_update_model_rest_required_fields(request_type=gcf_model.UpdateModelReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_model_rest_unset_required_fields(): @@ -19372,7 +19338,7 @@ def test_export_model_metadata_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_export_model_metadata_rest_unset_required_fields(): @@ -19565,7 +19531,7 @@ def test_delete_model_rest_required_fields(request_type=model.DeleteModelRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_model_rest_unset_required_fields(): @@ -19756,7 +19722,7 @@ def test_list_engine_configs_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_engine_configs_rest_unset_required_fields(): @@ -20013,7 +19979,7 @@ def test_get_engine_config_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_engine_config_rest_unset_required_fields(): @@ -20219,7 +20185,7 @@ def test_create_engine_config_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_engine_config_rest_unset_required_fields(): @@ -20423,7 +20389,7 @@ def test_update_engine_config_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_engine_config_rest_unset_required_fields(): @@ -20620,7 +20586,7 @@ def test_export_engine_config_metadata_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_export_engine_config_metadata_rest_unset_required_fields(): @@ -20821,7 +20787,7 @@ def test_delete_engine_config_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_engine_config_rest_unset_required_fields(): @@ -21003,7 +20969,7 @@ def test_get_engine_version_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_engine_version_rest_unset_required_fields(): @@ -21196,7 +21162,7 @@ def test_list_engine_versions_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_engine_versions_rest_unset_required_fields(): @@ -21467,7 +21433,7 @@ def test_list_prediction_results_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_prediction_results_rest_unset_required_fields(): @@ -21727,7 +21693,7 @@ def test_get_prediction_result_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_prediction_result_rest_unset_required_fields(): @@ -21936,7 +21902,7 @@ def test_create_prediction_result_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_prediction_result_rest_unset_required_fields(): @@ -22141,7 +22107,7 @@ def test_update_prediction_result_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_prediction_result_rest_unset_required_fields(): @@ -22338,7 +22304,7 @@ def test_export_prediction_result_metadata_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_export_prediction_result_metadata_rest_unset_required_fields(): @@ -22542,7 +22508,7 @@ def test_delete_prediction_result_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_prediction_result_rest_unset_required_fields(): @@ -22734,7 +22700,7 @@ def test_list_backtest_results_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backtest_results_rest_unset_required_fields(): @@ -22993,7 +22959,7 @@ def test_get_backtest_result_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backtest_result_rest_unset_required_fields(): @@ -23200,7 +23166,7 @@ def test_create_backtest_result_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_backtest_result_rest_unset_required_fields(): @@ -23405,7 +23371,7 @@ def test_update_backtest_result_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_backtest_result_rest_unset_required_fields(): @@ -23602,7 +23568,7 @@ def test_export_backtest_result_metadata_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_export_backtest_result_metadata_rest_unset_required_fields(): @@ -23804,7 +23770,7 @@ def test_delete_backtest_result_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_backtest_result_rest_unset_required_fields(): diff --git a/packages/google-cloud-firestore/docs/conf.py b/packages/google-cloud-firestore/docs/conf.py index 0b8b70c56de4..7cd6c81049b2 100644 --- a/packages/google-cloud-firestore/docs/conf.py +++ b/packages/google-cloud-firestore/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-firestore" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-firestore/google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py b/packages/google-cloud-firestore/google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py index 8524da1538a6..dc8fac51313e 100644 --- a/packages/google-cloud-firestore/google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py +++ b/packages/google-cloud-firestore/google/cloud/firestore_admin_v1/services/firestore_admin/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -404,11 +404,11 @@ async def sample_create_index(): ) # Make the request - operation = client.create_index(request=request) + operation = await client.create_index(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1007,11 +1007,11 @@ async def sample_update_field(): ) # Make the request - operation = client.update_field(request=request) + operation = await client.update_field(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1285,11 +1285,11 @@ async def sample_export_documents(): ) # Make the request - operation = client.export_documents(request=request) + operation = await client.export_documents(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1416,11 +1416,11 @@ async def sample_import_documents(): ) # Make the request - operation = client.import_documents(request=request) + operation = await client.import_documents(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1560,11 +1560,11 @@ async def sample_bulk_delete_documents(): ) # Make the request - operation = client.bulk_delete_documents(request=request) + operation = await client.bulk_delete_documents(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1696,11 +1696,11 @@ async def sample_create_database(): ) # Make the request - operation = client.create_database(request=request) + operation = await client.create_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2066,11 +2066,11 @@ async def sample_update_database(): ) # Make the request - operation = client.update_database(request=request) + operation = await client.update_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2199,11 +2199,11 @@ async def sample_delete_database(): ) # Make the request - operation = client.delete_database(request=request) + operation = await client.delete_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3461,11 +3461,11 @@ async def sample_restore_database(): ) # Make the request - operation = client.restore_database(request=request) + operation = await client.restore_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4176,11 +4176,11 @@ async def sample_clone_database(): ) # Make the request - operation = client.clone_database(request=request) + operation = await client.clone_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/google/cloud/firestore_bundle/__init__.py b/packages/google-cloud-firestore/google/cloud/firestore_bundle/__init__.py index e125b4083d3c..c5b9dae9ed9a 100644 --- a/packages/google-cloud-firestore/google/cloud/firestore_bundle/__init__.py +++ b/packages/google-cloud-firestore/google/cloud/firestore_bundle/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .bundle import FirestoreBundle from .types.bundle import ( @@ -47,28 +41,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.firestore_bundle" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-firestore/noxfile.py b/packages/google-cloud-firestore/noxfile.py index 588dd7c0058d..fefe2d0c9f61 100644 --- a/packages/google-cloud-firestore/noxfile.py +++ b/packages/google-cloud-firestore/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -449,7 +448,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_bulk_delete_documents_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_bulk_delete_documents_async.py index 7fa77f17a6af..c966e23f0ed4 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_bulk_delete_documents_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_bulk_delete_documents_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_bulk_delete_documents(): ) # Make the request - operation = client.bulk_delete_documents(request=request) + operation = await client.bulk_delete_documents(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_clone_database_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_clone_database_async.py index 8e165a2c973b..227b33dbb95c 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_clone_database_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_clone_database_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_clone_database(): ) # Make the request - operation = client.clone_database(request=request) + operation = await client.clone_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_database_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_database_async.py index ab3dfec27226..44281d6c12d9 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_database_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_database_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_database(): ) # Make the request - operation = client.create_database(request=request) + operation = await client.create_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_index_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_index_async.py index 576dac8ddba2..c79ed49e745e 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_index_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_create_index_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_index(): ) # Make the request - operation = client.create_index(request=request) + operation = await client.create_index(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_delete_database_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_delete_database_async.py index 0217c2798192..4a934bc3d857 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_delete_database_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_delete_database_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_database(): ) # Make the request - operation = client.delete_database(request=request) + operation = await client.delete_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_export_documents_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_export_documents_async.py index 34a61a3e74ed..aedc7cfc5d8f 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_export_documents_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_export_documents_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_export_documents(): ) # Make the request - operation = client.export_documents(request=request) + operation = await client.export_documents(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_import_documents_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_import_documents_async.py index c3477050b5c9..d5cc2c7dadde 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_import_documents_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_import_documents_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_import_documents(): ) # Make the request - operation = client.import_documents(request=request) + operation = await client.import_documents(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_restore_database_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_restore_database_async.py index 635d17d38747..8bf50247f128 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_restore_database_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_restore_database_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -46,11 +46,11 @@ async def sample_restore_database(): ) # Make the request - operation = client.restore_database(request=request) + operation = await client.restore_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_database_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_database_async.py index 12969230b2bd..bd2ad1fb46cd 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_database_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_database_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_database(): request = firestore_admin_v1.UpdateDatabaseRequest() # Make the request - operation = client.update_database(request=request) + operation = await client.update_database(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_field_async.py b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_field_async.py index 074542d75e4b..302a3ef2c882 100644 --- a/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_field_async.py +++ b/packages/google-cloud-firestore/samples/generated_samples/firestore_v1_generated_firestore_admin_update_field_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_field(): ) # Make the request - operation = client.update_field(request=request) + operation = await client.update_field(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-firestore/setup.py b/packages/google-cloud-firestore/setup.py index 7c95c0d2132b..bbab3c2d58c6 100644 --- a/packages/google-cloud-firestore/setup.py +++ b/packages/google-cloud-firestore/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,12 +39,12 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "google-cloud-core >= 2.0.0, <3.0.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-firestore/testing/constraints-3.10.txt b/packages/google-cloud-firestore/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-firestore/testing/constraints-3.10.txt +++ b/packages/google-cloud-firestore/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-firestore/testing/constraints-3.9.txt b/packages/google-cloud-firestore/testing/constraints-3.9.txt deleted file mode 100644 index 65430a49712f..000000000000 --- a/packages/google-cloud-firestore/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -google-cloud-core==2.0.0 -protobuf==4.25.8 diff --git a/packages/google-cloud-firestore/tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py b/packages/google-cloud-firestore/tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py index d5b2d86f85d8..e7262a74e1ef 100644 --- a/packages/google-cloud-firestore/tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py +++ b/packages/google-cloud-firestore/tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2190,11 +2184,7 @@ async def test_list_indexes_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_indexes(request={}) - ).pages: + async for page_ in (await client.list_indexes(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4007,11 +3997,7 @@ async def test_list_fields_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_fields(request={}) - ).pages: + async for page_ in (await client.list_fields(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -12390,7 +12376,7 @@ def test_create_index_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_index_rest_unset_required_fields(): @@ -12586,7 +12572,7 @@ def test_list_indexes_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_indexes_rest_unset_required_fields(): @@ -12838,7 +12824,7 @@ def test_get_index_rest_required_fields(request_type=firestore_admin.GetIndexReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_index_rest_unset_required_fields(): @@ -13015,7 +13001,7 @@ def test_delete_index_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_index_rest_unset_required_fields(): @@ -13191,7 +13177,7 @@ def test_get_field_rest_required_fields(request_type=firestore_admin.GetFieldReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_field_rest_unset_required_fields(): @@ -13370,7 +13356,7 @@ def test_update_field_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_field_rest_unset_required_fields(): @@ -13558,7 +13544,7 @@ def test_list_fields_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_fields_rest_unset_required_fields(): @@ -13816,7 +13802,7 @@ def test_export_documents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_export_documents_rest_unset_required_fields(): @@ -13996,7 +13982,7 @@ def test_import_documents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_import_documents_rest_unset_required_fields(): @@ -14179,7 +14165,7 @@ def test_bulk_delete_documents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_bulk_delete_documents_rest_unset_required_fields(): @@ -14372,7 +14358,7 @@ def test_create_database_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_database_rest_unset_required_fields(): @@ -14559,7 +14545,7 @@ def test_get_database_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_database_rest_unset_required_fields(): @@ -14737,7 +14723,7 @@ def test_list_databases_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_databases_rest_unset_required_fields(): @@ -14912,7 +14898,7 @@ def test_update_database_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_database_rest_unset_required_fields(): @@ -15092,7 +15078,7 @@ def test_delete_database_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_database_rest_unset_required_fields(): @@ -15284,7 +15270,7 @@ def test_create_user_creds_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_user_creds_rest_unset_required_fields(): @@ -15474,7 +15460,7 @@ def test_get_user_creds_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_user_creds_rest_unset_required_fields(): @@ -15653,7 +15639,7 @@ def test_list_user_creds_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_user_creds_rest_unset_required_fields(): @@ -15833,7 +15819,7 @@ def test_enable_user_creds_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_enable_user_creds_rest_unset_required_fields(): @@ -16018,7 +16004,7 @@ def test_disable_user_creds_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_disable_user_creds_rest_unset_required_fields(): @@ -16203,7 +16189,7 @@ def test_reset_user_password_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_reset_user_password_rest_unset_required_fields(): @@ -16382,7 +16368,7 @@ def test_delete_user_creds_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_user_creds_rest_unset_required_fields(): @@ -16557,7 +16543,7 @@ def test_get_backup_rest_required_fields(request_type=firestore_admin.GetBackupR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_rest_unset_required_fields(): @@ -16736,7 +16722,7 @@ def test_list_backups_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backups_rest_unset_required_fields(): @@ -16910,7 +16896,7 @@ def test_delete_backup_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_backup_rest_unset_required_fields(): @@ -17097,7 +17083,7 @@ def test_restore_database_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_restore_database_rest_unset_required_fields(): @@ -17232,7 +17218,7 @@ def test_create_backup_schedule_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_backup_schedule_rest_unset_required_fields(): @@ -17424,7 +17410,7 @@ def test_get_backup_schedule_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_schedule_rest_unset_required_fields(): @@ -17609,7 +17595,7 @@ def test_list_backup_schedules_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backup_schedules_rest_unset_required_fields(): @@ -17790,7 +17776,7 @@ def test_update_backup_schedule_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_backup_schedule_rest_unset_required_fields(): @@ -17976,7 +17962,7 @@ def test_delete_backup_schedule_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_backup_schedule_rest_unset_required_fields(): @@ -18160,7 +18146,7 @@ def test_clone_database_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_clone_database_rest_unset_required_fields(): diff --git a/packages/google-cloud-firestore/tests/unit/gapic/firestore_v1/test_firestore.py b/packages/google-cloud-firestore/tests/unit/gapic/firestore_v1/test_firestore.py index b44e0ccb5d50..664b3a39bd30 100644 --- a/packages/google-cloud-firestore/tests/unit/gapic/firestore_v1/test_firestore.py +++ b/packages/google-cloud-firestore/tests/unit/gapic/firestore_v1/test_firestore.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1965,11 +1959,7 @@ async def test_list_documents_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_documents(request={}) - ).pages: + async for page_ in (await client.list_documents(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4948,11 +4938,7 @@ async def test_partition_query_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.partition_query(request={}) - ).pages: + async for page_ in (await client.partition_query(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5789,11 +5775,7 @@ async def test_list_collection_ids_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_collection_ids(request={}) - ).pages: + async for page_ in (await client.list_collection_ids(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6393,7 +6375,7 @@ def test_get_document_rest_required_fields(request_type=firestore.GetDocumentReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_document_rest_unset_required_fields(): @@ -6534,7 +6516,7 @@ def test_list_documents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_documents_rest_unset_required_fields(): @@ -6735,7 +6717,7 @@ def test_update_document_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_document_rest_unset_required_fields(): @@ -6927,7 +6909,7 @@ def test_delete_document_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_document_rest_unset_required_fields(): @@ -7113,7 +7095,7 @@ def test_batch_get_documents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_batch_get_documents_rest_unset_required_fields(): @@ -7236,7 +7218,7 @@ def test_begin_transaction_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_begin_transaction_rest_unset_required_fields(): @@ -7413,7 +7395,7 @@ def test_commit_rest_required_fields(request_type=firestore.CommitRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_commit_rest_unset_required_fields(): @@ -7593,7 +7575,7 @@ def test_rollback_rest_required_fields(request_type=firestore.RollbackRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_rollback_rest_unset_required_fields(): @@ -7781,7 +7763,7 @@ def test_run_query_rest_required_fields(request_type=firestore.RunQueryRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_run_query_rest_unset_required_fields(): @@ -7907,7 +7889,7 @@ def test_execute_pipeline_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_execute_pipeline_rest_unset_required_fields(): @@ -8036,7 +8018,7 @@ def test_run_aggregation_query_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_run_aggregation_query_rest_unset_required_fields(): @@ -8157,7 +8139,7 @@ def test_partition_query_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_partition_query_rest_unset_required_fields(): @@ -8365,7 +8347,7 @@ def test_list_collection_ids_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_collection_ids_rest_unset_required_fields(): @@ -8605,7 +8587,7 @@ def test_batch_write_rest_required_fields(request_type=firestore.BatchWriteReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_batch_write_rest_unset_required_fields(): @@ -8737,7 +8719,7 @@ def test_create_document_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_document_rest_unset_required_fields(): diff --git a/packages/google-cloud-functions/docs/conf.py b/packages/google-cloud-functions/docs/conf.py index 6189a9341e9e..47edfbb266cd 100644 --- a/packages/google-cloud-functions/docs/conf.py +++ b/packages/google-cloud-functions/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-functions" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-functions/google/cloud/functions_v1/__init__.py b/packages/google-cloud-functions/google/cloud/functions_v1/__init__.py index f606afc732ec..893977f8f305 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v1/__init__.py +++ b/packages/google-cloud-functions/google/cloud/functions_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.cloud_functions_service import ( CloudFunctionsServiceAsyncClient, @@ -66,28 +60,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.functions_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py b/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py index 00e437ed6bb3..1a4127a5b7a0 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py +++ b/packages/google-cloud-functions/google/cloud/functions_v1/services/cloud_functions_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -578,11 +578,11 @@ async def sample_create_function(): ) # Make the request - operation = client.create_function(request=request) + operation = await client.create_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -714,11 +714,11 @@ async def sample_update_function(): ) # Make the request - operation = client.update_function(request=request) + operation = await client.update_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -844,11 +844,11 @@ async def sample_delete_function(): ) # Make the request - operation = client.delete_function(request=request) + operation = await client.delete_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/google/cloud/functions_v2/__init__.py b/packages/google-cloud-functions/google/cloud/functions_v2/__init__.py index c60161d267bb..716df5469dd7 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v2/__init__.py +++ b/packages/google-cloud-functions/google/cloud/functions_v2/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.function_service import FunctionServiceAsyncClient, FunctionServiceClient from .types.functions import ( @@ -73,28 +67,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.functions_v2" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py b/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py index 34c40029bd95..e40dc62cd1bf 100644 --- a/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py +++ b/packages/google-cloud-functions/google/cloud/functions_v2/services/function_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -611,11 +611,11 @@ async def sample_create_function(): ) # Make the request - operation = client.create_function(request=request) + operation = await client.create_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -756,11 +756,11 @@ async def sample_update_function(): ) # Make the request - operation = client.update_function(request=request) + operation = await client.update_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -896,11 +896,11 @@ async def sample_delete_function(): ) # Make the request - operation = client.delete_function(request=request) + operation = await client.delete_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/noxfile.py b/packages/google-cloud-functions/noxfile.py index 9697516fdfe6..afd4011c1e3d 100644 --- a/packages/google-cloud-functions/noxfile.py +++ b/packages/google-cloud-functions/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py index ff5855677ed9..ec9976974541 100644 --- a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_create_function_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_create_function(): ) # Make the request - operation = client.create_function(request=request) + operation = await client.create_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py index 4d43b066e770..0d06ccb84564 100644 --- a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_delete_function_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_function(): ) # Make the request - operation = client.delete_function(request=request) + operation = await client.delete_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py index 39177e4b7a0a..383b766f70b3 100644 --- a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v1_generated_cloud_functions_service_update_function_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_function(): ) # Make the request - operation = client.update_function(request=request) + operation = await client.update_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_async.py index dd30d7dbc581..2057c8c89bad 100644 --- a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_async.py +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_create_function_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_function(): ) # Make the request - operation = client.create_function(request=request) + operation = await client.create_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_async.py index 14f2f18da285..b3b399d5057f 100644 --- a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_async.py +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_delete_function_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_function(): ) # Make the request - operation = client.delete_function(request=request) + operation = await client.delete_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_async.py b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_async.py index 062001b1c04f..d96616d5410c 100644 --- a/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_async.py +++ b/packages/google-cloud-functions/samples/generated_samples/cloudfunctions_v2_generated_function_service_update_function_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_function(): request = functions_v2.UpdateFunctionRequest() # Make the request - operation = client.update_function(request=request) + operation = await client.update_function(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-functions/setup.py b/packages/google-cloud-functions/setup.py index e58d47a024dc..d15102497f91 100644 --- a/packages/google-cloud-functions/setup.py +++ b/packages/google-cloud-functions/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-functions/testing/constraints-3.10.txt b/packages/google-cloud-functions/testing/constraints-3.10.txt index 1cd0c5a2c3d4..a92801e1c8e2 100644 --- a/packages/google-cloud-functions/testing/constraints-3.10.txt +++ b/packages/google-cloud-functions/testing/constraints-3.10.txt @@ -1,11 +1,12 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography -grpc-google-iam-v1 +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 +grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-functions/testing/constraints-3.9.txt b/packages/google-cloud-functions/testing/constraints-3.9.txt deleted file mode 100644 index dcb9a9b3d8ed..000000000000 --- a/packages/google-cloud-functions/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 -grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py b/packages/google-cloud-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py index 1b8f00714358..90151138fb39 100644 --- a/packages/google-cloud-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py +++ b/packages/google-cloud-functions/tests/unit/gapic/functions_v1/test_cloud_functions_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1825,11 +1819,7 @@ async def test_list_functions_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_functions(request={}) - ).pages: + async for page_ in (await client.list_functions(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5103,7 +5093,7 @@ def test_get_function_rest_required_fields(request_type=functions.GetFunctionReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_function_rest_unset_required_fields(): @@ -5284,7 +5274,7 @@ def test_create_function_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_function_rest_unset_required_fields(): @@ -5469,7 +5459,7 @@ def test_update_function_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_function_rest_unset_required_fields(): @@ -5648,7 +5638,7 @@ def test_delete_function_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_function_rest_unset_required_fields(): @@ -5828,7 +5818,7 @@ def test_call_function_rest_required_fields(request_type=functions.CallFunctionR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_call_function_rest_unset_required_fields(): @@ -6098,7 +6088,7 @@ def test_set_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_set_iam_policy_rest_unset_required_fields(): @@ -6226,7 +6216,7 @@ def test_get_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_iam_policy_rest_unset_required_fields(): @@ -6353,7 +6343,7 @@ def test_test_iam_permissions_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_test_iam_permissions_rest_unset_required_fields(): diff --git a/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py b/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py index 7b9478d387b0..27824593ce39 100644 --- a/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py +++ b/packages/google-cloud-functions/tests/unit/gapic/functions_v2/test_function_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2213,11 +2207,7 @@ async def test_list_functions_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_functions(request={}) - ).pages: + async for page_ in (await client.list_functions(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4172,7 +4162,7 @@ def test_get_function_rest_required_fields(request_type=functions.GetFunctionReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_function_rest_unset_required_fields(): @@ -4360,7 +4350,7 @@ def test_list_functions_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_functions_rest_unset_required_fields(): @@ -4612,7 +4602,7 @@ def test_create_function_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_function_rest_unset_required_fields(): @@ -4798,7 +4788,7 @@ def test_update_function_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_function_rest_unset_required_fields(): @@ -4979,7 +4969,7 @@ def test_delete_function_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_function_rest_unset_required_fields(): @@ -5161,7 +5151,7 @@ def test_generate_upload_url_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_upload_url_rest_unset_required_fields(): @@ -5287,7 +5277,7 @@ def test_generate_download_url_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_download_url_rest_unset_required_fields(): @@ -5407,7 +5397,7 @@ def test_list_runtimes_rest_required_fields(request_type=functions.ListRuntimesR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_runtimes_rest_unset_required_fields(): diff --git a/packages/google-cloud-gdchardwaremanagement/docs/conf.py b/packages/google-cloud-gdchardwaremanagement/docs/conf.py index f86c7797a7a9..9cb36311b1e1 100644 --- a/packages/google-cloud-gdchardwaremanagement/docs/conf.py +++ b/packages/google-cloud-gdchardwaremanagement/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-gdchardwaremanagement" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/__init__.py b/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/__init__.py index e1adc44f6e0c..ea810cfbb178 100644 --- a/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/__init__.py +++ b/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.gdc_hardware_management import ( GDCHardwareManagementAsyncClient, @@ -117,28 +111,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gdchardwaremanagement_v1alpha" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/services/gdc_hardware_management/async_client.py b/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/services/gdc_hardware_management/async_client.py index be7b4e698d89..b41d2ef7b926 100644 --- a/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/services/gdc_hardware_management/async_client.py +++ b/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/services/gdc_hardware_management/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -609,11 +609,11 @@ async def sample_create_order(): ) # Make the request - operation = client.create_order(request=request) + operation = await client.create_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -765,11 +765,11 @@ async def sample_update_order(): ) # Make the request - operation = client.update_order(request=request) + operation = await client.update_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -903,11 +903,11 @@ async def sample_delete_order(): ) # Make the request - operation = client.delete_order(request=request) + operation = await client.delete_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1035,11 +1035,11 @@ async def sample_submit_order(): ) # Make the request - operation = client.submit_order(request=request) + operation = await client.submit_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1160,11 +1160,11 @@ async def sample_cancel_order(): ) # Make the request - operation = client.cancel_order(request=request) + operation = await client.cancel_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1530,11 +1530,11 @@ async def sample_create_site(): ) # Make the request - operation = client.create_site(request=request) + operation = await client.create_site(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1684,11 +1684,11 @@ async def sample_update_site(): ) # Make the request - operation = client.update_site(request=request) + operation = await client.update_site(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1822,11 +1822,11 @@ async def sample_delete_site(): ) # Make the request - operation = client.delete_site(request=request) + operation = await client.delete_site(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2199,11 +2199,11 @@ async def sample_create_hardware_group(): ) # Make the request - operation = client.create_hardware_group(request=request) + operation = await client.create_hardware_group(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2357,11 +2357,11 @@ async def sample_update_hardware_group(): ) # Make the request - operation = client.update_hardware_group(request=request) + operation = await client.update_hardware_group(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2496,11 +2496,11 @@ async def sample_delete_hardware_group(): ) # Make the request - operation = client.delete_hardware_group(request=request) + operation = await client.delete_hardware_group(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2877,11 +2877,11 @@ async def sample_create_hardware(): ) # Make the request - operation = client.create_hardware(request=request) + operation = await client.create_hardware(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3033,11 +3033,11 @@ async def sample_update_hardware(): ) # Make the request - operation = client.update_hardware(request=request) + operation = await client.update_hardware(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3171,11 +3171,11 @@ async def sample_delete_hardware(): ) # Make the request - operation = client.delete_hardware(request=request) + operation = await client.delete_hardware(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3542,11 +3542,11 @@ async def sample_create_comment(): ) # Make the request - operation = client.create_comment(request=request) + operation = await client.create_comment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4531,11 +4531,11 @@ async def sample_create_zone(): ) # Make the request - operation = client.create_zone(request=request) + operation = await client.create_zone(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4685,11 +4685,11 @@ async def sample_update_zone(): ) # Make the request - operation = client.update_zone(request=request) + operation = await client.update_zone(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4823,11 +4823,11 @@ async def sample_delete_zone(): ) # Make the request - operation = client.delete_zone(request=request) + operation = await client.delete_zone(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4956,11 +4956,11 @@ async def sample_signal_zone_state(): ) # Make the request - operation = client.signal_zone_state(request=request) + operation = await client.signal_zone_state(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5093,11 +5093,11 @@ async def sample_request_order_date_change(): ) # Make the request - operation = client.request_order_date_change(request=request) + operation = await client.request_order_date_change(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/types/resources.py b/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/types/resources.py index 5d101d72e6b2..dd7f6f3a7c06 100644 --- a/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/types/resources.py +++ b/packages/google-cloud-gdchardwaremanagement/google/cloud/gdchardwaremanagement_v1alpha/types/resources.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -447,14 +447,13 @@ class Site(proto.Message): Optional. Any additional notes for this Site. Please include information about: - - security or access restrictions - - any regulations affecting the technicians + - security or access restrictions + - any regulations affecting the technicians visiting the site - - any special process or approval required to + - any special process or approval required to move the equipment - - whether a representative will be available + - whether a representative will be available during site visits - customer_site_id (str): Optional. Customer defined identifier for this Site. This can be used to identify the site diff --git a/packages/google-cloud-gdchardwaremanagement/noxfile.py b/packages/google-cloud-gdchardwaremanagement/noxfile.py index 13da357e3c79..3f54d004d5d7 100644 --- a/packages/google-cloud-gdchardwaremanagement/noxfile.py +++ b/packages/google-cloud-gdchardwaremanagement/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_cancel_order_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_cancel_order_async.py index e58a4f68b20e..9610ea7a158f 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_cancel_order_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_cancel_order_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_cancel_order(): ) # Make the request - operation = client.cancel_order(request=request) + operation = await client.cancel_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_comment_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_comment_async.py index 747706a97bdf..efb08ca40297 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_comment_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_comment_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_create_comment(): ) # Make the request - operation = client.create_comment(request=request) + operation = await client.create_comment(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_async.py index 6f90db2c07e5..b000235a92cd 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,11 +52,11 @@ async def sample_create_hardware(): ) # Make the request - operation = client.create_hardware(request=request) + operation = await client.create_hardware(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_group_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_group_async.py index bc7d368b3dcc..6faba488a664 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_group_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_hardware_group_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_create_hardware_group(): ) # Make the request - operation = client.create_hardware_group(request=request) + operation = await client.create_hardware_group(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_order_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_order_async.py index c7226ebb5624..5c8e69cb6a8c 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_order_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_order_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,11 +52,11 @@ async def sample_create_order(): ) # Make the request - operation = client.create_order(request=request) + operation = await client.create_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_site_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_site_async.py index 8f2410a88bc8..32dcfc1bc246 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_site_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_site_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_site(): ) # Make the request - operation = client.create_site(request=request) + operation = await client.create_site(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_zone_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_zone_async.py index 34f61c3b0573..11a8a3ddaa73 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_zone_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_create_zone_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_zone(): ) # Make the request - operation = client.create_zone(request=request) + operation = await client.create_zone(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_async.py index f47c82cb89d5..803aeb2b2ce1 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_hardware(): ) # Make the request - operation = client.delete_hardware(request=request) + operation = await client.delete_hardware(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_group_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_group_async.py index b49f15661607..9dc14e8f8f1b 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_group_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_hardware_group_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_hardware_group(): ) # Make the request - operation = client.delete_hardware_group(request=request) + operation = await client.delete_hardware_group(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_order_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_order_async.py index 419573a234d7..f2d09fe29482 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_order_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_order_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_order(): ) # Make the request - operation = client.delete_order(request=request) + operation = await client.delete_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_site_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_site_async.py index afd82f816f8c..c5b22ba94b65 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_site_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_site_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_site(): ) # Make the request - operation = client.delete_site(request=request) + operation = await client.delete_site(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_zone_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_zone_async.py index 4f23ac263fca..7bd52bb88080 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_zone_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_delete_zone_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_zone(): ) # Make the request - operation = client.delete_zone(request=request) + operation = await client.delete_zone(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_request_order_date_change_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_request_order_date_change_async.py index 3957b1e5d6ab..1e48befda42b 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_request_order_date_change_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_request_order_date_change_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_request_order_date_change(): ) # Make the request - operation = client.request_order_date_change(request=request) + operation = await client.request_order_date_change(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_signal_zone_state_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_signal_zone_state_async.py index 7e5322adf734..f05c5eeb0165 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_signal_zone_state_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_signal_zone_state_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_signal_zone_state(): ) # Make the request - operation = client.signal_zone_state(request=request) + operation = await client.signal_zone_state(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_submit_order_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_submit_order_async.py index 0ef87dccd85e..5393914aad2b 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_submit_order_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_submit_order_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_submit_order(): ) # Make the request - operation = client.submit_order(request=request) + operation = await client.submit_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_async.py index b12ee7340420..b03c38553159 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_update_hardware(): ) # Make the request - operation = client.update_hardware(request=request) + operation = await client.update_hardware(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_group_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_group_async.py index 754508b44278..973af40fb967 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_group_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_hardware_group_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_update_hardware_group(): ) # Make the request - operation = client.update_hardware_group(request=request) + operation = await client.update_hardware_group(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_order_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_order_async.py index 358e132d89ef..81b342ac4bfe 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_order_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_order_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_update_order(): ) # Make the request - operation = client.update_order(request=request) + operation = await client.update_order(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_site_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_site_async.py index 721670fc4e05..ca9130e0e82e 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_site_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_site_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_update_site(): ) # Make the request - operation = client.update_site(request=request) + operation = await client.update_site(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_zone_async.py b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_zone_async.py index b3b9f153e2af..cdfd3898948f 100644 --- a/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_zone_async.py +++ b/packages/google-cloud-gdchardwaremanagement/samples/generated_samples/gdchardwaremanagement_v1alpha_generated_gdc_hardware_management_update_zone_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_update_zone(): ) # Make the request - operation = client.update_zone(request=request) + operation = await client.update_zone(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gdchardwaremanagement/setup.py b/packages/google-cloud-gdchardwaremanagement/setup.py index 64d7671ebac6..76fd7e9ed083 100644 --- a/packages/google-cloud-gdchardwaremanagement/setup.py +++ b/packages/google-cloud-gdchardwaremanagement/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-gdchardwaremanagement/testing/constraints-3.10.txt b/packages/google-cloud-gdchardwaremanagement/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-gdchardwaremanagement/testing/constraints-3.10.txt +++ b/packages/google-cloud-gdchardwaremanagement/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-gdchardwaremanagement/testing/constraints-3.9.txt b/packages/google-cloud-gdchardwaremanagement/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-gdchardwaremanagement/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-gdchardwaremanagement/tests/unit/gapic/gdchardwaremanagement_v1alpha/test_gdc_hardware_management.py b/packages/google-cloud-gdchardwaremanagement/tests/unit/gapic/gdchardwaremanagement_v1alpha/test_gdc_hardware_management.py index f65b36a47c3d..bdc6ac7a3322 100644 --- a/packages/google-cloud-gdchardwaremanagement/tests/unit/gapic/gdchardwaremanagement_v1alpha/test_gdc_hardware_management.py +++ b/packages/google-cloud-gdchardwaremanagement/tests/unit/gapic/gdchardwaremanagement_v1alpha/test_gdc_hardware_management.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1906,11 +1900,7 @@ async def test_list_orders_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_orders(request={}) - ).pages: + async for page_ in (await client.list_orders(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4465,11 +4455,7 @@ async def test_list_sites_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_sites(request={}) - ).pages: + async for page_ in (await client.list_sites(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6370,11 +6356,7 @@ async def test_list_hardware_groups_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_hardware_groups(request={}) - ).pages: + async for page_ in (await client.list_hardware_groups(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8328,11 +8310,7 @@ async def test_list_hardware_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_hardware(request={}) - ).pages: + async for page_ in (await client.list_hardware(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -10215,11 +10193,7 @@ async def test_list_comments_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_comments(request={}) - ).pages: + async for page_ in (await client.list_comments(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -11811,11 +11785,7 @@ async def test_list_change_log_entries_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_change_log_entries(request={}) - ).pages: + async for page_ in (await client.list_change_log_entries(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -12681,11 +12651,7 @@ async def test_list_skus_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_skus(request={}) - ).pages: + async for page_ in (await client.list_skus(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -13547,11 +13513,7 @@ async def test_list_zones_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_zones(request={}) - ).pages: + async for page_ in (await client.list_zones(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -15753,7 +15715,7 @@ def test_list_orders_rest_required_fields(request_type=service.ListOrdersRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_orders_rest_unset_required_fields(): @@ -16000,7 +15962,7 @@ def test_get_order_rest_required_fields(request_type=service.GetOrderRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_order_rest_unset_required_fields(): @@ -16185,7 +16147,7 @@ def test_create_order_rest_required_fields(request_type=service.CreateOrderReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_order_rest_unset_required_fields(): @@ -16380,7 +16342,7 @@ def test_update_order_rest_required_fields(request_type=service.UpdateOrderReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_order_rest_unset_required_fields(): @@ -16579,7 +16541,7 @@ def test_delete_order_rest_required_fields(request_type=service.DeleteOrderReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_order_rest_unset_required_fields(): @@ -16763,7 +16725,7 @@ def test_submit_order_rest_required_fields(request_type=service.SubmitOrderReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_submit_order_rest_unset_required_fields(): @@ -16939,7 +16901,7 @@ def test_cancel_order_rest_required_fields(request_type=service.CancelOrderReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_cancel_order_rest_unset_required_fields(): @@ -17122,7 +17084,7 @@ def test_list_sites_rest_required_fields(request_type=service.ListSitesRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_sites_rest_unset_required_fields(): @@ -17368,7 +17330,7 @@ def test_get_site_rest_required_fields(request_type=service.GetSiteRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_site_rest_unset_required_fields(): @@ -17552,7 +17514,7 @@ def test_create_site_rest_required_fields(request_type=service.CreateSiteRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_site_rest_unset_required_fields(): @@ -17746,7 +17708,7 @@ def test_update_site_rest_required_fields(request_type=service.UpdateSiteRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_site_rest_unset_required_fields(): @@ -17940,7 +17902,7 @@ def test_delete_site_rest_required_fields(request_type=service.DeleteSiteRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_site_rest_unset_required_fields(): @@ -18128,7 +18090,7 @@ def test_list_hardware_groups_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_hardware_groups_rest_unset_required_fields(): @@ -18383,7 +18345,7 @@ def test_get_hardware_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_hardware_group_rest_unset_required_fields(): @@ -18577,7 +18539,7 @@ def test_create_hardware_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_hardware_group_rest_unset_required_fields(): @@ -18779,7 +18741,7 @@ def test_update_hardware_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_hardware_group_rest_unset_required_fields(): @@ -18982,7 +18944,7 @@ def test_delete_hardware_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_hardware_group_rest_unset_required_fields(): @@ -19167,7 +19129,7 @@ def test_list_hardware_rest_required_fields(request_type=service.ListHardwareReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_hardware_rest_unset_required_fields(): @@ -19414,7 +19376,7 @@ def test_get_hardware_rest_required_fields(request_type=service.GetHardwareReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_hardware_rest_unset_required_fields(): @@ -19596,7 +19558,7 @@ def test_create_hardware_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_hardware_rest_unset_required_fields(): @@ -19788,7 +19750,7 @@ def test_update_hardware_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_hardware_rest_unset_required_fields(): @@ -19984,7 +19946,7 @@ def test_delete_hardware_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_hardware_rest_unset_required_fields(): @@ -20167,7 +20129,7 @@ def test_list_comments_rest_required_fields(request_type=service.ListCommentsReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_comments_rest_unset_required_fields(): @@ -20414,7 +20376,7 @@ def test_get_comment_rest_required_fields(request_type=service.GetCommentRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_comment_rest_unset_required_fields(): @@ -20601,7 +20563,7 @@ def test_create_comment_rest_required_fields(request_type=service.CreateCommentR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_comment_rest_unset_required_fields(): @@ -20800,7 +20762,7 @@ def test_record_action_on_comment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_record_action_on_comment_rest_unset_required_fields(): @@ -21004,7 +20966,7 @@ def test_list_change_log_entries_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_change_log_entries_rest_unset_required_fields(): @@ -21259,7 +21221,7 @@ def test_get_change_log_entry_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_change_log_entry_rest_unset_required_fields(): @@ -21446,7 +21408,7 @@ def test_list_skus_rest_required_fields(request_type=service.ListSkusRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_skus_rest_unset_required_fields(): @@ -21692,7 +21654,7 @@ def test_get_sku_rest_required_fields(request_type=service.GetSkuRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_sku_rest_unset_required_fields(): @@ -21876,7 +21838,7 @@ def test_list_zones_rest_required_fields(request_type=service.ListZonesRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_zones_rest_unset_required_fields(): @@ -22122,7 +22084,7 @@ def test_get_zone_rest_required_fields(request_type=service.GetZoneRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_zone_rest_unset_required_fields(): @@ -22306,7 +22268,7 @@ def test_create_zone_rest_required_fields(request_type=service.CreateZoneRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_zone_rest_unset_required_fields(): @@ -22500,7 +22462,7 @@ def test_update_zone_rest_required_fields(request_type=service.UpdateZoneRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_zone_rest_unset_required_fields(): @@ -22694,7 +22656,7 @@ def test_delete_zone_rest_required_fields(request_type=service.DeleteZoneRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_zone_rest_unset_required_fields(): @@ -22873,7 +22835,7 @@ def test_signal_zone_state_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_signal_zone_state_rest_unset_required_fields(): @@ -23058,7 +23020,7 @@ def test_request_order_date_change_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_request_order_date_change_rest_unset_required_fields(): diff --git a/packages/google-cloud-geminidataanalytics/docs/conf.py b/packages/google-cloud-geminidataanalytics/docs/conf.py index 668961f572fd..aff2c195f682 100644 --- a/packages/google-cloud-geminidataanalytics/docs/conf.py +++ b/packages/google-cloud-geminidataanalytics/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-geminidataanalytics" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/__init__.py b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/__init__.py index cbffdca89e4e..847872932d83 100644 --- a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/__init__.py +++ b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.data_agent_service import ( DataAgentServiceAsyncClient, @@ -132,28 +126,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.geminidataanalytics_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/services/data_agent_service/async_client.py b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/services/data_agent_service/async_client.py index 20564e3481a9..d5b1c0b605f6 100644 --- a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/services/data_agent_service/async_client.py +++ b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1/services/data_agent_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -712,11 +712,11 @@ async def sample_create_data_agent(): ) # Make the request - operation = client.create_data_agent(request=request) + operation = await client.create_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -986,11 +986,11 @@ async def sample_update_data_agent(): ) # Make the request - operation = client.update_data_agent(request=request) + operation = await client.update_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1258,11 +1258,11 @@ async def sample_delete_data_agent(): ) # Make the request - operation = client.delete_data_agent(request=request) + operation = await client.delete_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/__init__.py b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/__init__.py index 16281a523558..f8d496d36869 100644 --- a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/__init__.py +++ b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.data_agent_service import ( DataAgentServiceAsyncClient, @@ -139,28 +133,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.geminidataanalytics_v1alpha" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/services/data_agent_service/async_client.py b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/services/data_agent_service/async_client.py index c97c95c9f1f3..93e316d07326 100644 --- a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/services/data_agent_service/async_client.py +++ b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1alpha/services/data_agent_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -710,11 +710,11 @@ async def sample_create_data_agent(): ) # Make the request - operation = client.create_data_agent(request=request) + operation = await client.create_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -984,11 +984,11 @@ async def sample_update_data_agent(): ) # Make the request - operation = client.update_data_agent(request=request) + operation = await client.update_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1256,11 +1256,11 @@ async def sample_delete_data_agent(): ) # Make the request - operation = client.delete_data_agent(request=request) + operation = await client.delete_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/__init__.py b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/__init__.py index 3bf0e1064e5e..07edbdbb3cd0 100644 --- a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/__init__.py +++ b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.data_agent_service import ( DataAgentServiceAsyncClient, @@ -139,28 +133,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.geminidataanalytics_v1beta" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/services/data_agent_service/async_client.py b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/services/data_agent_service/async_client.py index b2df4dae88ae..4ef2b8d9e90b 100644 --- a/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/services/data_agent_service/async_client.py +++ b/packages/google-cloud-geminidataanalytics/google/cloud/geminidataanalytics_v1beta/services/data_agent_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -710,11 +710,11 @@ async def sample_create_data_agent(): ) # Make the request - operation = client.create_data_agent(request=request) + operation = await client.create_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -984,11 +984,11 @@ async def sample_update_data_agent(): ) # Make the request - operation = client.update_data_agent(request=request) + operation = await client.update_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1256,11 +1256,11 @@ async def sample_delete_data_agent(): ) # Make the request - operation = client.delete_data_agent(request=request) + operation = await client.delete_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/noxfile.py b/packages/google-cloud-geminidataanalytics/noxfile.py index 21d70d84fe77..46046d67d6b1 100644 --- a/packages/google-cloud-geminidataanalytics/noxfile.py +++ b/packages/google-cloud-geminidataanalytics/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_create_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_create_data_agent_async.py index 162dc54f498b..13ca393a34d7 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_create_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_create_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_data_agent(): ) # Make the request - operation = client.create_data_agent(request=request) + operation = await client.create_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_delete_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_delete_data_agent_async.py index c3114d98bac8..fef8f62e9f29 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_delete_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_delete_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_data_agent(): ) # Make the request - operation = client.delete_data_agent(request=request) + operation = await client.delete_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_update_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_update_data_agent_async.py index 4d5a47b0323b..ba856f3c07ec 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_update_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1_generated_data_agent_service_update_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_data_agent(): request = geminidataanalytics_v1.UpdateDataAgentRequest() # Make the request - operation = client.update_data_agent(request=request) + operation = await client.update_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_create_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_create_data_agent_async.py index 1c3533b46496..e1ba75b708a8 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_create_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_create_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_data_agent(): ) # Make the request - operation = client.create_data_agent(request=request) + operation = await client.create_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_delete_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_delete_data_agent_async.py index 17cfc3a61309..3dd8f4de3ca3 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_delete_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_delete_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_data_agent(): ) # Make the request - operation = client.delete_data_agent(request=request) + operation = await client.delete_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_update_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_update_data_agent_async.py index ffcea891c315..e13291568ba1 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_update_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1alpha_generated_data_agent_service_update_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_data_agent(): request = geminidataanalytics_v1alpha.UpdateDataAgentRequest() # Make the request - operation = client.update_data_agent(request=request) + operation = await client.update_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_create_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_create_data_agent_async.py index fc7ac5f7b5bb..ace30ca677dd 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_create_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_create_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_data_agent(): ) # Make the request - operation = client.create_data_agent(request=request) + operation = await client.create_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_delete_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_delete_data_agent_async.py index e38f49c8155d..0478bc8521fb 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_delete_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_delete_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_data_agent(): ) # Make the request - operation = client.delete_data_agent(request=request) + operation = await client.delete_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_update_data_agent_async.py b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_update_data_agent_async.py index 02f720e315b0..7ea695825cc9 100644 --- a/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_update_data_agent_async.py +++ b/packages/google-cloud-geminidataanalytics/samples/generated_samples/geminidataanalytics_v1beta_generated_data_agent_service_update_data_agent_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_data_agent(): request = geminidataanalytics_v1beta.UpdateDataAgentRequest() # Make the request - operation = client.update_data_agent(request=request) + operation = await client.update_data_agent(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-geminidataanalytics/setup.py b/packages/google-cloud-geminidataanalytics/setup.py index 0dc75b57d1e8..85095e2ee6c2 100644 --- a/packages/google-cloud-geminidataanalytics/setup.py +++ b/packages/google-cloud-geminidataanalytics/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -74,7 +74,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -82,7 +82,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -93,7 +92,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-geminidataanalytics/testing/constraints-3.10.txt b/packages/google-cloud-geminidataanalytics/testing/constraints-3.10.txt index 1cd0c5a2c3d4..a92801e1c8e2 100644 --- a/packages/google-cloud-geminidataanalytics/testing/constraints-3.10.txt +++ b/packages/google-cloud-geminidataanalytics/testing/constraints-3.10.txt @@ -1,11 +1,12 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography -grpc-google-iam-v1 +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 +grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-geminidataanalytics/testing/constraints-3.9.txt b/packages/google-cloud-geminidataanalytics/testing/constraints-3.9.txt deleted file mode 100644 index dcb9a9b3d8ed..000000000000 --- a/packages/google-cloud-geminidataanalytics/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 -grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_agent_service.py b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_agent_service.py index 510b9d775713..3568cb1e80ab 100644 --- a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_agent_service.py +++ b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_agent_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1884,11 +1878,7 @@ async def test_list_data_agents_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_data_agents(request={}) - ).pages: + async for page_ in (await client.list_data_agents(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2441,11 +2431,7 @@ async def test_list_accessible_data_agents_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_accessible_data_agents(request={}) - ).pages: + async for page_ in (await client.list_accessible_data_agents(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5860,7 +5846,7 @@ def test_list_data_agents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_data_agents_rest_unset_required_fields(): @@ -6129,7 +6115,7 @@ def test_list_accessible_data_agents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_accessible_data_agents_rest_unset_required_fields(): @@ -6385,7 +6371,7 @@ def test_get_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_data_agent_rest_unset_required_fields(): @@ -6575,7 +6561,7 @@ def test_create_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_data_agent_rest_unset_required_fields(): @@ -6792,7 +6778,7 @@ def test_create_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_data_agent_sync_rest_unset_required_fields(): @@ -7005,7 +6991,7 @@ def test_update_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_data_agent_rest_unset_required_fields(): @@ -7215,7 +7201,7 @@ def test_update_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_data_agent_sync_rest_unset_required_fields(): @@ -7424,7 +7410,7 @@ def test_delete_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_data_agent_rest_unset_required_fields(): @@ -7605,7 +7591,7 @@ def test_delete_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_data_agent_sync_rest_unset_required_fields(): @@ -7782,7 +7768,7 @@ def test_get_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_iam_policy_rest_unset_required_fields(): @@ -7959,7 +7945,7 @@ def test_set_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_set_iam_policy_rest_unset_required_fields(): diff --git a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_chat_service.py b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_chat_service.py index 61e6dcba18a6..f7dbb9d198c9 100644 --- a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_chat_service.py +++ b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1/test_data_chat_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3164,11 +3158,7 @@ async def test_list_conversations_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_conversations(request={}) - ).pages: + async for page_ in (await client.list_conversations(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3685,11 +3675,7 @@ async def test_list_messages_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_messages(request={}) - ).pages: + async for page_ in (await client.list_messages(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3805,7 +3791,7 @@ def test_chat_rest_required_fields(request_type=data_chat_service.ChatRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_chat_rest_unset_required_fields(): @@ -3945,7 +3931,7 @@ def test_create_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_conversation_rest_unset_required_fields(): @@ -4141,7 +4127,7 @@ def test_delete_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_conversation_rest_unset_required_fields(): @@ -4321,7 +4307,7 @@ def test_get_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_conversation_rest_unset_required_fields(): @@ -4513,7 +4499,7 @@ def test_list_conversations_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_conversations_rest_unset_required_fields(): @@ -4771,7 +4757,7 @@ def test_list_messages_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_messages_rest_unset_required_fields(): diff --git a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_agent_service.py b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_agent_service.py index 9d6e42f528d0..4179b30d33c6 100644 --- a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_agent_service.py +++ b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_agent_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1886,11 +1880,7 @@ async def test_list_data_agents_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_data_agents(request={}) - ).pages: + async for page_ in (await client.list_data_agents(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2443,11 +2433,7 @@ async def test_list_accessible_data_agents_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_accessible_data_agents(request={}) - ).pages: + async for page_ in (await client.list_accessible_data_agents(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5850,7 +5836,7 @@ def test_list_data_agents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_data_agents_rest_unset_required_fields(): @@ -6120,7 +6106,7 @@ def test_list_accessible_data_agents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_accessible_data_agents_rest_unset_required_fields(): @@ -6376,7 +6362,7 @@ def test_get_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_data_agent_rest_unset_required_fields(): @@ -6567,7 +6553,7 @@ def test_create_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_data_agent_rest_unset_required_fields(): @@ -6785,7 +6771,7 @@ def test_create_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_data_agent_sync_rest_unset_required_fields(): @@ -6998,7 +6984,7 @@ def test_update_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_data_agent_rest_unset_required_fields(): @@ -7208,7 +7194,7 @@ def test_update_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_data_agent_sync_rest_unset_required_fields(): @@ -7417,7 +7403,7 @@ def test_delete_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_data_agent_rest_unset_required_fields(): @@ -7599,7 +7585,7 @@ def test_delete_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_data_agent_sync_rest_unset_required_fields(): @@ -7776,7 +7762,7 @@ def test_get_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_iam_policy_rest_unset_required_fields(): @@ -7953,7 +7939,7 @@ def test_set_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_set_iam_policy_rest_unset_required_fields(): diff --git a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_chat_service.py b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_chat_service.py index 95f3a7616d9d..b19a34843a35 100644 --- a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_chat_service.py +++ b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1alpha/test_data_chat_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3153,11 +3147,7 @@ async def test_list_conversations_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_conversations(request={}) - ).pages: + async for page_ in (await client.list_conversations(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3674,11 +3664,7 @@ async def test_list_messages_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_messages(request={}) - ).pages: + async for page_ in (await client.list_messages(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4047,7 +4033,7 @@ def test_chat_rest_required_fields(request_type=data_chat_service.ChatRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_chat_rest_unset_required_fields(): @@ -4187,7 +4173,7 @@ def test_create_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_conversation_rest_unset_required_fields(): @@ -4383,7 +4369,7 @@ def test_delete_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_conversation_rest_unset_required_fields(): @@ -4563,7 +4549,7 @@ def test_get_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_conversation_rest_unset_required_fields(): @@ -4755,7 +4741,7 @@ def test_list_conversations_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_conversations_rest_unset_required_fields(): @@ -5013,7 +4999,7 @@ def test_list_messages_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_messages_rest_unset_required_fields(): @@ -5272,7 +5258,7 @@ def test_query_data_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_query_data_rest_unset_required_fields(): diff --git a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_agent_service.py b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_agent_service.py index f5b8d56885c0..d8ce7fc92cc5 100644 --- a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_agent_service.py +++ b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_agent_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1886,11 +1880,7 @@ async def test_list_data_agents_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_data_agents(request={}) - ).pages: + async for page_ in (await client.list_data_agents(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2443,11 +2433,7 @@ async def test_list_accessible_data_agents_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_accessible_data_agents(request={}) - ).pages: + async for page_ in (await client.list_accessible_data_agents(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5850,7 +5836,7 @@ def test_list_data_agents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_data_agents_rest_unset_required_fields(): @@ -6120,7 +6106,7 @@ def test_list_accessible_data_agents_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_accessible_data_agents_rest_unset_required_fields(): @@ -6376,7 +6362,7 @@ def test_get_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_data_agent_rest_unset_required_fields(): @@ -6567,7 +6553,7 @@ def test_create_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_data_agent_rest_unset_required_fields(): @@ -6785,7 +6771,7 @@ def test_create_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_data_agent_sync_rest_unset_required_fields(): @@ -6998,7 +6984,7 @@ def test_update_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_data_agent_rest_unset_required_fields(): @@ -7208,7 +7194,7 @@ def test_update_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_data_agent_sync_rest_unset_required_fields(): @@ -7417,7 +7403,7 @@ def test_delete_data_agent_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_data_agent_rest_unset_required_fields(): @@ -7599,7 +7585,7 @@ def test_delete_data_agent_sync_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_data_agent_sync_rest_unset_required_fields(): @@ -7776,7 +7762,7 @@ def test_get_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_iam_policy_rest_unset_required_fields(): @@ -7953,7 +7939,7 @@ def test_set_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_set_iam_policy_rest_unset_required_fields(): diff --git a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_chat_service.py b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_chat_service.py index 552a0b0d300f..6fc1bca36297 100644 --- a/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_chat_service.py +++ b/packages/google-cloud-geminidataanalytics/tests/unit/gapic/geminidataanalytics_v1beta/test_data_chat_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3153,11 +3147,7 @@ async def test_list_conversations_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_conversations(request={}) - ).pages: + async for page_ in (await client.list_conversations(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3674,11 +3664,7 @@ async def test_list_messages_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_messages(request={}) - ).pages: + async for page_ in (await client.list_messages(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4047,7 +4033,7 @@ def test_chat_rest_required_fields(request_type=data_chat_service.ChatRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_chat_rest_unset_required_fields(): @@ -4187,7 +4173,7 @@ def test_create_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_conversation_rest_unset_required_fields(): @@ -4383,7 +4369,7 @@ def test_delete_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_conversation_rest_unset_required_fields(): @@ -4563,7 +4549,7 @@ def test_get_conversation_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_conversation_rest_unset_required_fields(): @@ -4755,7 +4741,7 @@ def test_list_conversations_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_conversations_rest_unset_required_fields(): @@ -5013,7 +4999,7 @@ def test_list_messages_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_messages_rest_unset_required_fields(): @@ -5272,7 +5258,7 @@ def test_query_data_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_query_data_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-backup/docs/conf.py b/packages/google-cloud-gke-backup/docs/conf.py index 101a2a1938d6..19d7de796abd 100644 --- a/packages/google-cloud-gke-backup/docs/conf.py +++ b/packages/google-cloud-gke-backup/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-gke-backup" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py index 4b409f688453..0cab7fc74563 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.backup_for_gke import BackupForGKEAsyncClient, BackupForGKEClient from .types.backup import Backup @@ -114,28 +108,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gke_backup_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py index 68f210b80e80..580ea05e67c7 100644 --- a/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py +++ b/packages/google-cloud-gke-backup/google/cloud/gke_backup_v1/services/backup_for_gke/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -395,11 +395,11 @@ async def sample_create_backup_plan(): ) # Make the request - operation = client.create_backup_plan(request=request) + operation = await client.create_backup_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -788,11 +788,11 @@ async def sample_update_backup_plan(): ) # Make the request - operation = client.update_backup_plan(request=request) + operation = await client.update_backup_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -936,11 +936,11 @@ async def sample_delete_backup_plan(): ) # Make the request - operation = client.delete_backup_plan(request=request) + operation = await client.delete_backup_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1074,11 +1074,11 @@ async def sample_create_backup_channel(): ) # Make the request - operation = client.create_backup_channel(request=request) + operation = await client.create_backup_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1473,11 +1473,11 @@ async def sample_update_backup_channel(): ) # Make the request - operation = client.update_backup_channel(request=request) + operation = await client.update_backup_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1621,11 +1621,11 @@ async def sample_delete_backup_channel(): ) # Make the request - operation = client.delete_backup_channel(request=request) + operation = await client.delete_backup_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2001,11 +2001,11 @@ async def sample_create_backup(): ) # Make the request - operation = client.create_backup(request=request) + operation = await client.create_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2400,11 +2400,11 @@ async def sample_update_backup(): ) # Make the request - operation = client.update_backup(request=request) + operation = await client.update_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2546,11 +2546,11 @@ async def sample_delete_backup(): ) # Make the request - operation = client.delete_backup(request=request) + operation = await client.delete_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2928,11 +2928,11 @@ async def sample_create_restore_plan(): ) # Make the request - operation = client.create_restore_plan(request=request) + operation = await client.create_restore_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3324,11 +3324,11 @@ async def sample_update_restore_plan(): ) # Make the request - operation = client.update_restore_plan(request=request) + operation = await client.update_restore_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3469,11 +3469,11 @@ async def sample_delete_restore_plan(): ) # Make the request - operation = client.delete_restore_plan(request=request) + operation = await client.delete_restore_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3608,11 +3608,11 @@ async def sample_create_restore_channel(): ) # Make the request - operation = client.create_restore_channel(request=request) + operation = await client.create_restore_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4008,11 +4008,11 @@ async def sample_update_restore_channel(): ) # Make the request - operation = client.update_restore_channel(request=request) + operation = await client.update_restore_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4157,11 +4157,11 @@ async def sample_delete_restore_channel(): ) # Make the request - operation = client.delete_restore_channel(request=request) + operation = await client.delete_restore_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4542,11 +4542,11 @@ async def sample_create_restore(): ) # Make the request - operation = client.create_restore(request=request) + operation = await client.create_restore(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4937,11 +4937,11 @@ async def sample_update_restore(): ) # Make the request - operation = client.update_restore(request=request) + operation = await client.update_restore(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5081,11 +5081,11 @@ async def sample_delete_restore(): ) # Make the request - operation = client.delete_restore(request=request) + operation = await client.delete_restore(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/noxfile.py b/packages/google-cloud-gke-backup/noxfile.py index daf624fbc5d3..8bc3062bfa69 100644 --- a/packages/google-cloud-gke-backup/noxfile.py +++ b/packages/google-cloud-gke-backup/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_async.py index 7e0934d64444..c3fcdd4de238 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_backup(): ) # Make the request - operation = client.create_backup(request=request) + operation = await client.create_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_channel_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_channel_async.py index 7742912dc278..2e5637cabd79 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_channel_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_create_backup_channel(): ) # Make the request - operation = client.create_backup_channel(request=request) + operation = await client.create_backup_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_async.py index e3fdb346e215..4a6a95f3a6e6 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_backup_plan_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_backup_plan(): ) # Make the request - operation = client.create_backup_plan(request=request) + operation = await client.create_backup_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_async.py index d00c63b541a3..d3176435d1c5 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_restore(): ) # Make the request - operation = client.create_restore(request=request) + operation = await client.create_restore(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_channel_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_channel_async.py index e9af0742352d..04675686f134 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_channel_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_create_restore_channel(): ) # Make the request - operation = client.create_restore_channel(request=request) + operation = await client.create_restore_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_async.py index 8d2f0d5b7fd7..f53923f33268 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_create_restore_plan_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_create_restore_plan(): ) # Make the request - operation = client.create_restore_plan(request=request) + operation = await client.create_restore_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_async.py index 277d8b96146c..156abd36ff6c 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_backup(): ) # Make the request - operation = client.delete_backup(request=request) + operation = await client.delete_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_channel_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_channel_async.py index c552f7ba6c71..68296c882b33 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_channel_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_backup_channel(): ) # Make the request - operation = client.delete_backup_channel(request=request) + operation = await client.delete_backup_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_async.py index 47f7edaff640..de3f41179940 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_backup_plan_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_backup_plan(): ) # Make the request - operation = client.delete_backup_plan(request=request) + operation = await client.delete_backup_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_async.py index 3d5becd0afd8..3d9dd161216b 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_restore(): ) # Make the request - operation = client.delete_restore(request=request) + operation = await client.delete_restore(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_channel_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_channel_async.py index ca8f58994b31..26d20fd37e85 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_channel_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_restore_channel(): ) # Make the request - operation = client.delete_restore_channel(request=request) + operation = await client.delete_restore_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py index c286119842bb..546a8dc95656 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_delete_restore_plan_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_restore_plan(): ) # Make the request - operation = client.delete_restore_plan(request=request) + operation = await client.delete_restore_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_async.py index 3854001c7ecb..1f8e9bd6faa6 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_backup(): ) # Make the request - operation = client.update_backup(request=request) + operation = await client.update_backup(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_channel_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_channel_async.py index 6134ba9139f0..d1b3b7be3871 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_channel_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_backup_channel(): ) # Make the request - operation = client.update_backup_channel(request=request) + operation = await client.update_backup_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py index d9cd8850bd56..cb54e5dffd42 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_backup_plan_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_backup_plan(): ) # Make the request - operation = client.update_backup_plan(request=request) + operation = await client.update_backup_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_async.py index 6ff858c78466..dbc66c8c1bfd 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_restore(): ) # Make the request - operation = client.update_restore(request=request) + operation = await client.update_restore(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_channel_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_channel_async.py index eda1a7458579..ab40993a1024 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_channel_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_channel_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_restore_channel(): ) # Make the request - operation = client.update_restore_channel(request=request) + operation = await client.update_restore_channel(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py index 9ce42da05dec..aabd2c4a770e 100644 --- a/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py +++ b/packages/google-cloud-gke-backup/samples/generated_samples/gkebackup_v1_generated_backup_for_gke_update_restore_plan_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_update_restore_plan(): ) # Make the request - operation = client.update_restore_plan(request=request) + operation = await client.update_restore_plan(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-backup/setup.py b/packages/google-cloud-gke-backup/setup.py index ebbc554fdd57..cc1f14eb620d 100644 --- a/packages/google-cloud-gke-backup/setup.py +++ b/packages/google-cloud-gke-backup/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-gke-backup/testing/constraints-3.10.txt b/packages/google-cloud-gke-backup/testing/constraints-3.10.txt index 1cd0c5a2c3d4..a92801e1c8e2 100644 --- a/packages/google-cloud-gke-backup/testing/constraints-3.10.txt +++ b/packages/google-cloud-gke-backup/testing/constraints-3.10.txt @@ -1,11 +1,12 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography -grpc-google-iam-v1 +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 +grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-gke-backup/testing/constraints-3.9.txt b/packages/google-cloud-gke-backup/testing/constraints-3.9.txt deleted file mode 100644 index dcb9a9b3d8ed..000000000000 --- a/packages/google-cloud-gke-backup/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 -grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py b/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py index be9c33a75428..fadf05084847 100644 --- a/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py +++ b/packages/google-cloud-gke-backup/tests/unit/gapic/gke_backup_v1/test_backup_for_gke.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2234,11 +2228,7 @@ async def test_list_backup_plans_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_backup_plans(request={}) - ).pages: + async for page_ in (await client.list_backup_plans(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4220,11 +4210,7 @@ async def test_list_backup_channels_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_backup_channels(request={}) - ).pages: + async for page_ in (await client.list_backup_channels(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5842,11 +5828,7 @@ async def test_list_backup_plan_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_backup_plan_bindings(request={}) - ).pages: + async for page_ in (await client.list_backup_plan_bindings(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7076,11 +7058,7 @@ async def test_list_backups_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_backups(request={}) - ).pages: + async for page_ in (await client.list_backups(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8677,11 +8655,7 @@ async def test_list_volume_backups_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_volume_backups(request={}) - ).pages: + async for page_ in (await client.list_volume_backups(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9976,11 +9950,7 @@ async def test_list_restore_plans_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_restore_plans(request={}) - ).pages: + async for page_ in (await client.list_restore_plans(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -11953,11 +11923,7 @@ async def test_list_restore_channels_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_restore_channels(request={}) - ).pages: + async for page_ in (await client.list_restore_channels(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -13575,11 +13541,7 @@ async def test_list_restore_plan_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_restore_plan_bindings(request={}) - ).pages: + async for page_ in (await client.list_restore_plan_bindings(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -14809,11 +14771,7 @@ async def test_list_restores_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_restores(request={}) - ).pages: + async for page_ in (await client.list_restores(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -16383,11 +16341,7 @@ async def test_list_volume_restores_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_volume_restores(request={}) - ).pages: + async for page_ in (await client.list_volume_restores(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -17234,7 +17188,7 @@ def test_create_backup_plan_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_backup_plan_rest_unset_required_fields(): @@ -17434,7 +17388,7 @@ def test_list_backup_plans_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backup_plans_rest_unset_required_fields(): @@ -17683,7 +17637,7 @@ def test_get_backup_plan_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_plan_rest_unset_required_fields(): @@ -17866,7 +17820,7 @@ def test_update_backup_plan_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_backup_plan_rest_unset_required_fields(): @@ -18055,7 +18009,7 @@ def test_delete_backup_plan_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_backup_plan_rest_unset_required_fields(): @@ -18242,7 +18196,7 @@ def test_create_backup_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_backup_channel_rest_unset_required_fields(): @@ -18443,7 +18397,7 @@ def test_list_backup_channels_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backup_channels_rest_unset_required_fields(): @@ -18698,7 +18652,7 @@ def test_get_backup_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_channel_rest_unset_required_fields(): @@ -18882,7 +18836,7 @@ def test_update_backup_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_backup_channel_rest_unset_required_fields(): @@ -19077,7 +19031,7 @@ def test_delete_backup_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_backup_channel_rest_unset_required_fields(): @@ -19277,7 +19231,7 @@ def test_list_backup_plan_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backup_plan_bindings_rest_unset_required_fields(): @@ -19539,7 +19493,7 @@ def test_get_backup_plan_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_plan_binding_rest_unset_required_fields(): @@ -19721,7 +19675,7 @@ def test_create_backup_rest_required_fields(request_type=gkebackup.CreateBackupR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_backup_rest_unset_required_fields(): @@ -19911,7 +19865,7 @@ def test_list_backups_rest_required_fields(request_type=gkebackup.ListBackupsReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_backups_rest_unset_required_fields(): @@ -20163,7 +20117,7 @@ def test_get_backup_rest_required_fields(request_type=gkebackup.GetBackupRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_rest_unset_required_fields(): @@ -20340,7 +20294,7 @@ def test_update_backup_rest_required_fields(request_type=gkebackup.UpdateBackupR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_backup_rest_unset_required_fields(): @@ -20528,7 +20482,7 @@ def test_delete_backup_rest_required_fields(request_type=gkebackup.DeleteBackupR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_backup_rest_unset_required_fields(): @@ -20727,7 +20681,7 @@ def test_list_volume_backups_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_volume_backups_rest_unset_required_fields(): @@ -20984,7 +20938,7 @@ def test_get_volume_backup_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_volume_backup_rest_unset_required_fields(): @@ -21185,7 +21139,7 @@ def test_create_restore_plan_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_restore_plan_rest_unset_required_fields(): @@ -21387,7 +21341,7 @@ def test_list_restore_plans_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_restore_plans_rest_unset_required_fields(): @@ -21640,7 +21594,7 @@ def test_get_restore_plan_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_restore_plan_rest_unset_required_fields(): @@ -21823,7 +21777,7 @@ def test_update_restore_plan_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_restore_plan_rest_unset_required_fields(): @@ -22017,7 +21971,7 @@ def test_delete_restore_plan_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_restore_plan_rest_unset_required_fields(): @@ -22212,7 +22166,7 @@ def test_create_restore_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_restore_channel_rest_unset_required_fields(): @@ -22414,7 +22368,7 @@ def test_list_restore_channels_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_restore_channels_rest_unset_required_fields(): @@ -22669,7 +22623,7 @@ def test_get_restore_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_restore_channel_rest_unset_required_fields(): @@ -22853,7 +22807,7 @@ def test_update_restore_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_restore_channel_rest_unset_required_fields(): @@ -23043,7 +22997,7 @@ def test_delete_restore_channel_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_restore_channel_rest_unset_required_fields(): @@ -23235,7 +23189,7 @@ def test_list_restore_plan_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_restore_plan_bindings_rest_unset_required_fields(): @@ -23497,7 +23451,7 @@ def test_get_restore_plan_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_restore_plan_binding_rest_unset_required_fields(): @@ -23694,7 +23648,7 @@ def test_create_restore_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_restore_rest_unset_required_fields(): @@ -23892,7 +23846,7 @@ def test_list_restores_rest_required_fields(request_type=gkebackup.ListRestoresR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_restores_rest_unset_required_fields(): @@ -24143,7 +24097,7 @@ def test_get_restore_rest_required_fields(request_type=gkebackup.GetRestoreReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_restore_rest_unset_required_fields(): @@ -24322,7 +24276,7 @@ def test_update_restore_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_restore_rest_unset_required_fields(): @@ -24512,7 +24466,7 @@ def test_delete_restore_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_restore_rest_unset_required_fields(): @@ -24711,7 +24665,7 @@ def test_list_volume_restores_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_volume_restores_rest_unset_required_fields(): @@ -24970,7 +24924,7 @@ def test_get_volume_restore_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_volume_restore_rest_unset_required_fields(): @@ -25155,7 +25109,7 @@ def test_get_backup_index_download_url_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_backup_index_download_url_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-connect-gateway/docs/conf.py b/packages/google-cloud-gke-connect-gateway/docs/conf.py index 7bf6169b89f9..b5445fe83b1d 100644 --- a/packages/google-cloud-gke-connect-gateway/docs/conf.py +++ b/packages/google-cloud-gke-connect-gateway/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-gke-connect-gateway" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1/__init__.py b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1/__init__.py index b1b0f9473a3b..a2c882215730 100644 --- a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1/__init__.py +++ b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.gateway_control import GatewayControlClient from .types.control import GenerateCredentialsRequest, GenerateCredentialsResponse @@ -41,28 +35,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gkeconnect.gateway_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/__init__.py b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/__init__.py index 8a6650500817..376eb83aeb6b 100644 --- a/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/__init__.py +++ b/packages/google-cloud-gke-connect-gateway/google/cloud/gkeconnect/gateway_v1beta1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.gateway_control import GatewayControlClient from .types.control import GenerateCredentialsRequest, GenerateCredentialsResponse @@ -41,28 +35,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gkeconnect.gateway_v1beta1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gke-connect-gateway/noxfile.py b/packages/google-cloud-gke-connect-gateway/noxfile.py index b8df14b0bf30..9049d485c99e 100644 --- a/packages/google-cloud-gke-connect-gateway/noxfile.py +++ b/packages/google-cloud-gke-connect-gateway/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-gke-connect-gateway/setup.py b/packages/google-cloud-gke-connect-gateway/setup.py index a871814ba715..08c5c8163440 100644 --- a/packages/google-cloud-gke-connect-gateway/setup.py +++ b/packages/google-cloud-gke-connect-gateway/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-gke-connect-gateway/testing/constraints-3.10.txt b/packages/google-cloud-gke-connect-gateway/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-gke-connect-gateway/testing/constraints-3.10.txt +++ b/packages/google-cloud-gke-connect-gateway/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-gke-connect-gateway/testing/constraints-3.9.txt b/packages/google-cloud-gke-connect-gateway/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-gke-connect-gateway/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1/test_gateway_control.py b/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1/test_gateway_control.py index 90bef8cbeccb..1bf39c8a8336 100644 --- a/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1/test_gateway_control.py +++ b/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1/test_gateway_control.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1268,7 +1262,7 @@ def test_generate_credentials_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_credentials_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1beta1/test_gateway_control.py b/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1beta1/test_gateway_control.py index 4c09b14ecc03..05f96dfa1b6e 100644 --- a/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1beta1/test_gateway_control.py +++ b/packages/google-cloud-gke-connect-gateway/tests/unit/gapic/gateway_v1beta1/test_gateway_control.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1268,7 +1262,7 @@ def test_generate_credentials_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_credentials_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-hub/docs/conf.py b/packages/google-cloud-gke-hub/docs/conf.py index 730740303426..a9dbdebae3e7 100644 --- a/packages/google-cloud-gke-hub/docs/conf.py +++ b/packages/google-cloud-gke-hub/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-gke-hub" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/__init__.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/__init__.py index 9fce24107943..74e2a7e10d9f 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/__init__.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.gke_hub import GkeHubAsyncClient, GkeHubClient from .types.feature import ( @@ -140,28 +134,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gkehub_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py index 8c7b47221023..dd4e91008549 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -961,11 +961,11 @@ async def sample_create_membership(): ) # Make the request - operation = client.create_membership(request=request) + operation = await client.create_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1115,11 +1115,11 @@ async def sample_create_feature(): ) # Make the request - operation = client.create_feature(request=request) + operation = await client.create_feature(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1260,11 +1260,11 @@ async def sample_delete_membership(): ) # Make the request - operation = client.delete_membership(request=request) + operation = await client.delete_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1391,11 +1391,11 @@ async def sample_delete_feature(): ) # Make the request - operation = client.delete_feature(request=request) + operation = await client.delete_feature(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1525,11 +1525,11 @@ async def sample_update_membership(): ) # Make the request - operation = client.update_membership(request=request) + operation = await client.update_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1674,11 +1674,11 @@ async def sample_update_feature(): ) # Make the request - operation = client.update_feature(request=request) + operation = await client.update_feature(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1913,11 +1913,11 @@ async def sample_create_fleet(): ) # Make the request - operation = client.create_fleet(request=request) + operation = await client.create_fleet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2156,11 +2156,11 @@ async def sample_update_fleet(): ) # Make the request - operation = client.update_fleet(request=request) + operation = await client.update_fleet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2293,11 +2293,11 @@ async def sample_delete_fleet(): ) # Make the request - operation = client.delete_fleet(request=request) + operation = await client.delete_fleet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2669,11 +2669,11 @@ async def sample_create_scope_namespace(): ) # Make the request - operation = client.create_scope_namespace(request=request) + operation = await client.create_scope_namespace(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2827,11 +2827,11 @@ async def sample_update_scope_namespace(): ) # Make the request - operation = client.update_scope_namespace(request=request) + operation = await client.update_scope_namespace(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2963,11 +2963,11 @@ async def sample_delete_scope_namespace(): ) # Make the request - operation = client.delete_scope_namespace(request=request) + operation = await client.delete_scope_namespace(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3342,11 +3342,11 @@ async def sample_create_scope_rbac_role_binding(): ) # Make the request - operation = client.create_scope_rbac_role_binding(request=request) + operation = await client.create_scope_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3503,11 +3503,11 @@ async def sample_update_scope_rbac_role_binding(): ) # Make the request - operation = client.update_scope_rbac_role_binding(request=request) + operation = await client.update_scope_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -3643,11 +3643,11 @@ async def sample_delete_scope_rbac_role_binding(): ) # Make the request - operation = client.delete_scope_rbac_role_binding(request=request) + operation = await client.delete_scope_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4015,11 +4015,11 @@ async def sample_create_scope(): ) # Make the request - operation = client.create_scope(request=request) + operation = await client.create_scope(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4157,11 +4157,11 @@ async def sample_update_scope(): ) # Make the request - operation = client.update_scope(request=request) + operation = await client.update_scope(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4293,11 +4293,11 @@ async def sample_delete_scope(): ) # Make the request - operation = client.delete_scope(request=request) + operation = await client.delete_scope(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4798,11 +4798,11 @@ async def sample_create_membership_binding(): ) # Make the request - operation = client.create_membership_binding(request=request) + operation = await client.create_membership_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -4947,11 +4947,11 @@ async def sample_update_membership_binding(): ) # Make the request - operation = client.update_membership_binding(request=request) + operation = await client.update_membership_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5082,11 +5082,11 @@ async def sample_delete_membership_binding(): ) # Make the request - operation = client.delete_membership_binding(request=request) + operation = await client.delete_membership_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5464,11 +5464,11 @@ async def sample_create_membership_rbac_role_binding(): ) # Make the request - operation = client.create_membership_rbac_role_binding(request=request) + operation = await client.create_membership_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5625,11 +5625,11 @@ async def sample_update_membership_rbac_role_binding(): ) # Make the request - operation = client.update_membership_rbac_role_binding(request=request) + operation = await client.update_membership_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -5765,11 +5765,11 @@ async def sample_delete_membership_rbac_role_binding(): ) # Make the request - operation = client.delete_membership_rbac_role_binding(request=request) + operation = await client.delete_membership_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/__init__.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/__init__.py index bc9a9869c507..1089fbd9be79 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/__init__.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.gke_hub_membership_service import ( GkeHubMembershipServiceAsyncClient, @@ -75,28 +69,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gkehub_v1beta1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py index cfd607443c53..9d7752f9d73f 100644 --- a/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py +++ b/packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -610,11 +610,11 @@ async def sample_create_membership(): ) # Make the request - operation = client.create_membership(request=request) + operation = await client.create_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -768,11 +768,11 @@ async def sample_delete_membership(): ) # Make the request - operation = client.delete_membership(request=request) + operation = await client.delete_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -903,11 +903,11 @@ async def sample_update_membership(): ) # Make the request - operation = client.update_membership(request=request) + operation = await client.update_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/noxfile.py b/packages/google-cloud-gke-hub/noxfile.py index cbaad70c79b9..bba68600caad 100644 --- a/packages/google-cloud-gke-hub/noxfile.py +++ b/packages/google-cloud-gke-hub/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py index b877a1683b41..b5f4c21515d9 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_feature_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_create_feature(): request = gkehub_v1.CreateFeatureRequest() # Make the request - operation = client.create_feature(request=request) + operation = await client.create_feature(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_fleet_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_fleet_async.py index c164243015a1..93291b5ae39e 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_fleet_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_fleet_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_fleet(): ) # Make the request - operation = client.create_fleet(request=request) + operation = await client.create_fleet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py index 96c667efc27e..dd1b3426144c 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_membership(): ) # Make the request - operation = client.create_membership(request=request) + operation = await client.create_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_binding_async.py index a4297d0601e3..ab9d8ac6b666 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_membership_binding(): ) # Make the request - operation = client.create_membership_binding(request=request) + operation = await client.create_membership_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_rbac_role_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_rbac_role_binding_async.py index 2f4f857ee8b2..cb77209c1dfd 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_rbac_role_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_rbac_role_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_membership_rbac_role_binding(): ) # Make the request - operation = client.create_membership_rbac_role_binding(request=request) + operation = await client.create_membership_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_async.py index 04c6fe341e03..b1247fdad1bf 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_scope(): ) # Make the request - operation = client.create_scope(request=request) + operation = await client.create_scope(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_namespace_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_namespace_async.py index 298f88658b31..bd8b8da8b81f 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_namespace_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_scope_namespace(): ) # Make the request - operation = client.create_scope_namespace(request=request) + operation = await client.create_scope_namespace(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_rbac_role_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_rbac_role_binding_async.py index 4dc53cb80f54..39aefab6c708 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_rbac_role_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_create_scope_rbac_role_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_create_scope_rbac_role_binding(): ) # Make the request - operation = client.create_scope_rbac_role_binding(request=request) + operation = await client.create_scope_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py index e76f3f7b09bd..8ee66ac0b428 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_feature_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_delete_feature(): request = gkehub_v1.DeleteFeatureRequest() # Make the request - operation = client.delete_feature(request=request) + operation = await client.delete_feature(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_fleet_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_fleet_async.py index 8c28e1e667d8..3fa90812c267 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_fleet_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_fleet_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_fleet(): ) # Make the request - operation = client.delete_fleet(request=request) + operation = await client.delete_fleet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py index 88215ffd98d5..3fc798919e30 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_membership(): ) # Make the request - operation = client.delete_membership(request=request) + operation = await client.delete_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_binding_async.py index 9c2b1c67ddc7..06912db74c39 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_membership_binding(): ) # Make the request - operation = client.delete_membership_binding(request=request) + operation = await client.delete_membership_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_rbac_role_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_rbac_role_binding_async.py index c77a660fccb9..36ef25b0cf0e 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_rbac_role_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_membership_rbac_role_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_membership_rbac_role_binding(): ) # Make the request - operation = client.delete_membership_rbac_role_binding(request=request) + operation = await client.delete_membership_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_async.py index 318b01844035..1b049f7766a3 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_scope(): ) # Make the request - operation = client.delete_scope(request=request) + operation = await client.delete_scope(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_namespace_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_namespace_async.py index bba0f2c568e0..1cbf705da3fb 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_namespace_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_scope_namespace(): ) # Make the request - operation = client.delete_scope_namespace(request=request) + operation = await client.delete_scope_namespace(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_rbac_role_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_rbac_role_binding_async.py index f1f6b6d152fc..dfeba78f071f 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_rbac_role_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_delete_scope_rbac_role_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_scope_rbac_role_binding(): ) # Make the request - operation = client.delete_scope_rbac_role_binding(request=request) + operation = await client.delete_scope_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py index e761d1b93438..e634ff35d800 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_feature_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_feature(): request = gkehub_v1.UpdateFeatureRequest() # Make the request - operation = client.update_feature(request=request) + operation = await client.update_feature(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_fleet_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_fleet_async.py index 5bc3039fcb1c..8296cd60c732 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_fleet_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_fleet_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_fleet(): request = gkehub_v1.UpdateFleetRequest() # Make the request - operation = client.update_fleet(request=request) + operation = await client.update_fleet(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py index 979069578f83..42ed050b18b9 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_update_membership(): ) # Make the request - operation = client.update_membership(request=request) + operation = await client.update_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_binding_async.py index 19ff1c5552f6..21e07612f794 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_membership_binding(): ) # Make the request - operation = client.update_membership_binding(request=request) + operation = await client.update_membership_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_rbac_role_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_rbac_role_binding_async.py index 155c9e99fad1..5a293b892bd1 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_rbac_role_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_membership_rbac_role_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_membership_rbac_role_binding(): ) # Make the request - operation = client.update_membership_rbac_role_binding(request=request) + operation = await client.update_membership_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_async.py index 464a57e7781f..8c2ed86e1ebb 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_scope(): request = gkehub_v1.UpdateScopeRequest() # Make the request - operation = client.update_scope(request=request) + operation = await client.update_scope(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_namespace_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_namespace_async.py index 20e53abc0471..b1c26244a3b5 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_namespace_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_namespace_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_scope_namespace(): ) # Make the request - operation = client.update_scope_namespace(request=request) + operation = await client.update_scope_namespace(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_rbac_role_binding_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_rbac_role_binding_async.py index 271b23f7e0ea..392ec9a5a5dc 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_rbac_role_binding_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1_generated_gke_hub_update_scope_rbac_role_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_update_scope_rbac_role_binding(): ) # Make the request - operation = client.update_scope_rbac_role_binding(request=request) + operation = await client.update_scope_rbac_role_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py index 4214bbd75329..8105e91a6274 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_create_membership_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_membership(): ) # Make the request - operation = client.create_membership(request=request) + operation = await client.create_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py index cf1b4755c4ff..0fc8388fa7ae 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_delete_membership_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_membership(): ) # Make the request - operation = client.delete_membership(request=request) + operation = await client.delete_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py index 3a2fb83c4945..070c791afd35 100644 --- a/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py +++ b/packages/google-cloud-gke-hub/samples/generated_samples/gkehub_v1beta1_generated_gke_hub_membership_service_update_membership_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_update_membership(): ) # Make the request - operation = client.update_membership(request=request) + operation = await client.update_membership(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-hub/setup.py b/packages/google-cloud-gke-hub/setup.py index 9e877055782f..9727979aea36 100644 --- a/packages/google-cloud-gke-hub/setup.py +++ b/packages/google-cloud-gke-hub/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,12 +39,12 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpc-google-iam-v1 >=0.12.4, <1.0.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-gke-hub/testing/constraints-3.10.txt b/packages/google-cloud-gke-hub/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-gke-hub/testing/constraints-3.10.txt +++ b/packages/google-cloud-gke-hub/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-gke-hub/testing/constraints-3.9.txt b/packages/google-cloud-gke-hub/testing/constraints-3.9.txt deleted file mode 100644 index 36c91811afe8..000000000000 --- a/packages/google-cloud-gke-hub/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -grpc-google-iam-v1==0.12.4 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1/test_gke_hub.py b/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1/test_gke_hub.py index e263502b8080..280f38cdf74e 100644 --- a/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1/test_gke_hub.py +++ b/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1/test_gke_hub.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1770,11 +1764,7 @@ async def test_list_memberships_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_memberships(request={}) - ).pages: + async for page_ in (await client.list_memberships(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2322,11 +2312,7 @@ async def test_list_bound_memberships_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_bound_memberships(request={}) - ).pages: + async for page_ in (await client.list_bound_memberships(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2845,11 +2831,7 @@ async def test_list_features_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_features(request={}) - ).pages: + async for page_ in (await client.list_features(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7770,11 +7752,7 @@ async def test_list_fleets_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_fleets(request={}) - ).pages: + async for page_ in (await client.list_fleets(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9727,11 +9705,7 @@ async def test_list_scope_namespaces_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_scope_namespaces(request={}) - ).pages: + async for page_ in (await client.list_scope_namespaces(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -11692,9 +11666,7 @@ async def test_list_scope_rbac_role_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_scope_rbac_role_bindings(request={}) ).pages: pages.append(page_) @@ -13541,11 +13513,7 @@ async def test_list_scopes_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_scopes(request={}) - ).pages: + async for page_ in (await client.list_scopes(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -14087,11 +14055,7 @@ async def test_list_permitted_scopes_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_permitted_scopes(request={}) - ).pages: + async for page_ in (await client.list_permitted_scopes(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -16054,11 +16018,7 @@ async def test_list_membership_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_membership_bindings(request={}) - ).pages: + async for page_ in (await client.list_membership_bindings(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -18024,9 +17984,7 @@ async def test_list_membership_rbac_role_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_membership_rbac_role_bindings(request={}) ).pages: pages.append(page_) @@ -18414,7 +18372,7 @@ def test_list_memberships_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_memberships_rest_unset_required_fields(): @@ -18676,7 +18634,7 @@ def test_list_bound_memberships_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_bound_memberships_rest_unset_required_fields(): @@ -19082,7 +19040,7 @@ def test_get_membership_rest_required_fields(request_type=service.GetMembershipR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_membership_rest_unset_required_fields(): @@ -19379,7 +19337,7 @@ def test_create_membership_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_membership_rest_unset_required_fields(): @@ -19694,7 +19652,7 @@ def test_delete_membership_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_membership_rest_unset_required_fields(): @@ -19986,7 +19944,7 @@ def test_update_membership_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_membership_rest_unset_required_fields(): @@ -20309,7 +20267,7 @@ def test_generate_connect_manifest_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_connect_manifest_rest_unset_required_fields(): @@ -20441,7 +20399,7 @@ def test_create_fleet_rest_required_fields(request_type=service.CreateFleetReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_fleet_rest_unset_required_fields(): @@ -20624,7 +20582,7 @@ def test_get_fleet_rest_required_fields(request_type=service.GetFleetRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_fleet_rest_unset_required_fields(): @@ -20798,7 +20756,7 @@ def test_update_fleet_rest_required_fields(request_type=service.UpdateFleetReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_fleet_rest_unset_required_fields(): @@ -20985,7 +20943,7 @@ def test_delete_fleet_rest_required_fields(request_type=service.DeleteFleetReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_fleet_rest_unset_required_fields(): @@ -21165,7 +21123,7 @@ def test_list_fleets_rest_required_fields(request_type=service.ListFleetsRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_fleets_rest_unset_required_fields(): @@ -21415,7 +21373,7 @@ def test_get_scope_namespace_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_scope_namespace_rest_unset_required_fields(): @@ -21617,7 +21575,7 @@ def test_create_scope_namespace_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_scope_namespace_rest_unset_required_fields(): @@ -21810,7 +21768,7 @@ def test_update_scope_namespace_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_scope_namespace_rest_unset_required_fields(): @@ -22006,7 +21964,7 @@ def test_delete_scope_namespace_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_scope_namespace_rest_unset_required_fields(): @@ -22196,7 +22154,7 @@ def test_list_scope_namespaces_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_scope_namespaces_rest_unset_required_fields(): @@ -22450,7 +22408,7 @@ def test_get_scope_rbac_role_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_scope_rbac_role_binding_rest_unset_required_fields(): @@ -22652,7 +22610,7 @@ def test_create_scope_rbac_role_binding_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_scope_rbac_role_binding_rest_unset_required_fields(): @@ -22847,7 +22805,7 @@ def test_update_scope_rbac_role_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_scope_rbac_role_binding_rest_unset_required_fields(): @@ -23045,7 +23003,7 @@ def test_delete_scope_rbac_role_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_scope_rbac_role_binding_rest_unset_required_fields(): @@ -23237,7 +23195,7 @@ def test_list_scope_rbac_role_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_scope_rbac_role_bindings_rest_unset_required_fields(): @@ -23486,7 +23444,7 @@ def test_get_scope_rest_required_fields(request_type=service.GetScopeRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_scope_rest_unset_required_fields(): @@ -23678,7 +23636,7 @@ def test_create_scope_rest_required_fields(request_type=service.CreateScopeReque ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_scope_rest_unset_required_fields(): @@ -23863,7 +23821,7 @@ def test_update_scope_rest_required_fields(request_type=service.UpdateScopeReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_scope_rest_unset_required_fields(): @@ -24050,7 +24008,7 @@ def test_delete_scope_rest_required_fields(request_type=service.DeleteScopeReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_scope_rest_unset_required_fields(): @@ -24230,7 +24188,7 @@ def test_list_scopes_rest_required_fields(request_type=service.ListScopesRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_scopes_rest_unset_required_fields(): @@ -24488,7 +24446,7 @@ def test_list_permitted_scopes_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_permitted_scopes_rest_unset_required_fields(): @@ -24742,7 +24700,7 @@ def test_get_membership_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_membership_binding_rest_unset_required_fields(): @@ -24947,7 +24905,7 @@ def test_create_membership_binding_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_membership_binding_rest_unset_required_fields(): @@ -25142,7 +25100,7 @@ def test_update_membership_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_membership_binding_rest_unset_required_fields(): @@ -25338,7 +25296,7 @@ def test_delete_membership_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_membership_binding_rest_unset_required_fields(): @@ -25529,7 +25487,7 @@ def test_list_membership_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_membership_bindings_rest_unset_required_fields(): @@ -25788,7 +25746,7 @@ def test_get_membership_rbac_role_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_membership_rbac_role_binding_rest_unset_required_fields(): @@ -25992,7 +25950,7 @@ def test_create_membership_rbac_role_binding_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_membership_rbac_role_binding_rest_unset_required_fields(): @@ -26191,7 +26149,7 @@ def test_update_membership_rbac_role_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_membership_rbac_role_binding_rest_unset_required_fields(): @@ -26391,7 +26349,7 @@ def test_delete_membership_rbac_role_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_membership_rbac_role_binding_rest_unset_required_fields(): @@ -26587,7 +26545,7 @@ def test_list_membership_rbac_role_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_membership_rbac_role_bindings_rest_unset_required_fields(): @@ -26873,7 +26831,7 @@ def test_generate_membership_rbac_role_binding_yaml_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_membership_rbac_role_binding_yaml_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1beta1/test_gke_hub_membership_service.py b/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1beta1/test_gke_hub_membership_service.py index 05e78d4eb8f3..852e6a148352 100644 --- a/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1beta1/test_gke_hub_membership_service.py +++ b/packages/google-cloud-gke-hub/tests/unit/gapic/gkehub_v1beta1/test_gke_hub_membership_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1913,11 +1907,7 @@ async def test_list_memberships_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_memberships(request={}) - ).pages: + async for page_ in (await client.list_memberships(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4235,7 +4225,7 @@ def test_list_memberships_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_memberships_rest_unset_required_fields(): @@ -4486,7 +4476,7 @@ def test_get_membership_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_membership_rest_unset_required_fields(): @@ -4690,7 +4680,7 @@ def test_create_membership_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_membership_rest_unset_required_fields(): @@ -4894,7 +4884,7 @@ def test_delete_membership_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_membership_rest_unset_required_fields(): @@ -5091,7 +5081,7 @@ def test_update_membership_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_membership_rest_unset_required_fields(): @@ -5302,7 +5292,7 @@ def test_generate_connect_manifest_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_connect_manifest_rest_unset_required_fields(): @@ -5459,7 +5449,7 @@ def test_validate_exclusivity_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_validate_exclusivity_rest_unset_required_fields(): @@ -5606,7 +5596,7 @@ def test_generate_exclusivity_manifest_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_exclusivity_manifest_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-multicloud/docs/conf.py b/packages/google-cloud-gke-multicloud/docs/conf.py index ecf0198e4529..b833d72552eb 100644 --- a/packages/google-cloud-gke-multicloud/docs/conf.py +++ b/packages/google-cloud-gke-multicloud/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-gke-multicloud" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/__init__.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/__init__.py index 6b8a3fcdaf1c..4e08b4266842 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/__init__.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.attached_clusters import ( AttachedClustersAsyncClient, @@ -194,28 +188,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gke_multicloud_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py index 3a888bb15358..6d22aa6381c0 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/attached_clusters/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -369,11 +369,11 @@ async def sample_create_attached_cluster(): ) # Make the request - operation = client.create_attached_cluster(request=request) + operation = await client.create_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -540,11 +540,11 @@ async def sample_update_attached_cluster(): ) # Make the request - operation = client.update_attached_cluster(request=request) + operation = await client.update_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -709,11 +709,11 @@ async def sample_import_attached_cluster(): ) # Make the request - operation = client.import_attached_cluster(request=request) + operation = await client.import_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1125,11 +1125,11 @@ async def sample_delete_attached_cluster(): ) # Make the request - operation = client.delete_attached_cluster(request=request) + operation = await client.delete_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py index 282e40f89d59..f17159da8b11 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/aws_clusters/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -368,11 +368,11 @@ async def sample_create_aws_cluster(): ) # Make the request - operation = client.create_aws_cluster(request=request) + operation = await client.create_aws_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -549,11 +549,11 @@ async def sample_update_aws_cluster(): ) # Make the request - operation = client.update_aws_cluster(request=request) + operation = await client.update_aws_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -994,11 +994,11 @@ async def sample_delete_aws_cluster(): ) # Make the request - operation = client.delete_aws_cluster(request=request) + operation = await client.delete_aws_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1352,11 +1352,11 @@ async def sample_create_aws_node_pool(): ) # Make the request - operation = client.create_aws_node_pool(request=request) + operation = await client.create_aws_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1529,11 +1529,11 @@ async def sample_update_aws_node_pool(): ) # Make the request - operation = client.update_aws_node_pool(request=request) + operation = await client.update_aws_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1712,11 +1712,11 @@ async def sample_rollback_aws_node_pool_update(): ) # Make the request - operation = client.rollback_aws_node_pool_update(request=request) + operation = await client.rollback_aws_node_pool_update(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2123,11 +2123,11 @@ async def sample_delete_aws_node_pool(): ) # Make the request - operation = client.delete_aws_node_pool(request=request) + operation = await client.delete_aws_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py index d1e413312147..66dad8e8eb2e 100644 --- a/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py +++ b/packages/google-cloud-gke-multicloud/google/cloud/gke_multicloud_v1/services/azure_clusters/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -375,11 +375,11 @@ async def sample_create_azure_client(): ) # Make the request - operation = client.create_azure_client(request=request) + operation = await client.create_azure_client(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -847,11 +847,11 @@ async def sample_delete_azure_client(): ) # Make the request - operation = client.delete_azure_client(request=request) + operation = await client.delete_azure_client(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1014,11 +1014,11 @@ async def sample_create_azure_cluster(): ) # Make the request - operation = client.create_azure_cluster(request=request) + operation = await client.create_azure_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1192,11 +1192,11 @@ async def sample_update_azure_cluster(): ) # Make the request - operation = client.update_azure_cluster(request=request) + operation = await client.update_azure_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1633,11 +1633,11 @@ async def sample_delete_azure_cluster(): ) # Make the request - operation = client.delete_azure_cluster(request=request) + operation = await client.delete_azure_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -1991,11 +1991,11 @@ async def sample_create_azure_node_pool(): ) # Make the request - operation = client.create_azure_node_pool(request=request) + operation = await client.create_azure_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2167,11 +2167,11 @@ async def sample_update_azure_node_pool(): ) # Make the request - operation = client.update_azure_node_pool(request=request) + operation = await client.update_azure_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -2594,11 +2594,11 @@ async def sample_delete_azure_node_pool(): ) # Make the request - operation = client.delete_azure_node_pool(request=request) + operation = await client.delete_azure_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/noxfile.py b/packages/google-cloud-gke-multicloud/noxfile.py index 7c6ae85a027b..03f59c931e55 100644 --- a/packages/google-cloud-gke-multicloud/noxfile.py +++ b/packages/google-cloud-gke-multicloud/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py index e61c1f78d076..f36e1d58735b 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_create_attached_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -51,11 +51,11 @@ async def sample_create_attached_cluster(): ) # Make the request - operation = client.create_attached_cluster(request=request) + operation = await client.create_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py index 9bd6f6d3f181..1c1793f14686 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_delete_attached_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_attached_cluster(): ) # Make the request - operation = client.delete_attached_cluster(request=request) + operation = await client.delete_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py index 5e1176406e2a..630112500916 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_import_attached_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ async def sample_import_attached_cluster(): ) # Make the request - operation = client.import_attached_cluster(request=request) + operation = await client.import_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py index a158043ffed1..9ffd90b603e9 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_attached_clusters_update_attached_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -49,11 +49,11 @@ async def sample_update_attached_cluster(): ) # Make the request - operation = client.update_attached_cluster(request=request) + operation = await client.update_attached_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py index 6787a5b92afb..05e35432e505 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -65,11 +65,11 @@ async def sample_create_aws_cluster(): ) # Make the request - operation = client.create_aws_cluster(request=request) + operation = await client.create_aws_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py index 04afff93470b..ad7ebb7c3519 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_create_aws_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -55,11 +55,11 @@ async def sample_create_aws_node_pool(): ) # Make the request - operation = client.create_aws_node_pool(request=request) + operation = await client.create_aws_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py index b412cb1417b9..cfbcdfa9de94 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_aws_cluster(): ) # Make the request - operation = client.delete_aws_cluster(request=request) + operation = await client.delete_aws_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py index 3f6396ea1dd4..6d73a2088119 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_delete_aws_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_aws_node_pool(): ) # Make the request - operation = client.delete_aws_node_pool(request=request) + operation = await client.delete_aws_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_rollback_aws_node_pool_update_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_rollback_aws_node_pool_update_async.py index d9b6beb754c6..cf63589babbb 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_rollback_aws_node_pool_update_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_rollback_aws_node_pool_update_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_rollback_aws_node_pool_update(): ) # Make the request - operation = client.rollback_aws_node_pool_update(request=request) + operation = await client.rollback_aws_node_pool_update(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py index ab1d48f6944c..faf320bfcc67 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -63,11 +63,11 @@ async def sample_update_aws_cluster(): ) # Make the request - operation = client.update_aws_cluster(request=request) + operation = await client.update_aws_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py index 00542603666e..218a30f016f1 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_aws_clusters_update_aws_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -53,11 +53,11 @@ async def sample_update_aws_node_pool(): ) # Make the request - operation = client.update_aws_node_pool(request=request) + operation = await client.update_aws_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py index e636e7412338..85dd008d2ca5 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_client_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_azure_client(): ) # Make the request - operation = client.create_azure_client(request=request) + operation = await client.create_azure_client(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py index 4c4b15903494..a3a6214642e7 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -62,11 +62,11 @@ async def sample_create_azure_cluster(): ) # Make the request - operation = client.create_azure_cluster(request=request) + operation = await client.create_azure_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py index cefc7de1c661..40f8ebedc63e 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_create_azure_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -54,11 +54,11 @@ async def sample_create_azure_node_pool(): ) # Make the request - operation = client.create_azure_node_pool(request=request) + operation = await client.create_azure_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py index ec1d6581c819..0e0f10b54fe7 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_client_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_azure_client(): ) # Make the request - operation = client.delete_azure_client(request=request) + operation = await client.delete_azure_client(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py index 525df468fb21..7ea2a1a4d445 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_azure_cluster(): ) # Make the request - operation = client.delete_azure_cluster(request=request) + operation = await client.delete_azure_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py index 727f6edb34b4..a6f6aa749328 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_delete_azure_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_azure_node_pool(): ) # Make the request - operation = client.delete_azure_node_pool(request=request) + operation = await client.delete_azure_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py index 4ce8bdfa3aa9..1003e1213dea 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -60,11 +60,11 @@ async def sample_update_azure_cluster(): ) # Make the request - operation = client.update_azure_cluster(request=request) + operation = await client.update_azure_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py index 835f8bf99faf..e0e1893d1360 100644 --- a/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py +++ b/packages/google-cloud-gke-multicloud/samples/generated_samples/gkemulticloud_v1_generated_azure_clusters_update_azure_node_pool_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -52,11 +52,11 @@ async def sample_update_azure_node_pool(): ) # Make the request - operation = client.update_azure_node_pool(request=request) + operation = await client.update_azure_node_pool(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-gke-multicloud/setup.py b/packages/google-cloud-gke-multicloud/setup.py index 881023327634..5e4265260623 100644 --- a/packages/google-cloud-gke-multicloud/setup.py +++ b/packages/google-cloud-gke-multicloud/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-gke-multicloud/testing/constraints-3.10.txt b/packages/google-cloud-gke-multicloud/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-gke-multicloud/testing/constraints-3.10.txt +++ b/packages/google-cloud-gke-multicloud/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-gke-multicloud/testing/constraints-3.9.txt b/packages/google-cloud-gke-multicloud/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-gke-multicloud/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py index 38c3a6d100e2..49bdf429e7df 100644 --- a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py +++ b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_attached_clusters.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3355,11 +3349,7 @@ async def test_list_attached_clusters_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_attached_clusters(request={}) - ).pages: + async for page_ in (await client.list_attached_clusters(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4849,7 +4839,7 @@ def test_create_attached_cluster_rest_required_fields( ), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_attached_cluster_rest_unset_required_fields(): @@ -5052,7 +5042,7 @@ def test_update_attached_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_attached_cluster_rest_unset_required_fields(): @@ -5266,7 +5256,7 @@ def test_import_attached_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_import_attached_cluster_rest_unset_required_fields(): @@ -5458,7 +5448,7 @@ def test_get_attached_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_attached_cluster_rest_unset_required_fields(): @@ -5652,7 +5642,7 @@ def test_list_attached_clusters_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_attached_clusters_rest_unset_required_fields(): @@ -5916,7 +5906,7 @@ def test_delete_attached_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_attached_cluster_rest_unset_required_fields(): @@ -6109,7 +6099,7 @@ def test_get_attached_server_config_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_attached_server_config_rest_unset_required_fields(): @@ -6333,7 +6323,7 @@ def test_generate_attached_cluster_install_manifest_rest_required_fields( ), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_attached_cluster_install_manifest_rest_unset_required_fields(): @@ -6564,7 +6554,7 @@ def test_generate_attached_cluster_agent_token_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_attached_cluster_agent_token_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py index a7c3ef3a03d9..a39cf56ebc75 100644 --- a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py +++ b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_aws_clusters.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2893,11 +2887,7 @@ async def test_list_aws_clusters_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_aws_clusters(request={}) - ).pages: + async for page_ in (await client.list_aws_clusters(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5753,11 +5743,7 @@ async def test_list_aws_node_pools_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_aws_node_pools(request={}) - ).pages: + async for page_ in (await client.list_aws_node_pools(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7127,7 +7113,7 @@ def test_create_aws_cluster_rest_required_fields( ), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_aws_cluster_rest_unset_required_fields(): @@ -7329,7 +7315,7 @@ def test_update_aws_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_aws_cluster_rest_unset_required_fields(): @@ -7524,7 +7510,7 @@ def test_get_aws_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_aws_cluster_rest_unset_required_fields(): @@ -7713,7 +7699,7 @@ def test_list_aws_clusters_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_aws_clusters_rest_unset_required_fields(): @@ -7976,7 +7962,7 @@ def test_delete_aws_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_aws_cluster_rest_unset_required_fields(): @@ -8184,7 +8170,7 @@ def test_generate_aws_cluster_agent_token_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_aws_cluster_agent_token_rest_unset_required_fields(): @@ -8321,7 +8307,7 @@ def test_generate_aws_access_token_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_aws_access_token_rest_unset_required_fields(): @@ -8466,7 +8452,7 @@ def test_create_aws_node_pool_rest_required_fields( ), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_aws_node_pool_rest_unset_required_fields(): @@ -8670,7 +8656,7 @@ def test_update_aws_node_pool_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_aws_node_pool_rest_unset_required_fields(): @@ -8872,7 +8858,7 @@ def test_rollback_aws_node_pool_update_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_rollback_aws_node_pool_update_rest_unset_required_fields(): @@ -9054,7 +9040,7 @@ def test_get_aws_node_pool_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_aws_node_pool_rest_unset_required_fields(): @@ -9245,7 +9231,7 @@ def test_list_aws_node_pools_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_aws_node_pools_rest_unset_required_fields(): @@ -9512,7 +9498,7 @@ def test_delete_aws_node_pool_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_aws_node_pool_rest_unset_required_fields(): @@ -9705,7 +9691,7 @@ def test_get_aws_open_id_config_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_aws_open_id_config_rest_unset_required_fields(): @@ -9830,7 +9816,7 @@ def test_get_aws_json_web_keys_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_aws_json_web_keys_rest_unset_required_fields(): @@ -9955,7 +9941,7 @@ def test_get_aws_server_config_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_aws_server_config_rest_unset_required_fields(): diff --git a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py index 696650c64980..f2a4dea41800 100644 --- a/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py +++ b/packages/google-cloud-gke-multicloud/tests/unit/gapic/gke_multicloud_v1/test_azure_clusters.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2568,11 +2562,7 @@ async def test_list_azure_clients_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_azure_clients(request={}) - ).pages: + async for page_ in (await client.list_azure_clients(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4557,11 +4547,7 @@ async def test_list_azure_clusters_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_azure_clusters(request={}) - ).pages: + async for page_ in (await client.list_azure_clusters(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -7083,11 +7069,7 @@ async def test_list_azure_node_pools_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_azure_node_pools(request={}) - ).pages: + async for page_ in (await client.list_azure_node_pools(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8634,7 +8616,7 @@ def test_create_azure_client_rest_required_fields( ), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_azure_client_rest_unset_required_fields(): @@ -8830,7 +8812,7 @@ def test_get_azure_client_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_azure_client_rest_unset_required_fields(): @@ -9021,7 +9003,7 @@ def test_list_azure_clients_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_azure_clients_rest_unset_required_fields(): @@ -9282,7 +9264,7 @@ def test_delete_azure_client_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_azure_client_rest_unset_required_fields(): @@ -9493,7 +9475,7 @@ def test_create_azure_cluster_rest_required_fields( ), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_azure_cluster_rest_unset_required_fields(): @@ -9695,7 +9677,7 @@ def test_update_azure_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_azure_cluster_rest_unset_required_fields(): @@ -9892,7 +9874,7 @@ def test_get_azure_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_azure_cluster_rest_unset_required_fields(): @@ -10083,7 +10065,7 @@ def test_list_azure_clusters_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_azure_clusters_rest_unset_required_fields(): @@ -10346,7 +10328,7 @@ def test_delete_azure_cluster_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_azure_cluster_rest_unset_required_fields(): @@ -10554,7 +10536,7 @@ def test_generate_azure_cluster_agent_token_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_azure_cluster_agent_token_rest_unset_required_fields(): @@ -10693,7 +10675,7 @@ def test_generate_azure_access_token_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_azure_access_token_rest_unset_required_fields(): @@ -10839,7 +10821,7 @@ def test_create_azure_node_pool_rest_required_fields( ), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_azure_node_pool_rest_unset_required_fields(): @@ -11044,7 +11026,7 @@ def test_update_azure_node_pool_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_azure_node_pool_rest_unset_required_fields(): @@ -11243,7 +11225,7 @@ def test_get_azure_node_pool_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_azure_node_pool_rest_unset_required_fields(): @@ -11435,7 +11417,7 @@ def test_list_azure_node_pools_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_azure_node_pools_rest_unset_required_fields(): @@ -11703,7 +11685,7 @@ def test_delete_azure_node_pool_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_azure_node_pool_rest_unset_required_fields(): @@ -11896,7 +11878,7 @@ def test_get_azure_open_id_config_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_azure_open_id_config_rest_unset_required_fields(): @@ -12081,7 +12063,7 @@ def test_get_azure_json_web_keys_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_azure_json_web_keys_rest_unset_required_fields(): @@ -12266,7 +12248,7 @@ def test_get_azure_server_config_rest_required_fields( expected_params = [] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_azure_server_config_rest_unset_required_fields(): diff --git a/packages/google-cloud-gkerecommender/docs/conf.py b/packages/google-cloud-gkerecommender/docs/conf.py index 423e047940c3..072cc0862c83 100644 --- a/packages/google-cloud-gkerecommender/docs/conf.py +++ b/packages/google-cloud-gkerecommender/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-gkerecommender" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-gkerecommender/google/cloud/gkerecommender_v1/__init__.py b/packages/google-cloud-gkerecommender/google/cloud/gkerecommender_v1/__init__.py index 3f9797621309..f65b5153e1ba 100644 --- a/packages/google-cloud-gkerecommender/google/cloud/gkerecommender_v1/__init__.py +++ b/packages/google-cloud-gkerecommender/google/cloud/gkerecommender_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.gke_inference_quickstart import ( GkeInferenceQuickstartAsyncClient, @@ -69,28 +63,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gkerecommender_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gkerecommender/noxfile.py b/packages/google-cloud-gkerecommender/noxfile.py index 71f24501c176..ee8604045e30 100644 --- a/packages/google-cloud-gkerecommender/noxfile.py +++ b/packages/google-cloud-gkerecommender/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-gkerecommender/setup.py b/packages/google-cloud-gkerecommender/setup.py index 8e2b9f0e0979..017454eb8797 100644 --- a/packages/google-cloud-gkerecommender/setup.py +++ b/packages/google-cloud-gkerecommender/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-gkerecommender/testing/constraints-3.10.txt b/packages/google-cloud-gkerecommender/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-gkerecommender/testing/constraints-3.10.txt +++ b/packages/google-cloud-gkerecommender/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-gkerecommender/testing/constraints-3.9.txt b/packages/google-cloud-gkerecommender/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-gkerecommender/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-gkerecommender/tests/unit/gapic/gkerecommender_v1/test_gke_inference_quickstart.py b/packages/google-cloud-gkerecommender/tests/unit/gapic/gkerecommender_v1/test_gke_inference_quickstart.py index 33006363d3dd..8c79b18e1d8d 100644 --- a/packages/google-cloud-gkerecommender/tests/unit/gapic/gkerecommender_v1/test_gke_inference_quickstart.py +++ b/packages/google-cloud-gkerecommender/tests/unit/gapic/gkerecommender_v1/test_gke_inference_quickstart.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1744,11 +1738,7 @@ async def test_fetch_models_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.fetch_models(request={}) - ).pages: + async for page_ in (await client.fetch_models(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2140,11 +2130,7 @@ async def test_fetch_model_servers_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.fetch_model_servers(request={}) - ).pages: + async for page_ in (await client.fetch_model_servers(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2541,11 +2527,7 @@ async def test_fetch_model_server_versions_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.fetch_model_server_versions(request={}) - ).pages: + async for page_ in (await client.fetch_model_server_versions(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2922,11 +2904,7 @@ async def test_fetch_profiles_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.fetch_profiles(request={}) - ).pages: + async for page_ in (await client.fetch_profiles(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3546,7 +3524,7 @@ def test_fetch_model_servers_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_fetch_model_servers_rest_unset_required_fields(): @@ -3774,7 +3752,7 @@ def test_fetch_model_server_versions_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_fetch_model_server_versions_rest_unset_required_fields(): @@ -4079,7 +4057,7 @@ def test_generate_optimized_manifest_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_optimized_manifest_rest_unset_required_fields(): @@ -4208,7 +4186,7 @@ def test_fetch_benchmarking_data_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_fetch_benchmarking_data_rest_unset_required_fields(): diff --git a/packages/google-cloud-gsuiteaddons/docs/conf.py b/packages/google-cloud-gsuiteaddons/docs/conf.py index 8729020a2316..d735404f64e4 100644 --- a/packages/google-cloud-gsuiteaddons/docs/conf.py +++ b/packages/google-cloud-gsuiteaddons/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-gsuiteaddons" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-gsuiteaddons/google/cloud/gsuiteaddons_v1/__init__.py b/packages/google-cloud-gsuiteaddons/google/cloud/gsuiteaddons_v1/__init__.py index 74896d6dd80e..423ed12593a9 100644 --- a/packages/google-cloud-gsuiteaddons/google/cloud/gsuiteaddons_v1/__init__.py +++ b/packages/google-cloud-gsuiteaddons/google/cloud/gsuiteaddons_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.g_suite_add_ons import GSuiteAddOnsAsyncClient, GSuiteAddOnsClient from .types.gsuiteaddons import ( @@ -56,28 +50,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.gsuiteaddons_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-gsuiteaddons/noxfile.py b/packages/google-cloud-gsuiteaddons/noxfile.py index 30efc29dd192..9e0add69a61e 100644 --- a/packages/google-cloud-gsuiteaddons/noxfile.py +++ b/packages/google-cloud-gsuiteaddons/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-gsuiteaddons/setup.py b/packages/google-cloud-gsuiteaddons/setup.py index b8fe9484984a..868d9f66b004 100644 --- a/packages/google-cloud-gsuiteaddons/setup.py +++ b/packages/google-cloud-gsuiteaddons/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -74,7 +74,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -82,7 +82,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -93,7 +92,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-gsuiteaddons/testing/constraints-3.10.txt b/packages/google-cloud-gsuiteaddons/testing/constraints-3.10.txt index ffb95b6193b0..ce2dbec8cfeb 100644 --- a/packages/google-cloud-gsuiteaddons/testing/constraints-3.10.txt +++ b/packages/google-cloud-gsuiteaddons/testing/constraints-3.10.txt @@ -1,11 +1,12 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography -google-apps-script-type +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 +google-apps-script-type==0.2.0 diff --git a/packages/google-cloud-gsuiteaddons/testing/constraints-3.9.txt b/packages/google-cloud-gsuiteaddons/testing/constraints-3.9.txt deleted file mode 100644 index b84195e269ac..000000000000 --- a/packages/google-cloud-gsuiteaddons/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 -google-apps-script-type==0.2.0 diff --git a/packages/google-cloud-gsuiteaddons/tests/unit/gapic/gsuiteaddons_v1/test_g_suite_add_ons.py b/packages/google-cloud-gsuiteaddons/tests/unit/gapic/gsuiteaddons_v1/test_g_suite_add_ons.py index 8774ddf10696..d9376895b2e9 100644 --- a/packages/google-cloud-gsuiteaddons/tests/unit/gapic/gsuiteaddons_v1/test_g_suite_add_ons.py +++ b/packages/google-cloud-gsuiteaddons/tests/unit/gapic/gsuiteaddons_v1/test_g_suite_add_ons.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3206,11 +3200,7 @@ async def test_list_deployments_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_deployments(request={}) - ).pages: + async for page_ in (await client.list_deployments(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -4655,7 +4645,7 @@ def test_get_authorization_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_authorization_rest_unset_required_fields(): @@ -4849,7 +4839,7 @@ def test_create_deployment_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_deployment_rest_unset_required_fields(): @@ -5038,7 +5028,7 @@ def test_replace_deployment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_replace_deployment_rest_unset_required_fields(): @@ -5217,7 +5207,7 @@ def test_get_deployment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_deployment_rest_unset_required_fields(): @@ -5402,7 +5392,7 @@ def test_list_deployments_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_deployments_rest_unset_required_fields(): @@ -5650,7 +5640,7 @@ def test_delete_deployment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_deployment_rest_unset_required_fields(): @@ -5826,7 +5816,7 @@ def test_install_deployment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_install_deployment_rest_unset_required_fields(): @@ -6003,7 +5993,7 @@ def test_uninstall_deployment_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_uninstall_deployment_rest_unset_required_fields(): @@ -6182,7 +6172,7 @@ def test_get_install_status_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_install_status_rest_unset_required_fields(): diff --git a/packages/google-cloud-hypercomputecluster/docs/conf.py b/packages/google-cloud-hypercomputecluster/docs/conf.py index a78531fba8fe..ca1c086c0128 100644 --- a/packages/google-cloud-hypercomputecluster/docs/conf.py +++ b/packages/google-cloud-hypercomputecluster/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-hypercomputecluster" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/__init__.py b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/__init__.py index 220fdd595f06..74df1d167008 100644 --- a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/__init__.py +++ b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.hypercompute_cluster import ( HypercomputeClusterAsyncClient, @@ -114,28 +108,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.hypercomputecluster_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/services/hypercompute_cluster/async_client.py b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/services/hypercompute_cluster/async_client.py index 9fb48433d089..ed18210253db 100644 --- a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/services/hypercompute_cluster/async_client.py +++ b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1/services/hypercompute_cluster/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -621,11 +621,11 @@ async def sample_create_cluster(): ) # Make the request - operation = client.create_cluster(request=request) + operation = await client.create_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -773,11 +773,11 @@ async def sample_update_cluster(): ) # Make the request - operation = client.update_cluster(request=request) + operation = await client.update_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -919,11 +919,11 @@ async def sample_delete_cluster(): ) # Make the request - operation = client.delete_cluster(request=request) + operation = await client.delete_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/__init__.py b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/__init__.py index 1146c7e968b0..8c063839fb57 100644 --- a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/__init__.py +++ b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.hypercompute_cluster import ( HypercomputeClusterAsyncClient, @@ -87,28 +81,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.hypercomputecluster_v1beta" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/services/hypercompute_cluster/async_client.py b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/services/hypercompute_cluster/async_client.py index 3fe0f0cc7d4e..6584569c2c39 100644 --- a/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/services/hypercompute_cluster/async_client.py +++ b/packages/google-cloud-hypercomputecluster/google/cloud/hypercomputecluster_v1beta/services/hypercompute_cluster/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -623,11 +623,11 @@ async def sample_create_cluster(): ) # Make the request - operation = client.create_cluster(request=request) + operation = await client.create_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -775,11 +775,11 @@ async def sample_update_cluster(): ) # Make the request - operation = client.update_cluster(request=request) + operation = await client.update_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -921,11 +921,11 @@ async def sample_delete_cluster(): ) # Make the request - operation = client.delete_cluster(request=request) + operation = await client.delete_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/noxfile.py b/packages/google-cloud-hypercomputecluster/noxfile.py index 5a05ab3c52ab..86a418846a32 100644 --- a/packages/google-cloud-hypercomputecluster/noxfile.py +++ b/packages/google-cloud-hypercomputecluster/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_create_cluster_async.py b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_create_cluster_async.py index b70c140fea3d..ccf2f4ff2258 100644 --- a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_create_cluster_async.py +++ b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_create_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_cluster(): ) # Make the request - operation = client.create_cluster(request=request) + operation = await client.create_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_delete_cluster_async.py b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_delete_cluster_async.py index a73cf4953c4c..0c9a380c006a 100644 --- a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_delete_cluster_async.py +++ b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_delete_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_cluster(): ) # Make the request - operation = client.delete_cluster(request=request) + operation = await client.delete_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_update_cluster_async.py b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_update_cluster_async.py index 51a237cca1f3..63171ede31d0 100644 --- a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_update_cluster_async.py +++ b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1_generated_hypercompute_cluster_update_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_cluster(): request = hypercomputecluster_v1.UpdateClusterRequest() # Make the request - operation = client.update_cluster(request=request) + operation = await client.update_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_create_cluster_async.py b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_create_cluster_async.py index 7c072d70cbd4..bab08ef19a1a 100644 --- a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_create_cluster_async.py +++ b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_create_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_cluster(): ) # Make the request - operation = client.create_cluster(request=request) + operation = await client.create_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_delete_cluster_async.py b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_delete_cluster_async.py index 633b3831a9b5..176fc384deb9 100644 --- a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_delete_cluster_async.py +++ b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_delete_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_cluster(): ) # Make the request - operation = client.delete_cluster(request=request) + operation = await client.delete_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_update_cluster_async.py b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_update_cluster_async.py index 1623f6a832af..2684733f4de6 100644 --- a/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_update_cluster_async.py +++ b/packages/google-cloud-hypercomputecluster/samples/generated_samples/hypercomputecluster_v1beta_generated_hypercompute_cluster_update_cluster_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_cluster(): request = hypercomputecluster_v1beta.UpdateClusterRequest() # Make the request - operation = client.update_cluster(request=request) + operation = await client.update_cluster(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-hypercomputecluster/setup.py b/packages/google-cloud-hypercomputecluster/setup.py index 23dfeadbdb18..94c1e017df67 100644 --- a/packages/google-cloud-hypercomputecluster/setup.py +++ b/packages/google-cloud-hypercomputecluster/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-hypercomputecluster/testing/constraints-3.10.txt b/packages/google-cloud-hypercomputecluster/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-hypercomputecluster/testing/constraints-3.10.txt +++ b/packages/google-cloud-hypercomputecluster/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-hypercomputecluster/testing/constraints-3.9.txt b/packages/google-cloud-hypercomputecluster/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-hypercomputecluster/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1/test_hypercompute_cluster.py b/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1/test_hypercompute_cluster.py index 10d5f348a4ab..4acae63e8373 100644 --- a/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1/test_hypercompute_cluster.py +++ b/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1/test_hypercompute_cluster.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1904,11 +1898,7 @@ async def test_list_clusters_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_clusters(request={}) - ).pages: + async for page_ in (await client.list_clusters(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3374,7 +3364,7 @@ def test_list_clusters_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_clusters_rest_unset_required_fields(): @@ -3624,7 +3614,7 @@ def test_get_cluster_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_cluster_rest_unset_required_fields(): @@ -3823,7 +3813,7 @@ def test_create_cluster_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_cluster_rest_unset_required_fields(): @@ -4020,7 +4010,7 @@ def test_update_cluster_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_cluster_rest_unset_required_fields(): @@ -4211,7 +4201,7 @@ def test_delete_cluster_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_cluster_rest_unset_required_fields(): diff --git a/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1beta/test_hypercompute_cluster.py b/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1beta/test_hypercompute_cluster.py index cd3be4429e24..bfe5c96674ff 100644 --- a/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1beta/test_hypercompute_cluster.py +++ b/packages/google-cloud-hypercomputecluster/tests/unit/gapic/hypercomputecluster_v1beta/test_hypercompute_cluster.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1904,11 +1898,7 @@ async def test_list_clusters_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_clusters(request={}) - ).pages: + async for page_ in (await client.list_clusters(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3374,7 +3364,7 @@ def test_list_clusters_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_clusters_rest_unset_required_fields(): @@ -3625,7 +3615,7 @@ def test_get_cluster_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_cluster_rest_unset_required_fields(): @@ -3825,7 +3815,7 @@ def test_create_cluster_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_cluster_rest_unset_required_fields(): @@ -4023,7 +4013,7 @@ def test_update_cluster_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_cluster_rest_unset_required_fields(): @@ -4214,7 +4204,7 @@ def test_delete_cluster_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_cluster_rest_unset_required_fields(): diff --git a/packages/google-cloud-iam-logging/docs/conf.py b/packages/google-cloud-iam-logging/docs/conf.py index beca16a4e716..97e1a163857d 100644 --- a/packages/google-cloud-iam-logging/docs/conf.py +++ b/packages/google-cloud-iam-logging/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-iam-logging" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-iam-logging/google/cloud/iam_logging_v1/__init__.py b/packages/google-cloud-iam-logging/google/cloud/iam_logging_v1/__init__.py index 55b5a79ed152..a80d18dda2d8 100644 --- a/packages/google-cloud-iam-logging/google/cloud/iam_logging_v1/__init__.py +++ b/packages/google-cloud-iam-logging/google/cloud/iam_logging_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .types.audit_data import AuditData @@ -40,28 +34,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iam_logging_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iam-logging/noxfile.py b/packages/google-cloud-iam-logging/noxfile.py index 396f3fb8f2e0..c17f6c7f882a 100644 --- a/packages/google-cloud-iam-logging/noxfile.py +++ b/packages/google-cloud-iam-logging/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-iam-logging/setup.py b/packages/google-cloud-iam-logging/setup.py index 0f18b42b6026..db41d71cb205 100644 --- a/packages/google-cloud-iam-logging/setup.py +++ b/packages/google-cloud-iam-logging/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -74,7 +74,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -82,7 +82,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -93,7 +92,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-iam-logging/testing/constraints-3.10.txt b/packages/google-cloud-iam-logging/testing/constraints-3.10.txt index 1cd0c5a2c3d4..a92801e1c8e2 100644 --- a/packages/google-cloud-iam-logging/testing/constraints-3.10.txt +++ b/packages/google-cloud-iam-logging/testing/constraints-3.10.txt @@ -1,11 +1,12 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography -grpc-google-iam-v1 +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 +grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-iam-logging/testing/constraints-3.9.txt b/packages/google-cloud-iam-logging/testing/constraints-3.9.txt deleted file mode 100644 index dcb9a9b3d8ed..000000000000 --- a/packages/google-cloud-iam-logging/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 -grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-iam/docs/conf.py b/packages/google-cloud-iam/docs/conf.py index a644550b2b4c..575d6f125698 100644 --- a/packages/google-cloud-iam/docs/conf.py +++ b/packages/google-cloud-iam/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-iam" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-iam/google/cloud/iam_admin_v1/__init__.py b/packages/google-cloud-iam/google/cloud/iam_admin_v1/__init__.py index 894b005dd625..9673af81a7dc 100644 --- a/packages/google-cloud-iam/google/cloud/iam_admin_v1/__init__.py +++ b/packages/google-cloud-iam/google/cloud/iam_admin_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.iam import IAMAsyncClient, IAMClient from .types.audit_data import AuditData @@ -90,28 +84,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iam_admin_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/__init__.py b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/__init__.py index 0b8a079136b5..5e89b36bdeeb 100644 --- a/packages/google-cloud-iam/google/cloud/iam_credentials_v1/__init__.py +++ b/packages/google-cloud-iam/google/cloud/iam_credentials_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.iam_credentials import IAMCredentialsAsyncClient, IAMCredentialsClient from .types.common import ( @@ -50,28 +44,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iam_credentials_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iam/google/cloud/iam_v2/__init__.py b/packages/google-cloud-iam/google/cloud/iam_v2/__init__.py index 7c2c753ecea2..5ca508743313 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v2/__init__.py +++ b/packages/google-cloud-iam/google/cloud/iam_v2/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.policies import PoliciesAsyncClient, PoliciesClient from .types.deny import DenyRule @@ -52,28 +46,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iam_v2" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iam/google/cloud/iam_v2/services/policies/async_client.py b/packages/google-cloud-iam/google/cloud/iam_v2/services/policies/async_client.py index 8f242ac62ab1..ad477e9289c7 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v2/services/policies/async_client.py +++ b/packages/google-cloud-iam/google/cloud/iam_v2/services/policies/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -582,11 +582,11 @@ async def sample_create_policy(): ) # Make the request - operation = client.create_policy(request=request) + operation = await client.create_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -748,11 +748,11 @@ async def sample_update_policy(): ) # Make the request - operation = client.update_policy(request=request) + operation = await client.update_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -851,11 +851,11 @@ async def sample_delete_policy(): ) # Make the request - operation = client.delete_policy(request=request) + operation = await client.delete_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/google/cloud/iam_v2beta/__init__.py b/packages/google-cloud-iam/google/cloud/iam_v2beta/__init__.py index 3776318f20c5..58dad9e825e2 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v2beta/__init__.py +++ b/packages/google-cloud-iam/google/cloud/iam_v2beta/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.policies import PoliciesAsyncClient, PoliciesClient from .types.deny import DenyRule @@ -52,28 +46,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iam_v2beta" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iam/google/cloud/iam_v2beta/services/policies/async_client.py b/packages/google-cloud-iam/google/cloud/iam_v2beta/services/policies/async_client.py index ad02c6fa19ea..977ebc4e31a1 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v2beta/services/policies/async_client.py +++ b/packages/google-cloud-iam/google/cloud/iam_v2beta/services/policies/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -582,11 +582,11 @@ async def sample_create_policy(): ) # Make the request - operation = client.create_policy(request=request) + operation = await client.create_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -748,11 +748,11 @@ async def sample_update_policy(): ) # Make the request - operation = client.update_policy(request=request) + operation = await client.update_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -851,11 +851,11 @@ async def sample_delete_policy(): ) # Make the request - operation = client.delete_policy(request=request) + operation = await client.delete_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/google/cloud/iam_v3/__init__.py b/packages/google-cloud-iam/google/cloud/iam_v3/__init__.py index 8ea1969e25a1..ded72677d01f 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v3/__init__.py +++ b/packages/google-cloud-iam/google/cloud/iam_v3/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.policy_bindings import PolicyBindingsAsyncClient, PolicyBindingsClient from .services.principal_access_boundary_policies import ( @@ -71,28 +65,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iam_v3" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iam/google/cloud/iam_v3/services/policy_bindings/async_client.py b/packages/google-cloud-iam/google/cloud/iam_v3/services/policy_bindings/async_client.py index 28fcd3139ab9..ac70d3ff2652 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v3/services/policy_bindings/async_client.py +++ b/packages/google-cloud-iam/google/cloud/iam_v3/services/policy_bindings/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -355,11 +355,11 @@ async def sample_create_policy_binding(): ) # Make the request - operation = client.create_policy_binding(request=request) + operation = await client.create_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -643,11 +643,11 @@ async def sample_update_policy_binding(): ) # Make the request - operation = client.update_policy_binding(request=request) + operation = await client.update_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -787,11 +787,11 @@ async def sample_delete_policy_binding(): ) # Make the request - operation = client.delete_policy_binding(request=request) + operation = await client.delete_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/google/cloud/iam_v3/services/principal_access_boundary_policies/async_client.py b/packages/google-cloud-iam/google/cloud/iam_v3/services/principal_access_boundary_policies/async_client.py index 3f8d9429710d..120d7a143998 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v3/services/principal_access_boundary_policies/async_client.py +++ b/packages/google-cloud-iam/google/cloud/iam_v3/services/principal_access_boundary_policies/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -382,11 +382,11 @@ async def sample_create_principal_access_boundary_policy(): ) # Make the request - operation = client.create_principal_access_boundary_policy(request=request) + operation = await client.create_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -678,11 +678,11 @@ async def sample_update_principal_access_boundary_policy(): ) # Make the request - operation = client.update_principal_access_boundary_policy(request=request) + operation = await client.update_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -834,11 +834,11 @@ async def sample_delete_principal_access_boundary_policy(): ) # Make the request - operation = client.delete_principal_access_boundary_policy(request=request) + operation = await client.delete_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/google/cloud/iam_v3beta/__init__.py b/packages/google-cloud-iam/google/cloud/iam_v3beta/__init__.py index bf695137c8d3..af90e3210d00 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v3beta/__init__.py +++ b/packages/google-cloud-iam/google/cloud/iam_v3beta/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.access_policies import AccessPoliciesAsyncClient, AccessPoliciesClient from .services.policy_bindings import PolicyBindingsAsyncClient, PolicyBindingsClient @@ -87,28 +81,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iam_v3beta" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iam/google/cloud/iam_v3beta/services/access_policies/async_client.py b/packages/google-cloud-iam/google/cloud/iam_v3beta/services/access_policies/async_client.py index db4b42455b60..1b001f34f77e 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v3beta/services/access_policies/async_client.py +++ b/packages/google-cloud-iam/google/cloud/iam_v3beta/services/access_policies/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -349,11 +349,11 @@ async def sample_create_access_policy(): ) # Make the request - operation = client.create_access_policy(request=request) + operation = await client.create_access_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -622,11 +622,11 @@ async def sample_update_access_policy(): ) # Make the request - operation = client.update_access_policy(request=request) + operation = await client.update_access_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -728,11 +728,11 @@ async def sample_delete_access_policy(): ) # Make the request - operation = client.delete_access_policy(request=request) + operation = await client.delete_access_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/google/cloud/iam_v3beta/services/policy_bindings/async_client.py b/packages/google-cloud-iam/google/cloud/iam_v3beta/services/policy_bindings/async_client.py index 109c64cfbff6..d67b8e984f02 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v3beta/services/policy_bindings/async_client.py +++ b/packages/google-cloud-iam/google/cloud/iam_v3beta/services/policy_bindings/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -355,11 +355,11 @@ async def sample_create_policy_binding(): ) # Make the request - operation = client.create_policy_binding(request=request) + operation = await client.create_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -640,11 +640,11 @@ async def sample_update_policy_binding(): ) # Make the request - operation = client.update_policy_binding(request=request) + operation = await client.update_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -784,11 +784,11 @@ async def sample_delete_policy_binding(): ) # Make the request - operation = client.delete_policy_binding(request=request) + operation = await client.delete_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/google/cloud/iam_v3beta/services/principal_access_boundary_policies/async_client.py b/packages/google-cloud-iam/google/cloud/iam_v3beta/services/principal_access_boundary_policies/async_client.py index 83794c2bbec5..a123600a9a25 100644 --- a/packages/google-cloud-iam/google/cloud/iam_v3beta/services/principal_access_boundary_policies/async_client.py +++ b/packages/google-cloud-iam/google/cloud/iam_v3beta/services/principal_access_boundary_policies/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -382,11 +382,11 @@ async def sample_create_principal_access_boundary_policy(): ) # Make the request - operation = client.create_principal_access_boundary_policy(request=request) + operation = await client.create_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -678,11 +678,11 @@ async def sample_update_principal_access_boundary_policy(): ) # Make the request - operation = client.update_principal_access_boundary_policy(request=request) + operation = await client.update_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -834,11 +834,11 @@ async def sample_delete_principal_access_boundary_policy(): ) # Make the request - operation = client.delete_principal_access_boundary_policy(request=request) + operation = await client.delete_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/noxfile.py b/packages/google-cloud-iam/noxfile.py index 685d0000406f..45b518900a07 100644 --- a/packages/google-cloud-iam/noxfile.py +++ b/packages/google-cloud-iam/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_create_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_create_policy_async.py index 75ec923caf7d..c892b251894b 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_create_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_create_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_policy(): ) # Make the request - operation = client.create_policy(request=request) + operation = await client.create_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_delete_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_delete_policy_async.py index 0b6c636ec5d3..5c2628d7a32b 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_delete_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_delete_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_policy(): ) # Make the request - operation = client.delete_policy(request=request) + operation = await client.delete_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_update_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_update_policy_async.py index edeb13001959..198fc16ef7c8 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_update_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v2_generated_policies_update_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_policy(): request = iam_v2.UpdatePolicyRequest() # Make the request - operation = client.update_policy(request=request) + operation = await client.update_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_create_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_create_policy_async.py index 7942095ff4b4..f6dd1968a1fc 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_create_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_create_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_create_policy(): ) # Make the request - operation = client.create_policy(request=request) + operation = await client.create_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_delete_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_delete_policy_async.py index 75e6ec6a128f..28947e6bec13 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_delete_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_delete_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_policy(): ) # Make the request - operation = client.delete_policy(request=request) + operation = await client.delete_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_update_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_update_policy_async.py index 8d0072c724eb..1e94c012cc38 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_update_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v2beta_generated_policies_update_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_policy(): request = iam_v2beta.UpdatePolicyRequest() # Make the request - operation = client.update_policy(request=request) + operation = await client.update_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_create_policy_binding_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_create_policy_binding_async.py index ef1c82663832..740f84c167eb 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_create_policy_binding_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_create_policy_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_policy_binding(): ) # Make the request - operation = client.create_policy_binding(request=request) + operation = await client.create_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_delete_policy_binding_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_delete_policy_binding_async.py index 213f5c7537f4..4ec144bac6d5 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_delete_policy_binding_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_delete_policy_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_policy_binding(): ) # Make the request - operation = client.delete_policy_binding(request=request) + operation = await client.delete_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_update_policy_binding_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_update_policy_binding_async.py index ea53c4ee7c4f..ed24f214b7f7 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_update_policy_binding_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_policy_bindings_update_policy_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_update_policy_binding(): ) # Make the request - operation = client.update_policy_binding(request=request) + operation = await client.update_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py index d529f6ad3faa..ac4a29b4398d 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_principal_access_boundary_policy(): ) # Make the request - operation = client.create_principal_access_boundary_policy(request=request) + operation = await client.create_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py index eccf8d7730e7..adb332d89c5a 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_principal_access_boundary_policy(): ) # Make the request - operation = client.delete_principal_access_boundary_policy(request=request) + operation = await client.delete_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py index 8bb8e7c2ac23..4942ba41e934 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_principal_access_boundary_policy(): request = iam_v3.UpdatePrincipalAccessBoundaryPolicyRequest() # Make the request - operation = client.update_principal_access_boundary_policy(request=request) + operation = await client.update_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_create_access_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_create_access_policy_async.py index 4bf641fe2906..56bae4c26237 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_create_access_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_create_access_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_access_policy(): ) # Make the request - operation = client.create_access_policy(request=request) + operation = await client.create_access_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_delete_access_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_delete_access_policy_async.py index 6490c0c9a5f1..30cd3c496085 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_delete_access_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_delete_access_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_access_policy(): ) # Make the request - operation = client.delete_access_policy(request=request) + operation = await client.delete_access_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_update_access_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_update_access_policy_async.py index 8c275772f8f9..cbd8f332feee 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_update_access_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_access_policies_update_access_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_access_policy(): request = iam_v3beta.UpdateAccessPolicyRequest() # Make the request - operation = client.update_access_policy(request=request) + operation = await client.update_access_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_create_policy_binding_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_create_policy_binding_async.py index bea0f6f5f3c2..c589e38fb6a2 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_create_policy_binding_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_create_policy_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_policy_binding(): ) # Make the request - operation = client.create_policy_binding(request=request) + operation = await client.create_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_delete_policy_binding_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_delete_policy_binding_async.py index 556beadd3746..5a3961bb7bdd 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_delete_policy_binding_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_delete_policy_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_policy_binding(): ) # Make the request - operation = client.delete_policy_binding(request=request) + operation = await client.delete_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_update_policy_binding_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_update_policy_binding_async.py index 320bcde0a0c2..49688afcf101 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_update_policy_binding_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_policy_bindings_update_policy_binding_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -48,11 +48,11 @@ async def sample_update_policy_binding(): ) # Make the request - operation = client.update_policy_binding(request=request) + operation = await client.update_policy_binding(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py index 64d0c4625d91..856ca5a83a34 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_create_principal_access_boundary_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_create_principal_access_boundary_policy(): ) # Make the request - operation = client.create_principal_access_boundary_policy(request=request) + operation = await client.create_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py index 1fa20934fb90..d7254787084b 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_delete_principal_access_boundary_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_principal_access_boundary_policy(): ) # Make the request - operation = client.delete_principal_access_boundary_policy(request=request) + operation = await client.delete_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py index 032877eb4599..4759a1b7ca0e 100644 --- a/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py +++ b/packages/google-cloud-iam/samples/generated_samples/iam_v3beta_generated_principal_access_boundary_policies_update_principal_access_boundary_policy_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -42,11 +42,11 @@ async def sample_update_principal_access_boundary_policy(): request = iam_v3beta.UpdatePrincipalAccessBoundaryPolicyRequest() # Make the request - operation = client.update_principal_access_boundary_policy(request=request) + operation = await client.update_principal_access_boundary_policy(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iam/setup.py b/packages/google-cloud-iam/setup.py index 7ca098b742c7..9940c055aba1 100644 --- a/packages/google-cloud-iam/setup.py +++ b/packages/google-cloud-iam/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,12 +39,12 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", "grpc-google-iam-v1 >=0.12.4, <1.0.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-iam/testing/constraints-3.10.txt b/packages/google-cloud-iam/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-iam/testing/constraints-3.10.txt +++ b/packages/google-cloud-iam/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-iam/testing/constraints-3.9.txt b/packages/google-cloud-iam/testing/constraints-3.9.txt deleted file mode 100644 index 36c91811afe8..000000000000 --- a/packages/google-cloud-iam/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -grpc-google-iam-v1==0.12.4 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_admin_v1/test_iam.py b/packages/google-cloud-iam/tests/unit/gapic/iam_admin_v1/test_iam.py index 2d41d3a58b64..b47aab5c51b7 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_admin_v1/test_iam.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_admin_v1/test_iam.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1735,11 +1729,7 @@ async def test_list_service_accounts_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_service_accounts(request={}) - ).pages: + async for page_ in (await client.list_service_accounts(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -8748,11 +8738,7 @@ async def test_query_grantable_roles_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.query_grantable_roles(request={}) - ).pages: + async for page_ in (await client.query_grantable_roles(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -9119,11 +9105,7 @@ async def test_list_roles_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_roles(request={}) - ).pages: + async for page_ in (await client.list_roles(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -10828,11 +10810,7 @@ async def test_query_testable_permissions_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.query_testable_permissions(request={}) - ).pages: + async for page_ in (await client.query_testable_permissions(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_credentials_v1/test_iam_credentials.py b/packages/google-cloud-iam/tests/unit/gapic/iam_credentials_v1/test_iam_credentials.py index 985ececf0674..9f61bd874602 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_credentials_v1/test_iam_credentials.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_credentials_v1/test_iam_credentials.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2867,7 +2861,7 @@ def test_generate_access_token_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_access_token_rest_unset_required_fields(): @@ -3066,7 +3060,7 @@ def test_generate_id_token_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_generate_id_token_rest_unset_required_fields(): @@ -3261,7 +3255,7 @@ def test_sign_blob_rest_required_fields(request_type=common.SignBlobRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_sign_blob_rest_unset_required_fields(): @@ -3454,7 +3448,7 @@ def test_sign_jwt_rest_required_fields(request_type=common.SignJwtRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_sign_jwt_rest_unset_required_fields(): diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_v2/test_policies.py b/packages/google-cloud-iam/tests/unit/gapic/iam_v2/test_policies.py index 62c2e32dce08..b6198fdf6eba 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_v2/test_policies.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_v2/test_policies.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1771,11 +1765,7 @@ async def test_list_policies_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_policies(request={}) - ).pages: + async for page_ in (await client.list_policies(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3150,7 +3140,7 @@ def test_list_policies_rest_required_fields(request_type=policy.ListPoliciesRequ expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_policies_rest_unset_required_fields(): @@ -3393,7 +3383,7 @@ def test_get_policy_rest_required_fields(request_type=policy.GetPolicyRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_policy_rest_unset_required_fields(): @@ -3571,7 +3561,7 @@ def test_create_policy_rest_required_fields(request_type=gi_policy.CreatePolicyR expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_policy_rest_unset_required_fields(): @@ -3752,7 +3742,7 @@ def test_update_policy_rest_required_fields(request_type=policy.UpdatePolicyRequ expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_policy_rest_unset_required_fields(): @@ -3873,7 +3863,7 @@ def test_delete_policy_rest_required_fields(request_type=policy.DeletePolicyRequ expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_policy_rest_unset_required_fields(): diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_v2beta/test_policies.py b/packages/google-cloud-iam/tests/unit/gapic/iam_v2beta/test_policies.py index f948fe8eb33c..eea47145e8c0 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_v2beta/test_policies.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_v2beta/test_policies.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1751,11 +1745,7 @@ async def test_list_policies_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_policies(request={}) - ).pages: + async for page_ in (await client.list_policies(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_policy_bindings.py b/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_policy_bindings.py index 1f103d0e477f..17a1a090bc15 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_policy_bindings.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_policy_bindings.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3312,11 +3306,7 @@ async def test_list_policy_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_policy_bindings(request={}) - ).pages: + async for page_ in (await client.list_policy_bindings(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3877,9 +3867,7 @@ async def test_search_target_policy_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.search_target_policy_bindings(request={}) ).pages: pages.append(page_) @@ -4022,7 +4010,7 @@ def test_create_policy_binding_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_policy_binding_rest_unset_required_fields(): @@ -4220,7 +4208,7 @@ def test_get_policy_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_policy_binding_rest_unset_required_fields(): @@ -4409,7 +4397,7 @@ def test_update_policy_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_policy_binding_rest_unset_required_fields(): @@ -4612,7 +4600,7 @@ def test_delete_policy_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_policy_binding_rest_unset_required_fields(): @@ -4812,7 +4800,7 @@ def test_list_policy_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_policy_bindings_rest_unset_required_fields(): @@ -5097,7 +5085,7 @@ def test_search_target_policy_bindings_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_search_target_policy_bindings_rest_unset_required_fields(): diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_principal_access_boundary_policies.py b/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_principal_access_boundary_policies.py index d319bf5837ac..0361b04cda17 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_principal_access_boundary_policies.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_v3/test_principal_access_boundary_policies.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3499,9 +3493,7 @@ async def test_list_principal_access_boundary_policies_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_principal_access_boundary_policies(request={}) ).pages: pages.append(page_) @@ -4076,9 +4068,7 @@ async def test_search_principal_access_boundary_policy_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.search_principal_access_boundary_policy_bindings(request={}) ).pages: pages.append(page_) @@ -4233,7 +4223,7 @@ def test_create_principal_access_boundary_policy_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_principal_access_boundary_policy_rest_unset_required_fields(): @@ -4444,7 +4434,7 @@ def test_get_principal_access_boundary_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_principal_access_boundary_policy_rest_unset_required_fields(): @@ -4647,7 +4637,7 @@ def test_update_principal_access_boundary_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_principal_access_boundary_policy_rest_unset_required_fields(): @@ -4863,7 +4853,7 @@ def test_delete_principal_access_boundary_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_principal_access_boundary_policy_rest_unset_required_fields(): @@ -5072,7 +5062,7 @@ def test_list_principal_access_boundary_policies_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_principal_access_boundary_policies_rest_unset_required_fields(): @@ -5356,7 +5346,7 @@ def test_search_principal_access_boundary_policy_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_search_principal_access_boundary_policy_bindings_rest_unset_required_fields(): diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_access_policies.py b/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_access_policies.py index 0c441be68ddc..dd508bf9eee8 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_access_policies.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_access_policies.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3189,11 +3183,7 @@ async def test_list_access_policies_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_access_policies(request={}) - ).pages: + async for page_ in (await client.list_access_policies(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3742,9 +3732,7 @@ async def test_search_access_policy_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.search_access_policy_bindings(request={}) ).pages: pages.append(page_) @@ -3886,7 +3874,7 @@ def test_create_access_policy_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_access_policy_rest_unset_required_fields(): @@ -4082,7 +4070,7 @@ def test_get_access_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_access_policy_rest_unset_required_fields(): @@ -4265,7 +4253,7 @@ def test_update_access_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_access_policy_rest_unset_required_fields(): @@ -4398,7 +4386,7 @@ def test_delete_access_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_access_policy_rest_unset_required_fields(): @@ -4598,7 +4586,7 @@ def test_list_access_policies_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_access_policies_rest_unset_required_fields(): @@ -4866,7 +4854,7 @@ def test_search_access_policy_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_search_access_policy_bindings_rest_unset_required_fields(): diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_policy_bindings.py b/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_policy_bindings.py index b0f1112b889c..6905a297096d 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_policy_bindings.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_policy_bindings.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3312,11 +3306,7 @@ async def test_list_policy_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_policy_bindings(request={}) - ).pages: + async for page_ in (await client.list_policy_bindings(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3879,9 +3869,7 @@ async def test_search_target_policy_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.search_target_policy_bindings(request={}) ).pages: pages.append(page_) @@ -4024,7 +4012,7 @@ def test_create_policy_binding_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_policy_binding_rest_unset_required_fields(): @@ -4222,7 +4210,7 @@ def test_get_policy_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_policy_binding_rest_unset_required_fields(): @@ -4411,7 +4399,7 @@ def test_update_policy_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_policy_binding_rest_unset_required_fields(): @@ -4614,7 +4602,7 @@ def test_delete_policy_binding_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_policy_binding_rest_unset_required_fields(): @@ -4814,7 +4802,7 @@ def test_list_policy_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_policy_bindings_rest_unset_required_fields(): @@ -5100,7 +5088,7 @@ def test_search_target_policy_bindings_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_search_target_policy_bindings_rest_unset_required_fields(): diff --git a/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_principal_access_boundary_policies.py b/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_principal_access_boundary_policies.py index 5e2743804d56..ec6a4350cdbc 100644 --- a/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_principal_access_boundary_policies.py +++ b/packages/google-cloud-iam/tests/unit/gapic/iam_v3beta/test_principal_access_boundary_policies.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3499,9 +3493,7 @@ async def test_list_principal_access_boundary_policies_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_principal_access_boundary_policies(request={}) ).pages: pages.append(page_) @@ -4076,9 +4068,7 @@ async def test_search_principal_access_boundary_policy_bindings_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.search_principal_access_boundary_policy_bindings(request={}) ).pages: pages.append(page_) @@ -4233,7 +4223,7 @@ def test_create_principal_access_boundary_policy_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_principal_access_boundary_policy_rest_unset_required_fields(): @@ -4444,7 +4434,7 @@ def test_get_principal_access_boundary_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_principal_access_boundary_policy_rest_unset_required_fields(): @@ -4647,7 +4637,7 @@ def test_update_principal_access_boundary_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_principal_access_boundary_policy_rest_unset_required_fields(): @@ -4863,7 +4853,7 @@ def test_delete_principal_access_boundary_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_principal_access_boundary_policy_rest_unset_required_fields(): @@ -5072,7 +5062,7 @@ def test_list_principal_access_boundary_policies_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_principal_access_boundary_policies_rest_unset_required_fields(): @@ -5356,7 +5346,7 @@ def test_search_principal_access_boundary_policy_bindings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_search_principal_access_boundary_policy_bindings_rest_unset_required_fields(): diff --git a/packages/google-cloud-iamconnectorcredentials/docs/conf.py b/packages/google-cloud-iamconnectorcredentials/docs/conf.py index 9e165b9ad843..66cc65d54bc2 100644 --- a/packages/google-cloud-iamconnectorcredentials/docs/conf.py +++ b/packages/google-cloud-iamconnectorcredentials/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-iamconnectorcredentials" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/__init__.py b/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/__init__.py index bd1ae3424d72..9b4a28bc115d 100644 --- a/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/__init__.py +++ b/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -23,13 +23,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.iam_connector_credentials_service import ( IAMConnectorCredentialsServiceAsyncClient, @@ -52,28 +46,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iamconnectorcredentials_v1alpha" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/services/iam_connector_credentials_service/async_client.py b/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/services/iam_connector_credentials_service/async_client.py index 6bc9b3a88312..abd271cf8b80 100644 --- a/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/services/iam_connector_credentials_service/async_client.py +++ b/packages/google-cloud-iamconnectorcredentials/google/cloud/iamconnectorcredentials_v1alpha/services/iam_connector_credentials_service/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -369,11 +369,11 @@ async def sample_retrieve_credentials(): ) # Make the request - operation = client.retrieve_credentials(request=request) + operation = await client.retrieve_credentials(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iamconnectorcredentials/noxfile.py b/packages/google-cloud-iamconnectorcredentials/noxfile.py index 1a62b2bece5c..fcb99896f813 100644 --- a/packages/google-cloud-iamconnectorcredentials/noxfile.py +++ b/packages/google-cloud-iamconnectorcredentials/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-iamconnectorcredentials/samples/generated_samples/iamconnectorcredentials_v1alpha_generated_iam_connector_credentials_service_retrieve_credentials_async.py b/packages/google-cloud-iamconnectorcredentials/samples/generated_samples/iamconnectorcredentials_v1alpha_generated_iam_connector_credentials_service_retrieve_credentials_async.py index 2bb6abf9d465..71f7817315b2 100644 --- a/packages/google-cloud-iamconnectorcredentials/samples/generated_samples/iamconnectorcredentials_v1alpha_generated_iam_connector_credentials_service_retrieve_credentials_async.py +++ b/packages/google-cloud-iamconnectorcredentials/samples/generated_samples/iamconnectorcredentials_v1alpha_generated_iam_connector_credentials_service_retrieve_credentials_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -45,11 +45,11 @@ async def sample_retrieve_credentials(): ) # Make the request - operation = client.retrieve_credentials(request=request) + operation = await client.retrieve_credentials(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-iamconnectorcredentials/setup.py b/packages/google-cloud-iamconnectorcredentials/setup.py index 590f800ea5ca..8ac7400d2a34 100644 --- a/packages/google-cloud-iamconnectorcredentials/setup.py +++ b/packages/google-cloud-iamconnectorcredentials/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -41,11 +41,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -73,7 +73,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -81,7 +81,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -92,7 +91,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-iamconnectorcredentials/testing/constraints-3.10.txt b/packages/google-cloud-iamconnectorcredentials/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-iamconnectorcredentials/testing/constraints-3.10.txt +++ b/packages/google-cloud-iamconnectorcredentials/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-iamconnectorcredentials/testing/constraints-3.9.txt b/packages/google-cloud-iamconnectorcredentials/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-iamconnectorcredentials/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-iamconnectorcredentials/tests/unit/gapic/iamconnectorcredentials_v1alpha/test_iam_connector_credentials_service.py b/packages/google-cloud-iamconnectorcredentials/tests/unit/gapic/iamconnectorcredentials_v1alpha/test_iam_connector_credentials_service.py index 5ed80c69ae71..85231a565949 100644 --- a/packages/google-cloud-iamconnectorcredentials/tests/unit/gapic/iamconnectorcredentials_v1alpha/test_iam_connector_credentials_service.py +++ b/packages/google-cloud-iamconnectorcredentials/tests/unit/gapic/iamconnectorcredentials_v1alpha/test_iam_connector_credentials_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2204,7 +2198,7 @@ def test_retrieve_credentials_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_retrieve_credentials_rest_unset_required_fields(): @@ -2419,7 +2413,7 @@ def test_finalize_credentials_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_finalize_credentials_rest_unset_required_fields(): diff --git a/packages/google-cloud-iap/docs/conf.py b/packages/google-cloud-iap/docs/conf.py index e7b86fb553fc..0fcd5d1e7bee 100644 --- a/packages/google-cloud-iap/docs/conf.py +++ b/packages/google-cloud-iap/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-iap" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-iap/google/cloud/iap_v1/__init__.py b/packages/google-cloud-iap/google/cloud/iap_v1/__init__.py index 6eced41f6386..86b512280851 100644 --- a/packages/google-cloud-iap/google/cloud/iap_v1/__init__.py +++ b/packages/google-cloud-iap/google/cloud/iap_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.identity_aware_proxy_admin_service import ( IdentityAwareProxyAdminServiceAsyncClient, @@ -85,28 +79,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.iap_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-iap/noxfile.py b/packages/google-cloud-iap/noxfile.py index 3d9e10f804cc..903b12a6f2c4 100644 --- a/packages/google-cloud-iap/noxfile.py +++ b/packages/google-cloud-iap/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-iap/setup.py b/packages/google-cloud-iap/setup.py index 4b1402488e4b..bd864f482c50 100644 --- a/packages/google-cloud-iap/setup.py +++ b/packages/google-cloud-iap/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -72,7 +72,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -80,7 +80,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -91,7 +90,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-iap/testing/constraints-3.10.txt b/packages/google-cloud-iap/testing/constraints-3.10.txt index 1cd0c5a2c3d4..a92801e1c8e2 100644 --- a/packages/google-cloud-iap/testing/constraints-3.10.txt +++ b/packages/google-cloud-iap/testing/constraints-3.10.txt @@ -1,11 +1,12 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography -grpc-google-iam-v1 +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 +grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-iap/testing/constraints-3.9.txt b/packages/google-cloud-iap/testing/constraints-3.9.txt deleted file mode 100644 index dcb9a9b3d8ed..000000000000 --- a/packages/google-cloud-iap/testing/constraints-3.9.txt +++ /dev/null @@ -1,14 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 -grpc-google-iam-v1==0.14.0 diff --git a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py index 5b752844f5db..36cac431a0a5 100644 --- a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py +++ b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_admin_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -3520,11 +3514,7 @@ async def test_list_tunnel_dest_groups_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_tunnel_dest_groups(request={}) - ).pages: + async for page_ in (await client.list_tunnel_dest_groups(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -5045,7 +5035,7 @@ def test_set_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_set_iam_policy_rest_unset_required_fields(): @@ -5172,7 +5162,7 @@ def test_get_iam_policy_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_iam_policy_rest_unset_required_fields(): @@ -5299,7 +5289,7 @@ def test_test_iam_permissions_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_test_iam_permissions_rest_unset_required_fields(): @@ -5429,7 +5419,7 @@ def test_get_iap_settings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_iap_settings_rest_unset_required_fields(): @@ -5551,7 +5541,7 @@ def test_update_iap_settings_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_iap_settings_rest_unset_required_fields(): @@ -5693,7 +5683,7 @@ def test_validate_iap_attribute_expression_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_validate_iap_attribute_expression_rest_unset_required_fields(): @@ -5835,7 +5825,7 @@ def test_list_tunnel_dest_groups_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_tunnel_dest_groups_rest_unset_required_fields(): @@ -6107,7 +6097,7 @@ def test_create_tunnel_dest_group_rest_required_fields( ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_tunnel_dest_group_rest_unset_required_fields(): @@ -6303,7 +6293,7 @@ def test_get_tunnel_dest_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_tunnel_dest_group_rest_unset_required_fields(): @@ -6485,7 +6475,7 @@ def test_delete_tunnel_dest_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_tunnel_dest_group_rest_unset_required_fields(): @@ -6666,7 +6656,7 @@ def test_update_tunnel_dest_group_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_update_tunnel_dest_group_rest_unset_required_fields(): diff --git a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py index 47252b3e058a..471f082e5265 100644 --- a/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py +++ b/packages/google-cloud-iap/tests/unit/gapic/iap_v1/test_identity_aware_proxy_o_auth_service.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,18 +13,12 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -2891,9 +2885,7 @@ async def test_list_identity_aware_proxy_clients_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch + async for page_ in ( await client.list_identity_aware_proxy_clients(request={}) ).pages: pages.append(page_) @@ -3786,7 +3778,7 @@ def test_list_brands_rest_required_fields(request_type=service.ListBrandsRequest expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_brands_rest_unset_required_fields(): @@ -3905,7 +3897,7 @@ def test_create_brand_rest_required_fields(request_type=service.CreateBrandReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_brand_rest_unset_required_fields(): @@ -4031,7 +4023,7 @@ def test_get_brand_rest_required_fields(request_type=service.GetBrandRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_brand_rest_unset_required_fields(): @@ -4157,7 +4149,7 @@ def test_create_identity_aware_proxy_client_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_identity_aware_proxy_client_rest_unset_required_fields(): @@ -4301,7 +4293,7 @@ def test_list_identity_aware_proxy_clients_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_identity_aware_proxy_clients_rest_unset_required_fields(): @@ -4501,7 +4493,7 @@ def test_get_identity_aware_proxy_client_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_identity_aware_proxy_client_rest_unset_required_fields(): @@ -4633,7 +4625,7 @@ def test_reset_identity_aware_proxy_client_secret_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_reset_identity_aware_proxy_client_secret_rest_unset_required_fields(): @@ -4759,7 +4751,7 @@ def test_delete_identity_aware_proxy_client_rest_required_fields( expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_identity_aware_proxy_client_rest_unset_required_fields(): diff --git a/packages/google-cloud-ids/docs/conf.py b/packages/google-cloud-ids/docs/conf.py index 91d3868e7e5e..e358161c6555 100644 --- a/packages/google-cloud-ids/docs/conf.py +++ b/packages/google-cloud-ids/docs/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -83,7 +83,7 @@ # General information about the project. project = "google-cloud-ids" -copyright = "2025, Google, LLC" +copyright = "2026, Google, LLC" author = "Google APIs" # The version info for the project you're documenting, acts as replacement for diff --git a/packages/google-cloud-ids/google/cloud/ids_v1/__init__.py b/packages/google-cloud-ids/google/cloud/ids_v1/__init__.py index ba8ca02fee5e..318d9606e30b 100644 --- a/packages/google-cloud-ids/google/cloud/ids_v1/__init__.py +++ b/packages/google-cloud-ids/google/cloud/ids_v1/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,13 +21,7 @@ __version__ = package_version.__version__ -if sys.version_info >= (3, 8): # pragma: NO COVER - from importlib import metadata -else: # pragma: NO COVER - # TODO(https://github.com/googleapis/python-api-core/issues/835): Remove - # this code path once we drop support for Python 3.7 - import importlib_metadata as metadata - +from importlib import metadata from .services.ids import IDSAsyncClient, IDSClient from .types.ids import ( @@ -49,28 +43,17 @@ # An older version of api_core is installed which does not define the # functions above. We do equivalent checks manually. try: - import sys import warnings _py_version_str = sys.version.split()[0] _package_label = "google.cloud.ids_v1" - if sys.version_info < (3, 9): + if sys.version_info < (3, 10): warnings.warn( "You are using a non-supported Python version " + f"({_py_version_str}). Google will not post any further " + f"updates to {_package_label} supporting this Python version. " + "Please upgrade to the latest Python version, or at " - + f"least to Python 3.9, and then update {_package_label}.", - FutureWarning, - ) - if sys.version_info[:2] == (3, 9): - warnings.warn( - f"You are using a Python version ({_py_version_str}) " - + f"which Google will stop supporting in {_package_label} in " - + "January 2026. Please " - + "upgrade to the latest Python version, or at " - + "least to Python 3.10, before then, and " - + f"then update {_package_label}.", + + f"least to Python 3.10, and then update {_package_label}.", FutureWarning, ) diff --git a/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py b/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py index 5b90ed509e98..56cd414acb29 100644 --- a/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py +++ b/packages/google-cloud-ids/google/cloud/ids_v1/services/ids/async_client.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -565,11 +565,11 @@ async def sample_create_endpoint(): ) # Make the request - operation = client.create_endpoint(request=request) + operation = await client.create_endpoint(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) @@ -707,11 +707,11 @@ async def sample_delete_endpoint(): ) # Make the request - operation = client.delete_endpoint(request=request) + operation = await client.delete_endpoint(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-ids/noxfile.py b/packages/google-cloud-ids/noxfile.py index d4e71f7d9f6c..d0de34f99af6 100644 --- a/packages/google-cloud-ids/noxfile.py +++ b/packages/google-cloud-ids/noxfile.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -31,7 +31,6 @@ LINT_PATHS.append("samples") ALL_PYTHON = [ - "3.9", "3.10", "3.11", "3.12", @@ -390,7 +389,6 @@ def docs(session): shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( "sphinx-build", - "-W", # warnings as errors "-T", # show full traceback on exception "-N", # no colors "-b", diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_async.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_async.py index 05b9f7b364f9..4a717f3a6bfb 100644 --- a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_async.py +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_create_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -50,11 +50,11 @@ async def sample_create_endpoint(): ) # Make the request - operation = client.create_endpoint(request=request) + operation = await client.create_endpoint(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_async.py b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_async.py index beddb414e60c..9c7ca47e92fc 100644 --- a/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_async.py +++ b/packages/google-cloud-ids/samples/generated_samples/ids_v1_generated_ids_delete_endpoint_async.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -44,11 +44,11 @@ async def sample_delete_endpoint(): ) # Make the request - operation = client.delete_endpoint(request=request) + operation = await client.delete_endpoint(request=request) print("Waiting for operation to complete...") - response = (await operation).result() + response = await operation.result() # Handle the response print(response) diff --git a/packages/google-cloud-ids/setup.py b/packages/google-cloud-ids/setup.py index 44d0a6c2049b..995e0e086ad3 100644 --- a/packages/google-cloud-ids/setup.py +++ b/packages/google-cloud-ids/setup.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -39,11 +39,11 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 2.11.0, <3.0.0", + "google-api-core[grpc] >= 2.17.1, <3.0.0", # Exclude incompatible versions of `google-auth` # See https://github.com/googleapis/google-cloud-python/issues/12364 "google-auth >= 2.14.1, <3.0.0,!=2.24.0,!=2.25.0", - "grpcio >= 1.33.2, < 2.0.0", + "grpcio >= 1.44.0, < 2.0.0", "grpcio >= 1.75.1, < 2.0.0; python_version >= '3.14'", "proto-plus >= 1.22.3, <2.0.0", "proto-plus >= 1.25.0, <2.0.0; python_version >= '3.13'", @@ -71,7 +71,7 @@ long_description=readme, author="Google LLC", author_email="googleapis-packages@google.com", - license="Apache 2.0", + license="Apache-2.0", url=url, classifiers=[ release_status, @@ -79,7 +79,6 @@ "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", @@ -90,7 +89,7 @@ ], platforms="Posix; MacOS X; Windows", packages=packages, - python_requires=">=3.9", + python_requires=">=3.10", install_requires=dependencies, extras_require=extras, include_package_data=True, diff --git a/packages/google-cloud-ids/testing/constraints-3.10.txt b/packages/google-cloud-ids/testing/constraints-3.10.txt index 7599dea499ed..bac7ba85b4ee 100644 --- a/packages/google-cloud-ids/testing/constraints-3.10.txt +++ b/packages/google-cloud-ids/testing/constraints-3.10.txt @@ -1,10 +1,11 @@ -# -*- coding: utf-8 -*- -# This constraints file is required for unit tests. -# List all library dependencies and extras in this file. -google-api-core -google-auth -grpcio -proto-plus -protobuf -# cryptography is a direct dependency of google-auth -cryptography +# This constraints file is used to check that lower bounds +# are correct in setup.py +# List all library dependencies and extras in this file, +# pinning their versions to their lower bounds. +# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", +# then this file should have google-cloud-foo==1.14.0 +google-api-core==2.17.1 +google-auth==2.14.1 +grpcio==1.44.0 +proto-plus==1.22.3 +protobuf==4.25.8 diff --git a/packages/google-cloud-ids/testing/constraints-3.9.txt b/packages/google-cloud-ids/testing/constraints-3.9.txt deleted file mode 100644 index ac3833d41b9a..000000000000 --- a/packages/google-cloud-ids/testing/constraints-3.9.txt +++ /dev/null @@ -1,13 +0,0 @@ -# -*- coding: utf-8 -*- -# This constraints file is used to check that lower bounds -# are correct in setup.py -# List all library dependencies and extras in this file, -# pinning their versions to their lower bounds. -# For example, if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0", -# then this file should have google-cloud-foo==1.14.0 -google-api-core==2.21.0 -google-auth==2.35.0 -# TODO(https://github.com/googleapis/gapic-generator-python/issues/2453) -# Add the minimum supported version of grpcio to constraints files -proto-plus==1.22.3 -protobuf==4.25.8 diff --git a/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py b/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py index e93e1120ac6e..3ed651a939d0 100644 --- a/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py +++ b/packages/google-cloud-ids/tests/unit/gapic/ids_v1/test_ids.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright 2025 Google LLC +# Copyright 2026 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,19 +13,13 @@ # See the License for the specific language governing permissions and # limitations under the License. # -import os -import re - -# try/except added for compatibility with python < 3.8 -try: - from unittest import mock - from unittest.mock import AsyncMock # pragma: NO COVER -except ImportError: # pragma: NO COVER - import mock - import json import math +import os +import re from collections.abc import AsyncIterable, Iterable, Mapping, Sequence +from unittest import mock +from unittest.mock import AsyncMock import grpc import pytest @@ -1738,11 +1732,7 @@ async def test_list_endpoints_async_pages(): RuntimeError, ) pages = [] - # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` - # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 - async for page_ in ( # pragma: no branch - await client.list_endpoints(request={}) - ).pages: + async for page_ in (await client.list_endpoints(request={})).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2890,7 +2880,7 @@ def test_list_endpoints_rest_required_fields(request_type=ids.ListEndpointsReque expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_list_endpoints_rest_unset_required_fields(): @@ -3136,7 +3126,7 @@ def test_get_endpoint_rest_required_fields(request_type=ids.GetEndpointRequest): expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_get_endpoint_rest_unset_required_fields(): @@ -3335,7 +3325,7 @@ def test_create_endpoint_rest_required_fields(request_type=ids.CreateEndpointReq ("$alt", "json;enum-encoding=int"), ] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_create_endpoint_rest_unset_required_fields(): @@ -3529,7 +3519,7 @@ def test_delete_endpoint_rest_required_fields(request_type=ids.DeleteEndpointReq expected_params = [("$alt", "json;enum-encoding=int")] actual_params = req.call_args.kwargs["params"] - assert expected_params == actual_params + assert sorted(expected_params) == sorted(actual_params) def test_delete_endpoint_rest_unset_required_fields():