Skip to content

Commit

Permalink
raise warning on schema version mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
chidauri committed Aug 28, 2019
1 parent 1fd1df0 commit 4d770cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

Changelog
---------
**Future Release**
* Changes
* Raise warning and not error on schema version mismatch (:pr:`718`)

Thanks to the following people for contributing to this release:
:user:`chidauri`


**v0.10.1 Aug 25, 2019**
* Fixes
* Fix serialized LatLong data being loaded as strings (:pr:`712`)
Expand Down
5 changes: 3 additions & 2 deletions featuretools/utils/gen_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import sys
import warnings

import s3fs
from smart_open import open
Expand Down Expand Up @@ -111,15 +112,15 @@ def check_schema_version(cls, cls_type):
if c_num > s_num:
break
elif c_num < s_num:
raise RuntimeError(error_text_upgrade)
warnings.warn(error_text_upgrade)

error_text_outdated = ('Unable to load %s. The schema version '
'of the saved %s (%s) is no longer '
'supported by this version of featuretools.'
% (cls_type, cls_type, version_string))
# Check if saved has older major version.
if current[0] > saved[0]:
raise RuntimeError(error_text_outdated)
warnings.warn(error_text_outdated)


def use_smartopen_es(file_path, path, transport_params=None, read=True):
Expand Down

0 comments on commit 4d770cf

Please sign in to comment.