pypi / geopy
geopy
What changed in geopy 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-25.
25 breaking2 deprecations8 new APIs and options1 behavior and defaults2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initgeopy 238 changes
Breaking changes 25
Rejects inputs longer than 256 characters to prevent excessive CPU use when parsing malformed coordinate strings; long valid strings with irrelevant prefixes may also be rejected.
Drops support for Python 3.7 and adds support for Python 3.13, 3.14, and 3.15.
Build metadata moves from
setup.pytosetup.cfg, anddownload_urlis removed from the metadata.All bounding box arguments must now be a list of two Points; formats such as plain strings and lists of four coordinates are no longer valid.
The default is now True for all geocoders and methods.
Removes the format_string parameter from all geocoders.
Service-specific request parameters are no longer passed to geocoder __init__ methods; pass them to geocode or reverse instead.
Most service-specific geocoder arguments must now be passed as keyword arguments; positional arguments are no longer accepted.
Distance algorithms now raise ValueError for points with different altitudes because altitude is ignored in calculations.
Replaces the removed geopy.distance.vincenty.
Removes vincenty; use geopy.distance.geodesic instead.
The authentication key argument no longer has a default value of None.
Location no longer accepts None for point and raw arguments.
Nominatim now raises ConfigurationError when used with a default or sample user-agent.
The authentication key argument no longer has a default value of None.
Constructing a Point from a single number now raises ValueError; pass zero longitude explicitly to avoid the error.
Timezone no longer accepts None for point and raw arguments.
The authentication key argument no longer has a default value of None.
at_time no longer accepts numeric values; pass datetime instances instead.
Removes GoogleV3.timezone; use GoogleV3.reverse_timezone instead.
Geocoder parse_* methods have been prefixed with an underscore to mark them as private.
Drops support for Python 2.7 and 3.4.
Service-specific request parameters are no longer passed to geocoder __init__ methods; pass them to geocode or reverse instead.
A reverse query that cannot be parsed as a Point now raises ValueError instead of being bypassed.
Passing None now disables the request timeout; previously a default timeout was used.
Deprecations 2
Nominatim has moved from geopy.geocoders.osm to geopy.geocoders.nominatim; the old module remains for backwards compatibility but is slated for removal in geopy 3.
The old Nominatim module remains for backwards compatibility but will be removed in geopy 3.
New APIs and options 8
Adds optional asyncio support in all geocoders via AioHTTPAdapter.
Adds an installation extra for using geopy.adapters.AioHTTPAdapter.
Adds an installation extra for using geopy.adapters.RequestsAdapter.
Introduces adapters as a mechanism for using HTTP client implementations other than urllib.
Adds an adapter using aiohttp, enabling optional asyncio support in geocoders.
Adds an adapter using requests; it is the default when the requests package is installed and supports keepalives.
Adds an adapter using urllib, which is the default when the requests package is not installed.
Adds an async counterpart to RateLimiter.
Behavior and default changes 1
RateLimiter is now thread-safe.
Fixes and other changes 2
Fixes
GeocoderQueryErrorbeing raised for empty results.Fixes
utcnowdeprecation warnings.