You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by di...@apache.org on 2026/02/10 08:55:58 UTC

(flink) branch release-2.0 updated (172e0c130e7 -> 5c967772dfd)

This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a change to branch release-2.0
in repository https://gitbox.apache.org/repos/asf/flink.git


    from 172e0c130e7 [hotfix][docs] Update AWS connector version to 6.0
     new ab5a30534c5 [FLINK-39052][python] Remove usage of pkg_resources (#27556)
     new 5c967772dfd [FLINK-39052][python] Bump version auditwheel to 6.6.0 (#27563)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 flink-python/dev/build-wheels.sh   |  2 +-
 flink-python/pyflink/gen_protos.py | 19 ++++++++++---------
 2 files changed, 11 insertions(+), 10 deletions(-)


(flink) 02/02: [FLINK-39052][python] Bump version auditwheel to 6.6.0 (#27563)

Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a commit to branch release-2.0
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 5c967772dfde61a1117c5dfd93f8b2aa10171f6d
Author: Dian Fu <di...@apache.org>
AuthorDate: Tue Feb 10 16:44:15 2026 +0800

    [FLINK-39052][python] Bump version auditwheel to 6.6.0 (#27563)
---
 flink-python/dev/build-wheels.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-python/dev/build-wheels.sh b/flink-python/dev/build-wheels.sh
index 537706be75b..e327035679e 100755
--- a/flink-python/dev/build-wheels.sh
+++ b/flink-python/dev/build-wheels.sh
@@ -43,7 +43,7 @@ if [[ "$(uname)" != "Darwin" ]]; then
     # 4.1 install patchelf
     conda install -c conda-forge patchelf=0.11 -y
     # 4.2 install auditwheel
-    pip install auditwheel==3.2.0
+    pip install auditwheel==6.6.0
     # 4.3 convert Linux wheel
     for wheel_file in dist/*.whl; do
         auditwheel repair ${wheel_file} -w dist


(flink) 01/02: [FLINK-39052][python] Remove usage of pkg_resources (#27556)

Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dianfu pushed a commit to branch release-2.0
in repository https://gitbox.apache.org/repos/asf/flink.git

commit ab5a30534c54af2a0e737e0f83f03eef37204f06
Author: Dian Fu <di...@apache.org>
AuthorDate: Mon Feb 9 19:52:13 2026 +0800

    [FLINK-39052][python] Remove usage of pkg_resources (#27556)
---
 flink-python/pyflink/gen_protos.py | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/flink-python/pyflink/gen_protos.py b/flink-python/pyflink/gen_protos.py
index 1bb3cc91340..408b36c51b2 100644
--- a/flink-python/pyflink/gen_protos.py
+++ b/flink-python/pyflink/gen_protos.py
@@ -30,7 +30,9 @@ import sys
 import time
 import warnings
 
-import pkg_resources
+from importlib import metadata as importlib_metadata
+from importlib import resources as importlib_resources
+from packaging.version import parse as parse_version
 
 GRPC_TOOLS = 'grpcio-tools>=1.29.0,<=1.50.0'
 PROTO_PATHS = ['proto']
@@ -87,7 +89,9 @@ def generate_proto_files(force=True, output_dir=DEFAULT_PYTHON_OUTPUT_PATH):
         else:
             _check_grpcio_tools_version()
             logging.info('Regenerating out-of-date Python proto definitions.')
-            builtin_protos = pkg_resources.resource_filename('grpc_tools', '_proto')
+            # Get the grpc_tools _proto directory path
+            grpc_tools_files = importlib_resources.files('grpc_tools')
+            builtin_protos = str(grpc_tools_files.joinpath('_proto'))
             args = (
                 [sys.executable] +  # expecting to be called from command line
                 ['--proto_path=%s' % builtin_protos] +
@@ -122,8 +126,7 @@ def _install_grpcio_tools_and_generate_proto_files(force, output_dir):
         start = time.time()
         # since '--prefix' option is only supported for pip 8.0+, so here we fallback to
         # use '--install-option' when the pip version is lower than 8.0.0.
-        pip_version = pkg_resources.get_distribution("pip").version
-        from pkg_resources import parse_version
+        pip_version = importlib_metadata.version("pip")
         if parse_version(pip_version) >= parse_version('8.0.0'):
             subprocess.check_call(
                 [sys.executable, '-m', 'pip', 'install',
@@ -144,10 +147,8 @@ def _install_grpcio_tools_and_generate_proto_files(force, output_dir):
         sys.stderr.flush()
         shutil.rmtree(build_path, ignore_errors=True)
     sys.path.append(install_obj.install_purelib)
-    pkg_resources.working_set.add_entry(install_obj.install_purelib)
     if install_obj.install_purelib != install_obj.install_platlib:
         sys.path.append(install_obj.install_platlib)
-        pkg_resources.working_set.add_entry(install_obj.install_platlib)
     try:
         generate_proto_files(force, output_dir)
     finally:
@@ -185,11 +186,11 @@ def _add_license_header(dir, file_name):
 
 
 def _check_grpcio_tools_version():
-    version = pkg_resources.get_distribution("grpcio-tools").parsed_version
-    from pkg_resources import parse_version
+    version_str = importlib_metadata.version("grpcio-tools")
+    version = parse_version(version_str)
     if version < parse_version('1.29.0') or version > parse_version('1.50.0'):
         raise RuntimeError(
-            "Version of grpcio-tools must be between 1.29.0 and 1.50.0, got %s" % version)
+            "Version of grpcio-tools must be between 1.29.0 and 1.50.0, got %s" % version_str)
 
 
 if __name__ == '__main__':