ueshin commented on a change in pull request #34886:
URL: https://github.com/apache/spark/pull/34886#discussion_r769894745



##########
File path: python/pyspark/pandas/frame.py
##########
@@ -12315,19 +12313,11 @@ def apply_op(
             internal = this._internal.with_new_columns(applied)
             return DataFrame(internal)
 
-    if sys.version_info >= (3, 7):
-
-        def __class_getitem__(cls, params: Any) -> object:
-            # This is a workaround to support variadic generic in DataFrame in 
Python 3.7.
-            # See https://github.com/python/typing/issues/193
-            # we always wraps the given type hints by a tuple to mimic the 
variadic generic.
-            return create_tuple_for_frame_type(params)
-
-    elif (3, 5) <= sys.version_info < (3, 7):
-        # This is a workaround to support variadic generic in DataFrame in 
Python 3.5+
-        # The implementation is in its metaclass so this flag is needed to 
distinguish
-        # pandas-on-Spark DataFrame.
-        is_dataframe = None
+    def __class_getitem__(cls, params: Any) -> object:
+        # This is a workaround to support variadic generic in DataFrame in 
Python 3.7.
+        # See https://github.com/python/typing/issues/193
+        # we always wraps the given type hints by a tuple to mimic the 
variadic generic.
+        return create_tuple_for_frame_type(params)

Review comment:
       We can also remove 
https://github.com/apache/spark/blob/33f19012dcdab1e4c880816b1377b2ad881bf1ae/python/pyspark/pandas/frame.py#L344-L359

##########
File path: python/pyspark/pandas/series.py
##########
@@ -373,8 +373,6 @@ class Series(Frame, IndexOpsMixin, Generic[T]):
     ----------
     data : array-like, dict, or scalar value, pandas Series
         Contains data stored in Series
-        If data is a dict, argument order is maintained for Python 3.6
-        and later.
         Note that if `data` is a pandas Series, other arguments should not be 
used.
     index : array-like or Index (1d)
         Values must be hashable and have the same length as `data`.

Review comment:
       We can also remove 
https://github.com/apache/spark/blob/33f19012dcdab1e4c880816b1377b2ad881bf1ae/python/pyspark/pandas/series.py#L347-L359

##########
File path: python/setup.py
##########
@@ -276,7 +276,6 @@ def run(self):
         classifiers=[
             'Development Status :: 5 - Production/Stable',
             'License :: OSI Approved :: Apache Software License',
-            'Programming Language :: Python :: 3.6',

Review comment:
       I guess we also need to update 
https://github.com/apache/spark/blob/33f19012dcdab1e4c880816b1377b2ad881bf1ae/python/setup.py#L275
 ?




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to