Skip to content

[SPARK-37632][PYTHON] Drop code that targets Python < 3.7#34886

Closed
zero323 wants to merge 17 commits into
apache:masterfrom
zero323:SPARK-37632
Closed

[SPARK-37632][PYTHON] Drop code that targets Python < 3.7#34886
zero323 wants to merge 17 commits into
apache:masterfrom
zero323:SPARK-37632

Conversation

@zero323

@zero323 zero323 commented Dec 13, 2021

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

This PR drops parts of code that target Python < 3.7 including:

  • Components required for type hint compatibility.
  • Old style (Python 2) class declarations.
  • Dictionary-related code that was intended for drop after removal of Python 3.5 support.

Why are the changes needed?

With SPARK-36145 we remove support for Python 3.6 ‒ we should remove all dead code as well, to improve style and reduce maintenance overhead.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Existing tests.

@zero323

zero323 commented Dec 13, 2021

Copy link
Copy Markdown
Member Author

FYI @HyukjinKwon

@SparkQA

SparkQA commented Dec 13, 2021

Copy link
Copy Markdown

Test build #146148 has finished for PR 34886 at commit e4db2f4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

SparkQA commented Dec 13, 2021

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50621/

Comment thread python/pyspark/ml/stat.py
Comment thread python/pyspark/sql/pandas/typehints.py
@HyukjinKwon

Copy link
Copy Markdown
Member

Looks pretty good otherwise.

@SparkQA

SparkQA commented Dec 14, 2021

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50621/

@SparkQA

SparkQA commented Dec 14, 2021

Copy link
Copy Markdown

Test build #146152 has finished for PR 34886 at commit c2a78a8.

  • This patch fails PySpark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

SparkQA commented Dec 14, 2021

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50625/

@SparkQA

SparkQA commented Dec 14, 2021

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50625/

@SparkQA

SparkQA commented Dec 14, 2021

Copy link
Copy Markdown

Test build #146181 has finished for PR 34886 at commit 6af93b8.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • (defaultdict(<class 'list'>,

@SparkQA

SparkQA commented Dec 14, 2021

Copy link
Copy Markdown

Kubernetes integration test unable to build dist.

exiting with code: 1
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50654/

@zero323 zero323 marked this pull request as ready for review December 14, 2021 13:03
@zero323 zero323 changed the title [WIP][SPARK-37632][PYTHON] Drop code that targets Python < 3.7 [SPARK-37632][PYTHON] Drop code that targets Python < 3.7 Dec 14, 2021
@itholic

itholic commented Dec 15, 2021

Copy link
Copy Markdown
Contributor

Otherwise, looks fine to me when I roughly scanned the whole changes.

@HyukjinKwon HyukjinKwon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. cc @ueshin FYI

@HyukjinKwon

HyukjinKwon commented Dec 15, 2021

Copy link
Copy Markdown
Member

Oh, let's also:

Comment thread python/pyspark/pandas/typedef/typehints.py
@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Test build #146228 has finished for PR 34886 at commit 084a1cf.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50702/

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Test build #146230 has finished for PR 34886 at commit 33f1901.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50704/

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50702/

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50704/

Comment thread python/pyspark/pandas/frame.py
Comment thread python/pyspark/pandas/series.py
Comment thread python/setup.py
@ueshin

ueshin commented Dec 15, 2021

Copy link
Copy Markdown
Member

Additionally, we might want to reduce the usage of OrderedDict, mostly in pyspark.pandas module, in a separate PR. cc @HyukjinKwon @itholic @xinrong-databricks

@ueshin ueshin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending tests.

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Test build #146244 has finished for PR 34886 at commit f9f0cfd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50718/

@SparkQA

SparkQA commented Dec 15, 2021

Copy link
Copy Markdown

Kubernetes integration test status failure
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/50718/

@HyukjinKwon

Copy link
Copy Markdown
Member

Thanks @zero323 for doing this!!!

Merged to master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants