geopy v2.0.0.rc1 Release NotesRelease Date: 2020-06-21 // almost 3 years ago
🚀 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
-Wdkey of the
pythoncommand) and fixed
⬆️ all of them, then it should be safe to upgrade.
🆕 New features
geopy.adaptersmodule. Previously all geocoders used
👍 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:
👍 which supports keepalives (thus it is significantly more effective
urllib). It is used by default if
0️⃣ it provides the same behavior as in geopy 1.x. It is used by default if
requestspackage is not installed.
➕ Added optional asyncio support in all geocoders via
.AioHTTPAdapter, see the new
.AsyncRateLimiter-- an async counterpart of
.RateLimiteris now thread-safe.
⬇️ Dropped support for Python 2.7 and 3.4.
🆕 New extras:
geopy.distancealgorithms now raise
ValueErrorfor points with
different altitudes, because altitude is ignored in calculations.
- ✂ Removed
timeout=Nonenow disables request timeout, previously
0️⃣ a default timeout has been used in this case.
- ✂ Removed
- ✂ Removed
format_stringparam from all geocoders.
Specifying Parameters Oncedoc section for alternatives.
exactly_one's default is now
Truefor all geocoders
- Removed service-specific request params from all
of geocoders. Pass them to the corresponding
- 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_timezoneused to allow numeric
reversemethods used to bypass the query if it couldn't be parsed
.Point. Now a
ValueErroris raised in this case.
.Timezoneclasses no longer accept None
0️⃣ used with a default or sample user-agent.
.Pointnow raises a
ValueErrorif 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
Nonefor authentication key arguments of
parse_*methods in geocoders have been prefixed with
to explicitly mark that they are private.