Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Restore valid_profiles attribute
Browse files Browse the repository at this point in the history
Resolves #219
  • Loading branch information
Sean C. Gillies committed Jan 16, 2018
1 parent f4e7a73 commit f821d61
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES
@@ -1,3 +1,8 @@
0.15.1 (2018-01-16)
-------------------
- Restore the valid_profiles attribute needed by the Mapbox CLI's distance
command (#219).

0.15.0 (2018-01-08)
-------------------
- Add api_name and api_version class attributes (#207).
Expand Down
2 changes: 1 addition & 1 deletion mapbox/__init__.py
@@ -1,5 +1,5 @@
# mapbox
__version__ = "0.15.0"
__version__ = "0.15.1"

from .services.datasets import Datasets
from .services.directions import Directions
Expand Down
5 changes: 5 additions & 0 deletions mapbox/services/distance.py
Expand Up @@ -9,6 +9,11 @@
class Distance(object):
"""Access to the Distance API V1 ***DEPRECATED**"""

api_name = 'distance-deprecated'
api_version = 'v1-deprecated'
valid_profiles = DirectionsMatrix.valid_profiles + [
'driving', 'cycling', 'walking']

def __init__(self, access_token=None, host=None, cache=None):
warnings.warn(
"The distance module will be removed in the next version. "
Expand Down
2 changes: 1 addition & 1 deletion mapbox/services/matrix.py
Expand Up @@ -102,4 +102,4 @@ def matrix(self, coordinates, profile='mapbox/driving',
uri = '{0}/{1}/{2}'.format(self.baseuri, profile, coords)
res = self.session.get(uri, params=query)
self.handle_http_error(res)
return res
return res

0 comments on commit f821d61

Please sign in to comment.