Changelog History
Page 1
-
v2.0.0 Changes
June 27, 2020π geopy 2.0 is a major release with lots of cleanup and inner refactorings.
The public interface of the library is mostly the same, and the set
π of supported geocoders didn't change.π If you have checked your code on the latest 1.x release with enabled
β warnings (i.e. with-Wd
key of thepython
command) and fixed
β¬οΈ all of them, then it should be safe to upgrade.π New Features
geopy.adapters
module. Previously all geocoders usedurllib
π for HTTP requests, which doesn't support keepalives. Adapters is
a new mechanism which allows to use other HTTP client implementations.There are 3 implementations coming out of the box:
geopy.adapters.RequestsAdapter
-- usesrequests
library
π which supports keepalives (thus it is significantly more effective
π¦ thanurllib
). It is used by default ifrequests
package
is installed.geopy.adapters.URLLibAdapter
-- usesurllib
, basically
0οΈβ£ it provides the same behavior as in geopy 1.x. It is used by default if
π¦requests
package is not installed.
-
geopy.adapters.AioHTTPAdapter
-- usesaiohttp
library.β Added optional asyncio support in all geocoders via
π.AioHTTPAdapter
, see the newAsync Mode
doc section..AsyncRateLimiter
-- an async counterpart of.RateLimiter
..RateLimiter
is now thread-safe.Packaging Changes
β¬οΈ Dropped support for Python 2.7 and 3.4.
π New extras:
geopy[requests]
forgeopy.adapters.RequestsAdapter
.geopy[aiohttp]
forgeopy.adapters.AioHTTPAdapter
.
π₯ Breaking Changes
geopy.distance
algorithms now raiseValueError
for points with
different altitudes, because altitude is ignored in calculations.- β Removed
geopy.distance.vincenty
, usegeopy.distance.geodesic
instead. - β±
timeout=None
now disables request timeout, previously
0οΈβ£ a default timeout has been used in this case. - β Removed
GoogleV3.timezone
, use.GoogleV3.reverse_timezone
instead. - β Removed
format_string
param from all geocoders.
π SeeSpecifying Parameters Once
doc section for alternatives. - 0οΈβ£
exactly_one
's default is nowTrue
for all geocoders
and methods. - Removed service-specific request params from all
__init__
methods
of geocoders. Pass them to the correspondinggeocode
/reverse
methods instead. - All bounding box arguments now must be passed as a list of two Points.
Previously some geocoders accepted unique formats like plain strings
and lists of 4 coordinates -- these values are not valid anymore. .GoogleV3.reverse_timezone
used to allow numericat_time
value.
Passdatetime
instances instead.- π
reverse
methods used to bypass the query if it couldn't be parsed
as a.Point
. Now aValueError
is raised in this case. .Location
and.Timezone
classes no longer accept None
forpoint
andraw
args.- π§
.Nominatim
now raisesgeopy.exc.ConfigurationError
when
0οΈβ£ used with a default or sample user-agent. .Point
now raises aValueError
if constructed from a single number.
A zero longitude must be explicitly passed to avoid the error.- Most of the service-specific arguments of geocoders now must be passed
as kwargs, positional arguments are not accepted. - β Removed default value
None
for authentication key arguments of
.GeoNames
,.OpenMapQuest
and.Yandex
. - π
parse_*
methods in geocoders have been prefixed with_
to explicitly mark that they are private.
π Deprecations
- π
.Nominatim
has been moved fromgeopy.geocoders.osm
module
togeopy.geocoders.nominatim
. The old module is still present for
π backwards compatibility, but it will be removed in geopy 3.
-
v2.0.0.rc1 Changes
June 21, 2020π geopy 2.0 is a major release with lots of cleanup and inner refactorings.
The public interface of the library is mostly the same, and the set
π of supported geocoders didn't change.π If you have checked your code on the latest 1.x release with enabled
β warnings (i.e. with-Wd
key of thepython
command) and fixed
β¬οΈ all of them, then it should be safe to upgrade.π New features
geopy.adapters
module. Previously all geocoders usedurllib
π for HTTP requests, which doesn't support keepalives. Adapters is
a new mechanism which allows to use other HTTP client implementations.There are 3 implementations coming out of the box:
geopy.adapters.RequestsAdapter
-- usesrequests
library
π which supports keepalives (thus it is significantly more effective
π¦ thanurllib
). It is used by default ifrequests
package
is installed.geopy.adapters.URLLibAdapter
-- usesurllib
, basically
0οΈβ£ it provides the same behavior as in geopy 1.x. It is used by default if
π¦requests
package is not installed.
-
geopy.adapters.AioHTTPAdapter
-- usesaiohttp
library.β Added optional asyncio support in all geocoders via
π.AioHTTPAdapter
, see the newAsync Mode
doc section..AsyncRateLimiter
-- an async counterpart of.RateLimiter
..RateLimiter
is now thread-safe.Packaging changes
β¬οΈ Dropped support for Python 2.7 and 3.4.
π New extras:
geopy[requests]
forgeopy.adapters.RequestsAdapter
.geopy[aiohttp]
forgeopy.adapters.AioHTTPAdapter
.
Chores
geopy.distance
algorithms now raiseValueError
for points with
different altitudes, because altitude is ignored in calculations.- β Removed
geopy.distance.vincenty
, usegeopy.distance.geodesic
instead. - β±
timeout=None
now disables request timeout, previously
0οΈβ£ a default timeout has been used in this case. - β Removed
GoogleV3.timezone
, use.GoogleV3.reverse_timezone
instead. - β Removed
format_string
param from all geocoders.
π SeeSpecifying Parameters Once
doc section for alternatives. - 0οΈβ£
exactly_one
's default is nowTrue
for all geocoders
and methods. - Removed service-specific request params from all
__init__
methods
of geocoders. Pass them to the correspondinggeocode
/reverse
methods instead. - All bounding box arguments now must be passed as a list of two Points.
Previously some geocoders accepted unique formats like plain strings
and lists of 4 coordinates -- these values are not valid anymore. .GoogleV3.reverse_timezone
used to allow numericat_time
value.
Passdatetime
instances instead.- π
reverse
methods used to bypass the query if it couldn't be parsed
as a.Point
. Now aValueError
is raised in this case. .Location
and.Timezone
classes no longer accept None
forpoint
andraw
args.- π§
.Nominatim
now raisesgeopy.exc.ConfigurationError
when
0οΈβ£ used with a default or sample user-agent. .Point
now raises aValueError
if constructed from a single number.
A zero longitude must be explicitly passed to avoid the error.- Most of the service-specific arguments of geocoders now must be passed
as kwargs, positional arguments are not accepted. - β Removed default value
None
for authentication key arguments of
.GeoNames
,.OpenMapQuest
and.Yandex
. - π
parse_*
methods in geocoders have been prefixed with_
to explicitly mark that they are private.
-
v1.23.0 Changes
June 27, 2020π This is the last feature release for the 1.x series, as geopy 2.0 has been
π released. The 1.x series will not receive any new features or bugfixes
unless explicitly asked on the issue tracker.β ADDED:
Units Conversion
docs section.β ADDED: Docs now explicitly clarify that geocoding services
don't consider altitudes. (#165)β ADDED:
Point.format_unicode
method. It was always present as
__unicode__
magic for Python 2.7, and now it can be accessed
as a public method.π ADDED:
geopy. __version_info__
tuple which can be used to dynamically
compare geopy version.β ADDED: pytest
--skip-tests-requiring-internet
switch (might be useful
π¦ for downstream package maintainers). (#413)π CHANGED: Points with different altitudes now emit a warning
β in distance computations. In geopy 2.0 the warning would become
π» an exception. (#387)π CHANGED: Improved
Point
docs: added missing public methods,
β added more examples.π CHANGED:
Nominatim
started emitting warnings for a number of sample
user agents mentioned in the docs, such asspecify_your_app_name_here
.π FIXED:
IGNFrance
ignored proxies with username + password auth. (#289) -
v1.22.0 Changes
May 11, 2020β ADDED:
AlgoliaPlaces
geocoder.
Contributed by Γlvaro MondΓ©jar. (#405)β ADDED:
BaiduV3
geocoder. (#394)β ADDED:
MapQuest
geocoder.
Contributed by Pratheek Rebala. (#399)β ADDED:
MapTiler
geocoder.
Contributed by chilfing. (#397)β ADDED:
Nominatim
-based geocoders:zoom
parameter
has been added to thereverse
method.
Contributed by David Mueller. (#406)β ADDED:
GoogleV3
added support for lists incomponents
param
which allows to specify multiple components with the same name.
Contributed by Pratheek Rebala. (#409)π CHANGED: Updated links to Nominatim documentation.
Contributed by Sarah Hoffmann. (#403)π CHANGED:
Yandex
now issues a deprecation warning whenlang
parameter is specified in__init__
.lang
should be passed
togeocode
andreverse
instead. (#350)π CHANGED:
format_string
param has been marked as deprecated
π in all geocoders and will be removed in geopy 2.0.
π See the newSpecifying Parameters Once
doc section for alternatives.π FIXED:
IGNFrance
incorrectly processed empty results:geocode
has been raising anIndexError
,reverse
was returning an empty
list. Now they both returnNone
. (#244)π FIXED:
TomTom
geocoder has been raisingGeocoderInsufficientPrivileges
π» exception for rate limiting errors instead ofGeocoderQuotaExceeded
. -
v1.21.0 Changes
February 02, 2020β ADDED:
HERE
geocoder now supports the new API KEY authentication
π method. The old one is marked as deprecated and now issues a warning.
Contributed by deeplook. (#388)β ADDED:
Nominatim
-based geocoders:featuretype
parameter
has been added to thegeocode
method.
Contributed by Sergio MartΓn Morillas. (#365)β ADDED:
Nominatim
-based geocoders:namedetails
parameter
has been added to thegeocode
method.
Contributed by enrique a. (#368)β ADDED:
Pelias
:language
parameter has been added
to thegeocode
andreverse
methods.
Contributed by Armin Leuprecht. (#378)π CHANGED:
Yandex
geocoder started to require API key for all requests
β since September 2019, so a warning asking to specify a key has been
β added which is issued when API key is missing.π CHANGED (packaging): sdist now contains tests.
π FIXED: Updated link to
TomTom
Search API documentation.
Contributed by Przemek Malolepszy. (#362)π FIXED: Occasional
KeyError('city')
inGeolake
.
Contributed by Dmitrii K. (#373) -
v1.20.0
May 26, 2019 -
v1.19.0 Changes
March 26, 2019β ADDED:
GoogleV3
:place_id
arg has been added to
thegeocode
method. Contributed by Mesut Γncel. (#348)β ADDED:
Geolake
,GeoNames
,MapBox
,OpenCage
,OpenMapQuest
,
Nominatim
andPickPoint
geocoders now also accept Python lists
of countries instead of just a single string. (#349)π CHANGED:
geocode
-specific args have been moved togeocode
methods
from__init__
, and the corresponding__init__
args has been
π deprecated. The affected geocoders are:GeocodeEarth
,GeoNames
,
OpenMapQuest
,Nominatim
,Pelias
,PickPoint
,
LiveAddress
. (#350)π FIXED:
OpenCage
'scountry
arg was not respected.
Contributed by Sebastian Illing. (#342)π FIXED:
GoogleV3
has erroneously been issuing a warning about
a missing api key when using premier.
Contributed by Mike Hansen. (#345) -
v1.18.1 Changes
December 16, 2018π FIXED:
GeoNames.reverse_timezone
didn't process errors returned by API
and instead was always raising obscureKeyError
exceptions.π FIXED:
GeoNames.reverse_timezone
raisedKeyError
for points which
don't have an assigned Olson timezone ID (e.g. Antarctica).
Now a validgeopy.Timezone
is returned for such, where pytz timezone
π is created aspytz.FixedOffset
.π FIXED:
GoogleV3.reverse_timezone
raisedKeyError
for points which
don't have an assigned Olson timezone ID (e.g. Antarctica).
NowNone
is returned for such requests, as Google doesn't provide
any meaningful data there. -
v1.18.0 Changes
December 02, 2018π The work on geopy 2.0 has started, see the new
geopy 2.0
doc section
π for more info. geopy 2.0 will drop support for Python 2.7 and 3.4.
To ensure a smoother transition from 1.x to 2.0, make sure to check
β your code with warnings enabled (i.e. run python with the-Wd
switch).β ADDED: Geolake geocoder. Contributed by Yorick Holkamp. (#329)
β ADDED: BANFrance (Base Adresse Nationale) geocoder.
Contributed by SΓ©bastien BarrΓ©. (#336)β ADDED: TomTom and AzureMaps:
language
param has been added to
thereverse
method.β ADDED: Geonames geocoder now supports both
findNearbyPlaceName
andfindNearby
reverse geocoding methods, as chosen by a new
find_nearby_type
parameter of thereverse
method.
Contributed by svalee. (#327)β ADDED: Geonames geocoder now supports returning a timezone
for a particularPoint
via a newreverse_timezone
method.
Contributed by svalee. (#327)β ADDED: Geonames geocoder's
reverse
method now supports new
parameters:lang
andfeature_code
.
Contributed by svalee. (#327)β ADDED: Geonames now supports
scheme
parameter. Although
π the service itself doesn't yet supporthttps
, it will
be possible to enablehttps
via this new parameter as soon
π as they add the support, without waiting for a new release of
geopy.π CHANGED: Geonames now builds
Location.address
differently:
previously it looked likeKreuzberg, 16, DE
, now it looks
likeKreuzberg, Berlin, Germany
.π CHANGED: All warnings now specify a correct
stacklevel
so that
β the warnings point at the place in your code that triggered it,
instead of the geopy internals.π CHANGED: All warnings with
UserWarning
category which will be
β removed in geopy 2.0 now have theDeprecationWarning
category.π CHANGED:
geopy.extra.rate_limiter.RateLimiter
is no longer
an experimental API.π CHANGED:
GoogleV3.timezone
now issues a deprecation warning when
at_time
is a number instead of adatetime
. In geopy 2.0 this will
π» become an exception.π CHANGED:
GoogleV3.timezone
method is now deprecated in favor of
GoogleV3.reverse_timezone
, which works exactly the same, except that
it returns a newgeopy.Timezone
object, which is a wrapper for
pytz timezone similarly togeopy.Location
. This object also
contains a raw response of the service.GoogleV3.timezone
will be
β removed in geopy 2.0. (#332)π CHANGED:
Point
constructor silently ignored the tail of the string
π if it couldn't be parsed, now it is not ignored. For example,
π75 5th Avenue, NYC, USA
was parsed asPoint(75, 5)
,
π» but now it would raise aValueError
exception.π FIXED:
GoogleV3.timezone
method didn't process errors returned
by the API. -
v1.17.0 Changes
September 13, 2018β ADDED: OpenMapQuest how inherits from Nominatim. This adds support
for all parameters and queries implemented in Nominatim (such as
reverse geocoding). (#319)β ADDED: Nominatim-based geocoders now support an
extratags
option.
Contributed by Oleg. (#320)β ADDED: Mapbox geocoder. Contributed by William Hammond. (#323)
β ADDED: ArcGIS now supports custom
domain
andauth_domain
values.
Contributed by Albina. (#325)β ADDED: Bodies of unsuccessful HTTP responses are now logged
withINFO
level.π CHANGED: Reverse geocoding methods now issue a warning for string
queries which cannot be used to construct a Point instance.
π» In geopy 2.0 this will become an exception.π CHANGED: GoogleV3 now issues a warning when used without an API key.
π CHANGED: Parameters accepting bounding boxes have been unified to
accept a pair of diagonal points across all geopy. Previous
π formats are still supported (until geopy 2.0) but now issue
β a warning when used.π CHANGED: Path part of the API urls has been moved to class attributes
in all geocoders, which allows to override them in subclasses.
Bing and What3Words now store api urls internally differently.π FIXED: TomTom and AzureMaps have been passing boolean values for
typeahead
in a wrong format (i.e.0
and1
instead of
false
andtrue
).