From 02241acca4e664f4eafcc593070a2168342713ae Mon Sep 17 00:00:00 2001 From: liferoad Date: Thu, 10 Oct 2024 15:39:16 -0400 Subject: [PATCH 1/3] fixed the tox and pyproject settings for numpy 2 --- sdks/python/pyproject.toml | 2 +- sdks/python/tox.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sdks/python/pyproject.toml b/sdks/python/pyproject.toml index 037e5a8aed6b..4eb827297019 100644 --- a/sdks/python/pyproject.toml +++ b/sdks/python/pyproject.toml @@ -26,7 +26,7 @@ requires = [ # Avoid https://github.com/pypa/virtualenv/issues/2006 "distlib==0.3.7", # Numpy headers - "numpy>=1.14.3,<1.27", # Update setup.py as well. + "numpy>=1.14.3,<2.2.0", # Update setup.py as well. # having cython here will create wheels that are platform dependent. "cython>=3.0,<4", ## deps for generating external transform wrappers: diff --git a/sdks/python/tox.ini b/sdks/python/tox.ini index 2dfe0670ed0f..b6ea59e83584 100644 --- a/sdks/python/tox.ini +++ b/sdks/python/tox.ini @@ -318,6 +318,7 @@ commands = [testenv:py{39,310}-pandas-{14,15,20}] deps = 14: pandas>=1.4.3,<1.5.0 + 14: numpy>=1.14.3,<1.27.0 # Exclude 1.5.0 and 1.5.1 because of https://github.com/pandas-dev/pandas/issues/45725 15: pandas>=1.5.2,<1.6.0 20: pandas>=2.0.0,<2.1.0 From 7bb3aa8669e0c50c9f539694f71355b383793215 Mon Sep 17 00:00:00 2001 From: liferoad Date: Thu, 10 Oct 2024 18:08:27 -0400 Subject: [PATCH 2/3] retry the subprocess to start the server --- sdks/python/apache_beam/utils/subprocess_server.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sdks/python/apache_beam/utils/subprocess_server.py b/sdks/python/apache_beam/utils/subprocess_server.py index 944c12625d7c..e91a608731ba 100644 --- a/sdks/python/apache_beam/utils/subprocess_server.py +++ b/sdks/python/apache_beam/utils/subprocess_server.py @@ -39,6 +39,7 @@ import grpc from apache_beam.io.filesystems import FileSystems +from apache_beam.utils import retry from apache_beam.version import __version__ as beam_version _LOGGER = logging.getLogger(__name__) @@ -160,6 +161,7 @@ def __enter__(self): def __exit__(self, *unused_args): self.stop() + @retry.with_exponential_backoff(num_retries=4, initial_delay_secs=2) def start(self): try: process, endpoint = self.start_process() From d629485d21d036e3855a5ed9ec357f875a8be514 Mon Sep 17 00:00:00 2001 From: liferoad Date: Thu, 10 Oct 2024 18:49:15 -0400 Subject: [PATCH 3/3] revert the retry --- sdks/python/apache_beam/utils/subprocess_server.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/sdks/python/apache_beam/utils/subprocess_server.py b/sdks/python/apache_beam/utils/subprocess_server.py index e91a608731ba..944c12625d7c 100644 --- a/sdks/python/apache_beam/utils/subprocess_server.py +++ b/sdks/python/apache_beam/utils/subprocess_server.py @@ -39,7 +39,6 @@ import grpc from apache_beam.io.filesystems import FileSystems -from apache_beam.utils import retry from apache_beam.version import __version__ as beam_version _LOGGER = logging.getLogger(__name__) @@ -161,7 +160,6 @@ def __enter__(self): def __exit__(self, *unused_args): self.stop() - @retry.with_exponential_backoff(num_retries=4, initial_delay_secs=2) def start(self): try: process, endpoint = self.start_process()