From 01b3a19189fc5050b76c838b239e32801a161653 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Thu, 6 Nov 2025 11:39:07 +0000 Subject: [PATCH 1/2] fix: relax mime and poison gax dependencies This allows `google_gax` to coexist with projects that depend on newer versions of these libraries. --- clients/gax/mix.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/gax/mix.exs b/clients/gax/mix.exs index b654b6cc49..016a6c7678 100644 --- a/clients/gax/mix.exs +++ b/clients/gax/mix.exs @@ -27,8 +27,8 @@ defmodule GoogleApi.Gax.MixProject do defp deps() do [ {:tesla, "~> 1.2"}, - {:mime, "~> 1.0"}, - {:poison, ">= 3.0.0 and < 5.0.0"}, + {:mime, "~> 1.0 or ~> 2.0"}, + {:poison, ">= 3.0.0 and < 7.0.0"}, {:ex_doc, "~> 0.16", only: :dev}, {:dialyxir, "~> 0.5", only: [:dev], runtime: false} ] From e023fdfbd08a032704477b9fcc7d8de42236d3e2 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Thu, 6 Nov 2025 11:39:47 +0000 Subject: [PATCH 2/2] fix: api test should expect accept-encoding header Tesla now sends a default accept-encoding header, so the tests need to expect it. --- clients/gax/test/gax/api_test.exs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/gax/test/gax/api_test.exs b/clients/gax/test/gax/api_test.exs index fbcc574e14..34a77bfd35 100644 --- a/clients/gax/test/gax/api_test.exs +++ b/clients/gax/test/gax/api_test.exs @@ -35,7 +35,7 @@ defmodule Gax.ApiTest do mock(fn %{ method: :get, url: "https://example.com/v1/stores/store-1/pets", - headers: [{"x-goog-api-client", ^api_client}] + headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate, identity"}] } -> %Tesla.Env{status: 200, body: @pets_json} end) @@ -61,7 +61,7 @@ defmodule Gax.ApiTest do mock(fn %{ method: :get, url: "https://example.com/v1/stores/store-1/pets", - headers: [{"x-goog-api-client", ^api_client}] + headers: [{"x-goog-api-client", ^api_client}, {"accept-encoding", "gzip, deflate, identity"}] } -> %Tesla.Env{status: 200, body: @pets_json_compressed, headers: [{"content-encoding", "gzip"}]}