Skip to content

Comments

[SPARK-39861][PYTHON][DOCS] Deprecate Python 3.7 Support#37279

Closed
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:SPARK-39861
Closed

[SPARK-39861][PYTHON][DOCS] Deprecate Python 3.7 Support#37279
dongjoon-hyun wants to merge 1 commit intoapache:masterfrom
dongjoon-hyun:SPARK-39861

Conversation

@dongjoon-hyun
Copy link
Member

@dongjoon-hyun dongjoon-hyun commented Jul 25, 2022

What changes were proposed in this pull request?

This PR aims to deprecate Python 3.7 support at Apache Spark 3.4.0.

Why are the changes needed?

Apache Spark 3.4 will be released on February 2023 and will be supported for next 18 months.

Before Spark 3.4.1, Python 3.7 is going to reach End Of Support on 2023-06-27. Although Apache Spark 3.4 will work with Python 3.7 still for a while, there is no proper and official way to support Python 3.7 from that time.

Does this PR introduce any user-facing change?

Yes, but the users will see only a deprecation warning log and docs.

How was this patch tested?

Pass the CIs.

@dongjoon-hyun
Copy link
Member Author

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-39861][PYTHON][DOCS] Deprecate Python 3.7 [SPARK-39861][PYTHON][DOCS] Deprecate Python 3.7 Jul 25, 2022
@dongjoon-hyun dongjoon-hyun changed the title [SPARK-39861][PYTHON][DOCS] Deprecate Python 3.7 [SPARK-39861][PYTHON][DOCS] Deprecate Python 3.7 Support Jul 25, 2022
@dongjoon-hyun
Copy link
Member Author

cc @viirya , @huaxingao , @sunchao , too

Copy link
Member

@viirya viirya left a comment

Choose a reason for hiding this comment

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

The timing looks good to me.

@viirya
Copy link
Member

viirya commented Jul 25, 2022

But it is better to open this for a while for others to take a look.

self.pythonExec = os.environ.get("PYSPARK_PYTHON", "python3")
self.pythonVer = "%d.%d" % sys.version_info[:2]

if sys.version_info[:2] < (3, 8):
Copy link
Member

Choose a reason for hiding this comment

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

just curious whether the version number could be something different from 3.7? if so perhaps the warning message could be something like Python support for version <= 3.7 is deprecated in Spark 3.4.

Copy link
Member

Choose a reason for hiding this comment

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

Same though at first glance. But as we only support Python3.7+, I think there might be other version check so here it is 3.7 for sure? Not sure. If not, then revised error message would be better.

Copy link
Member Author

@dongjoon-hyun dongjoon-hyun Jul 25, 2022

Choose a reason for hiding this comment

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

Good question. It's unlikely because we did the following since Apache Spark 3.2 for a while. This is the first step and we did many efforts to kill 3.6 completely. The following code is removed at branch-3.3 after that. :)

if sys.version_info[:2] < (3, 7):
with warnings.catch_warnings():
warnings.simplefilter("once")
warnings.warn(
"Python 3.6 support is deprecated in Spark 3.2.",
FutureWarning
)

Copy link
Member Author

Choose a reason for hiding this comment

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

In addition, Spark 3.4 requires Python 3.7+ at the installation stage explicitly.

python_requires='>=3.7',

Copy link
Member

Choose a reason for hiding this comment

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

I see, never mind then :)

@dongjoon-hyun
Copy link
Member Author

Thank you, @viirya , @sunchao , @huaxingao , @ueshin . Merged to master for Apache Spark 3.4.

@dongjoon-hyun dongjoon-hyun deleted the SPARK-39861 branch July 25, 2022 21:34
@itholic
Copy link
Contributor

itholic commented Jul 25, 2022

Thanks for the fix!

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.

6 participants