You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2022/03/21 09:22:43 UTC
[flink] branch release-1.15 updated: [hotfix][python] Fix missing imports for deprecation warnings
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch release-1.15
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.15 by this push:
new e4dbfcf [hotfix][python] Fix missing imports for deprecation warnings
e4dbfcf is described below
commit e4dbfcfd326fedd9a2edbacc85644dd4ac93e5fd
Author: Marios Trivyzas <ma...@gmail.com>
AuthorDate: Fri Mar 18 14:00:43 2022 +0200
[hotfix][python] Fix missing imports for deprecation warnings
---
flink-python/pyflink/table/environment_settings.py | 2 ++
flink-python/pyflink/table/table_config.py | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/flink-python/pyflink/table/environment_settings.py b/flink-python/pyflink/table/environment_settings.py
index 5437964..1fbf090 100644
--- a/flink-python/pyflink/table/environment_settings.py
+++ b/flink-python/pyflink/table/environment_settings.py
@@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################
+import warnings
+
from pyflink.java_gateway import get_gateway
from pyflink.common import Configuration
diff --git a/flink-python/pyflink/table/table_config.py b/flink-python/pyflink/table/table_config.py
index b09d970..7fa119d 100644
--- a/flink-python/pyflink/table/table_config.py
+++ b/flink-python/pyflink/table/table_config.py
@@ -16,6 +16,7 @@
# limitations under the License.
################################################################################
import datetime
+import warnings
from py4j.compat import long
from typing import Tuple
@@ -285,7 +286,7 @@ class TableConfig(object):
.. note:: Deprecated in 1.15 and will be removed in next release.
"""
warnings.warn("Deprecated in 1.15.", DeprecationWarning)
-
+
if rounding_mode not in (
"UP",
"DOWN",