From 092af7a0ce14b3465627976e49ac642e0814298a Mon Sep 17 00:00:00 2001 From: Beatrix Klebe Date: Tue, 4 Jun 2024 18:48:49 -0400 Subject: [PATCH] chore: Elixir 1.16.3, Erlang 26.2.5 Migrates warn -> warning, updates ssl_verify_fun, and converts single-quoted charlists to the ~c sigil. --- .tool-versions | 4 ++-- lib/concentrate/gtfs/unzip.ex | 3 ++- lib/concentrate/merge_filter.ex | 2 +- lib/concentrate/parser/gtfs_realtime_enhanced.ex | 2 +- lib/concentrate/parser/helpers.ex | 2 +- lib/concentrate/producer/httpoison/state_machine.ex | 8 ++++---- lib/concentrate/producer/s3.ex | 2 +- mix.lock | 2 +- test/concentrate/gtfs/unzip_test.exs | 2 +- 9 files changed, 14 insertions(+), 13 deletions(-) diff --git a/.tool-versions b/.tool-versions index 8e8c5cd4..de9b652f 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ -elixir 1.14.5-otp-25 -erlang 25.3.2.7 +elixir 1.16.3-otp-26 +erlang 26.2.5 diff --git a/lib/concentrate/gtfs/unzip.ex b/lib/concentrate/gtfs/unzip.ex index dac53db2..7fa6a3de 100644 --- a/lib/concentrate/gtfs/unzip.ex +++ b/lib/concentrate/gtfs/unzip.ex @@ -3,7 +3,8 @@ defmodule Concentrate.GTFS.Unzip do Unzips the GTFS file into constituent files. """ @behaviour Concentrate.Parser - @file_list ['agency.txt', 'routes.txt', 'trips.txt', 'stop_times.txt', 'stops.txt'] + # zip file_list takes charlists + @file_list [~c"agency.txt", ~c"routes.txt", ~c"trips.txt", ~c"stop_times.txt", ~c"stops.txt"] def parse(binary, _opts) do {:ok, files} = :zip.unzip(binary, [:memory, file_list: @file_list]) diff --git a/lib/concentrate/merge_filter.ex b/lib/concentrate/merge_filter.ex index 55166088..55464075 100644 --- a/lib/concentrate/merge_filter.ex +++ b/lib/concentrate/merge_filter.ex @@ -109,7 +109,7 @@ defmodule Concentrate.MergeFilter do def handle_info(msg, state) do _ = - Logger.warn(fn -> + Logger.warning(fn -> "unknown message to #{__MODULE__} #{inspect(self())}: #{inspect(msg)}" end) diff --git a/lib/concentrate/parser/gtfs_realtime_enhanced.ex b/lib/concentrate/parser/gtfs_realtime_enhanced.ex index 29bd4f7e..68d45e65 100644 --- a/lib/concentrate/parser/gtfs_realtime_enhanced.ex +++ b/lib/concentrate/parser/gtfs_realtime_enhanced.ex @@ -115,7 +115,7 @@ defmodule Concentrate.Parser.GTFSRealtimeEnhanced do end defp decode_feed_entity(entity, _opts, feed_timestamp) do - Logger.warn("event=malformed_entity timestamp=#{feed_timestamp} #{inspect(entity)}") + Logger.warning("event=malformed_entity timestamp=#{feed_timestamp} #{inspect(entity)}") [] end diff --git a/lib/concentrate/parser/helpers.ex b/lib/concentrate/parser/helpers.ex index d22c878e..c9e9c8d1 100644 --- a/lib/concentrate/parser/helpers.ex +++ b/lib/concentrate/parser/helpers.ex @@ -140,7 +140,7 @@ defmodule Concentrate.Parser.Helpers do when is_integer(vehicle_timestamp) and is_integer(feed_timestamp) and vehicle_timestamp > feed_timestamp do _ = - Logger.warn( + Logger.warning( "vehicle timestamp after feed timestamp feed_url=#{inspect(options.feed_url)} vehicle_id=#{inspect(vehicle_id)} feed_timestamp=#{inspect(feed_timestamp)} vehicle_timestamp=#{inspect(vehicle_timestamp)}" ) diff --git a/lib/concentrate/producer/httpoison/state_machine.ex b/lib/concentrate/producer/httpoison/state_machine.ex index a89f398a..31c29eb8 100644 --- a/lib/concentrate/producer/httpoison/state_machine.ex +++ b/lib/concentrate/producer/httpoison/state_machine.ex @@ -382,11 +382,11 @@ defmodule Concentrate.Producer.HTTPoison.StateMachine do [{message, delay} | fallback_messages] end - defp error_log_level(:closed), do: :warn - defp error_log_level({:closed, _}), do: :warn + defp error_log_level(:closed), do: :warning + defp error_log_level({:closed, _}), do: :warning defp error_log_level({:ssl_closed, _}), do: :info - defp error_log_level(:timeout), do: :warn - defp error_log_level({:unexpected_code, _}), do: :warn + defp error_log_level(:timeout), do: :warning + defp error_log_level({:unexpected_code, _}), do: :warning defp error_log_level(_), do: :error defp now do diff --git a/lib/concentrate/producer/s3.ex b/lib/concentrate/producer/s3.ex index 28a142d4..d6e2c3e4 100644 --- a/lib/concentrate/producer/s3.ex +++ b/lib/concentrate/producer/s3.ex @@ -105,7 +105,7 @@ defmodule Concentrate.Producer.S3 do {:noreply, [], state} {_, error} -> - Logger.warn( + Logger.warning( "#{__MODULE__} error fetching s3 url=#{state.url}} error=#{inspect(error, limit: :infinity)}" ) diff --git a/mix.lock b/mix.lock index 12889892..fb4882b3 100644 --- a/mix.lock +++ b/mix.lock @@ -36,7 +36,7 @@ "plug_crypto": {:hex, :plug_crypto, "1.2.2", "05654514ac717ff3a1843204b424477d9e60c143406aa94daf2274fdd280794d", [:mix], [], "hexpm", "87631c7ad914a5a445f0a3809f99b079113ae4ed4b867348dd9eec288cecb6db"}, "ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"}, "sentry": {:hex, :sentry, "8.0.6", "c8de1bf0523bc120ec37d596c55260901029ecb0994e7075b0973328779ceef7", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "051a2d0472162f3137787c7c9d6e6e4ef239de9329c8c45b1f1bf1e9379e1883"}, - "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.6", "cf344f5692c82d2cd7554f5ec8fd961548d4fd09e7d22f5b62482e5aeaebd4b0", [:make, :mix, :rebar3], [], "hexpm", "bdb0d2471f453c88ff3908e7686f86f9be327d065cc1ec16fa4540197ea04680"}, + "ssl_verify_fun": {:hex, :ssl_verify_fun, "1.1.7", "354c321cf377240c7b8716899e182ce4890c5938111a1296add3ec74cf1715df", [:make, :mix, :rebar3], [], "hexpm", "fe4c190e8f37401d30167c8c405eda19469f34577987c76dde613e838bbc67f8"}, "statistex": {:hex, :statistex, "1.0.0", "f3dc93f3c0c6c92e5f291704cf62b99b553253d7969e9a5fa713e5481cd858a5", [:mix], [], "hexpm", "ff9d8bee7035028ab4742ff52fc80a2aa35cece833cf5319009b52f1b5a86c27"}, "stream_data": {:hex, :stream_data, "0.5.0", "b27641e58941685c75b353577dc602c9d2c12292dd84babf506c2033cd97893e", [:mix], [], "hexpm", "012bd2eec069ada4db3411f9115ccafa38540a3c78c4c0349f151fc761b9e271"}, "telemetry": {:hex, :telemetry, "0.4.3", "a06428a514bdbc63293cd9a6263aad00ddeb66f608163bdec7c8995784080818", [:rebar3], [], "hexpm", "eb72b8365ffda5bed68a620d1da88525e326cb82a75ee61354fc24b844768041"}, diff --git a/test/concentrate/gtfs/unzip_test.exs b/test/concentrate/gtfs/unzip_test.exs index 2de1b0e3..595ab498 100644 --- a/test/concentrate/gtfs/unzip_test.exs +++ b/test/concentrate/gtfs/unzip_test.exs @@ -11,7 +11,7 @@ defmodule Concentrate.GTFS.UnzipTest do end # all the zip module arguments are charlists, hence the single quotes - {:ok, {_, zip_file}} = :zip.create('gtfs.zip', bodies, [:memory]) + {:ok, {_, zip_file}} = :zip.create(~c"gtfs.zip", bodies, [:memory]) assert is_binary(zip_file) parsed = parse(zip_file, []) assert find_body(parsed, "trips.txt") == "trips.txt body"