Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f775d2e

Browse files
authored
fix: Punt deprecation warnings and clean up some warnings. (#2670)
* Add some fixes Signed-off-by: Kevin Zhang <[email protected]> * Punt deprecation warnings to 0.23 Signed-off-by: Kevin Zhang <[email protected]> * Fix lint Signed-off-by: Kevin Zhang <[email protected]>
1 parent fc00ca8 commit f775d2e

File tree

13 files changed

+28
-23
lines changed

13 files changed

+28
-23
lines changed

sdk/python/feast/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def data_source_describe(ctx: click.Context, name: str):
167167

168168
warnings.warn(
169169
"Describing data sources will only work properly if all data sources have names or table names specified. "
170-
"Starting Feast 0.21, data source unique names will be required to encourage data source discovery.",
170+
"Starting Feast 0.23, data source unique names will be required to encourage data source discovery.",
171171
RuntimeWarning,
172172
)
173173
print(
@@ -194,7 +194,7 @@ def data_source_list(ctx: click.Context):
194194

195195
warnings.warn(
196196
"Listing data sources will only work properly if all data sources have names or table names specified. "
197-
"Starting Feast 0.21, data source unique names will be required to encourage data source discovery",
197+
"Starting Feast 0.23, data source unique names will be required to encourage data source discovery",
198198
RuntimeWarning,
199199
)
200200
print(tabulate(table, headers=["NAME", "CLASS"], tablefmt="plain"))

sdk/python/feast/diff/registry_diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def to_string(self):
6161
if feast_object_diff.transition_type == TransitionType.UNCHANGED:
6262
continue
6363
if feast_object_diff.feast_object_type == FeastObjectType.DATA_SOURCE:
64-
# TODO(adchia): Print statements out starting in Feast 0.21
64+
# TODO(adchia): Print statements out starting in Feast 0.23
6565
continue
6666
action, color = message_action_map[feast_object_diff.transition_type]
6767
log_string += f"{action} {feast_object_diff.feast_object_type.value} {Style.BRIGHT + color}{feast_object_diff.name}{Style.RESET_ALL}\n"

sdk/python/feast/entity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def __init__(
110110
warnings.warn(
111111
(
112112
"The `join_key` parameter is being deprecated in favor of the `join_keys` parameter. "
113-
"Please switch from using `join_key` to `join_keys`. Feast 0.22 and onwards will not "
113+
"Please switch from using `join_key` to `join_keys`. Feast 0.23 and onwards will not "
114114
"support the `join_key` parameter."
115115
),
116116
DeprecationWarning,

sdk/python/feast/feature_store.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2197,7 +2197,7 @@ def _validate_data_sources(data_sources: List[DataSource]):
21972197
f"More than one data source with name {case_insensitive_ds_name} found. "
21982198
f"Please ensure that all data source names are case-insensitively unique. "
21992199
f"It may be necessary to ignore certain files in your feature repository by using a .feastignore "
2200-
f"file. Starting in Feast 0.21, unique names (perhaps inferred from the table name) will be "
2200+
f"file. Starting in Feast 0.23, unique names (perhaps inferred from the table name) will be "
22012201
f"required in data sources to encourage data source discovery"
22022202
)
22032203
else:

sdk/python/feast/feature_view.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def __init__(
180180
warnings.warn(
181181
(
182182
"The option to pass a Duration object to the ttl parameter is being deprecated. "
183-
"Please pass a timedelta object instead. Feast 0.21 and onwards will not support "
183+
"Please pass a timedelta object instead. Feast 0.23 and onwards will not support "
184184
"Duration objects."
185185
),
186186
DeprecationWarning,
@@ -195,7 +195,7 @@ def __init__(
195195
(
196196
"The `features` parameter is being deprecated in favor of the `schema` parameter. "
197197
"Please switch from using `features` to `schema`. This will also requiring switching "
198-
"feature definitions from using `Feature` to `Field`. Feast 0.21 and onwards will not "
198+
"feature definitions from using `Feature` to `Field`. Feast 0.23 and onwards will not "
199199
"support the `features` parameter."
200200
),
201201
DeprecationWarning,

sdk/python/feast/infra/offline_stores/bigquery_source.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def __init__(
6363
warnings.warn(
6464
(
6565
"The argument 'date_partition_column' is not supported for BigQuery sources. "
66-
"It will be removed in Feast 0.21+"
66+
"It will be removed in Feast 0.23+"
6767
),
6868
DeprecationWarning,
6969
)
@@ -76,7 +76,7 @@ def __init__(
7676
else:
7777
warnings.warn(
7878
(
79-
f"Starting in Feast 0.21, Feast will require either a name for a data source (if using query) or `table`: {self.query}"
79+
f"Starting in Feast 0.23, Feast will require either a name for a data source (if using query) or `table`: {self.query}"
8080
),
8181
DeprecationWarning,
8282
)

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
from feast.type_map import spark_schema_to_np_dtypes
3333
from feast.usage import log_exceptions_and_usage
3434

35+
# Make sure spark warning doesn't raise more than once.
36+
warnings.simplefilter("once", RuntimeWarning)
37+
3538

3639
class SparkOfflineStoreConfig(FeastConfigBaseModel):
3740
type: StrictStr = "spark"

sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def __init__(
5757
warnings.warn(
5858
(
5959
"The argument 'date_partition_column' is not supported for Spark sources."
60-
"It will be removed in Feast 0.21+"
60+
"It will be removed in Feast 0.23+"
6161
),
6262
DeprecationWarning,
6363
)

sdk/python/feast/infra/offline_stores/file_source.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def __init__(
9595
warnings.warn(
9696
(
9797
"The argument 'date_partition_column' is not supported for File sources."
98-
"It will be removed in Feast 0.21+"
98+
"It will be removed in Feast 0.23+"
9999
),
100100
DeprecationWarning,
101101
)

sdk/python/feast/infra/offline_stores/offline_store.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
if TYPE_CHECKING:
3333
from feast.saved_dataset import ValidationReference
3434

35+
warnings.simplefilter("once", RuntimeWarning)
36+
3537

3638
class RetrievalMetadata:
3739
min_event_timestamp: Optional[datetime]

0 commit comments

Comments
 (0)