From 2b000114a081447c011e28c0044b78022fad5f09 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Mon, 13 Jan 2025 12:17:37 -0800 Subject: [PATCH] Deprecate metro code --- HISTORY.rst | 6 ++++++ geoip2/records.py | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 325a58dd..67a755a8 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,12 @@ History ------- +4.9.0 +++++++++++++++++++ + +* ``metro_code`` on ``geoip2.record.Location`` has been deprecated. The + code values are no longer being maintained. + 4.8.1 (2024-11-18) ++++++++++++++++++ diff --git a/geoip2/records.py b/geoip2/records.py index a45bb6ad..d6bb61ea 100644 --- a/geoip2/records.py +++ b/geoip2/records.py @@ -357,10 +357,10 @@ class Location(Record): .. attribute:: metro_code - The metro code of the location if the - location is in the US. MaxMind returns the same metro codes as the - `Google AdWords API - `_. + The metro code is a no-longer-maintained code for targeting + advertisements in Google. + + .. deprecated:: 4.9.0 :type: int