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:48:06 UTC
(flink) branch release-2.1 updated (371450f6b9f -> 4758c355a30)
This is an automated email from the ASF dual-hosted git repository.
dianfu pushed a change to branch release-2.1
in repository https://gitbox.apache.org/repos/asf/flink.git
from 371450f6b9f [FLINK-21672][test] Amend unit test so it works with IBM java (#27515) (#27546)
new 8c3e1eb344e [FLINK-39052][python] Remove usage of pkg_resources (#27556)
new 4758c355a30 [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) 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.1
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 8c3e1eb344e5732028f85edebbf4694fa8468ecc
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 021023616cd..6bee23ee713 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.71.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.71.0'):
raise RuntimeError(
- "Version of grpcio-tools must be between 1.29.0 and 1.71.0, got %s" % version)
+ "Version of grpcio-tools must be between 1.29.0 and 1.71.0, got %s" % version_str)
if __name__ == '__main__':
(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.1
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 4758c355a3038a68269c537032340f4cbe33826e
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 2a2eef0336f..a57bc24af5d 100755
--- a/flink-python/dev/build-wheels.sh
+++ b/flink-python/dev/build-wheels.sh
@@ -43,7 +43,7 @@ if [[ "$(uname)" != "Darwin" ]]; then
echo "Converting linux_x86_64 wheel to manylinux1"
source `pwd`/dev/.uv/bin/activate
# 4.1 install patchelf and auditwheel
- uv pip install patchelf==0.17.2.1 auditwheel==3.2.0
+ uv pip install patchelf==0.17.2.1 auditwheel==6.6.0
# 4.2 convert Linux wheel
for wheel_file in dist/*.whl; do
auditwheel repair ${wheel_file} -w dist