From 97970d4e3bc84a1ec146c5f9719409db3cddff3f Mon Sep 17 00:00:00 2001 From: rmorshea Date: Thu, 30 Sep 2021 12:06:27 -0700 Subject: [PATCH] warn that IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=1 will be the default --- src/idom/config.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/idom/config.py b/src/idom/config.py index 19caaabcb..216ae268a 100644 --- a/src/idom/config.py +++ b/src/idom/config.py @@ -8,6 +8,7 @@ from pathlib import Path from tempfile import TemporaryDirectory +from warnings import warn from ._option import Option as _Option @@ -55,3 +56,14 @@ For more information on changes to this feature flag see: https://github.com/idom-team/idom/issues/351 """ + +if not IDOM_FEATURE_INDEX_AS_DEFAULT_KEY.current: + warn( + "In the next release, the feature flag IDOM_FEATURE_INDEX_AS_DEFAULT_KEY will " + "be activated by default. To try this out before the next release simply set " + "IDOM_FEATURE_INDEX_AS_DEFAULT_KEY=1 as an environment variable. After this " + "change, you can revert to the old behavior by setting it to 0 instead. If you " + "have questions or issues with this change report them here: " + "https://github.com/idom-team/idom/issues/351", + DeprecationWarning, + )