jrmccluskey commented on code in PR #40704:
URL: https://github.com/apache/beam/pull/40704#discussion_r4340361521


##########
sdks/python/setup.py:
##########
@@ -156,12 +156,9 @@ def cythonize(*args, **kwargs):
     'pyarrow>=14.0.1,<26.0.0',
   ]
 
-# Exclude pandas<=1.4.2 since it doesn't work with numpy 1.24.x.
-# Exclude 1.5.0 and 1.5.1 because of
-# https://github.com/pandas-dev/pandas/issues/45725
 # must update the below "docs" and "test" for extras_require
 dataframe_dependency = [
-    'pandas>=1.4.3,!=1.5.0,!=1.5.1,<2.4',
+    'pandas>=2.2.2,<2.4',

Review Comment:
   The numpy ranges were updated to cover the first release that provides 
Python 3.11 wheels all the way up to the latest minor release, which is 
compatible with our code. 
   
   Pandas, on the other hand, has a quirk where the first release that supports 
Python 3.11, 1.5.3, doesn't contain a restriction for `numpy<2` despite 
actually being incompatible with numpy 2+. Pandas 2.2.2 is the first version 
that supports `numpy>=2` so we avoid the issue of a dependency mismatch that 
leads to pandas crashing on import. The upper bound for pandas is functionally 
just bounding to the 2.3.3 release, which was followed by 3.0.0. The dataframes 
code will need an overhaul to support pandas 3+, so I pinned it here for now. 
   
   I can add the context for pandas versions in the code + file a feature 
request to support pandas 3 if there isn't one already.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to