Skip to content

Drop Python 2 and 3.6 support #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jiasli opened this issue Sep 10, 2021 · 6 comments · Fixed by #679
Closed

Drop Python 2 and 3.6 support #406

jiasli opened this issue Sep 10, 2021 · 6 comments · Fixed by #679
Labels

Comments

@jiasli
Copy link
Contributor

jiasli commented Sep 10, 2021

Describe the bug

Python 2 has been deprecated long time ago: https://www.python.org/doc/sunset-python-2/

We have decided that January 1, 2020, was the day that we sunset Python 2.

Customers asked Azure CLI to drop Python 2 since 2019-11-23 in Azure/azure-cli#11362 and Azure CLI finally dropped Python 2 in Azure/azure-cli#11363.

As there is no security maintenance for Python 2 anymore. Running MSAL on Python imposes security risks: https://www.activestate.com/products/python/python-2-end-of-life-security-updates/

@rayluo
Copy link
Collaborator

rayluo commented Sep 13, 2021

We will label this issue as "Internal" (rather than an "Enhancement"), because the only difference of MSAL dropping Python 2 is we the MSAL maintainers can use Python 3 in our code base. Our customers would not feel any difference.

By the way, dropping Python 2 is technically a removal of a behavior, so it would only happen with a major version bump. Libraries will announce the end of support in a stable release with a changelog entry like "this is the last version to support 2.7". The next stable release will require Python 3.7+. Bugfixes and new features will assume 3.7.

Also, core libraries like identity will move more slowly because they should be the last to drop 2.7 support. Same applies to MSAL.

@lmazuel
Copy link
Contributor

lmazuel commented Jan 5, 2022

@rayluo if that helps, SDK world dropped Python 2 on Jan 1st 2022:
Azure/azure-sdk-for-python#20691

@jiasli
Copy link
Contributor Author

jiasli commented Aug 18, 2022

I saw MSAL's CI still has tests for Python 2.7, 3.5 and 3.6:

image

Azure CLI (Azure/azure-cli#19858) and Azure Python SDK (https://github.com/Azure/azure-sdk-for-python/issues?q=is%3Aissue+is%3Aopen+drop+3.6) have now dropped Python 3.6.

Python 3.6 is out of security fixes since December 2021, meaning it’s not recommended to run Python code 3.6 anymore for customers. MSAL on Python 3.6 is potentially insecure as well.

@jiasli jiasli changed the title Drop Python 2 support Drop Python 2 and 3.6 support Aug 18, 2022
@yrro
Copy link

yrro commented Sep 22, 2022

FYI, RHEL 8 comes with Python 3.6, which will be maintained until May 2029.

@rayluo
Copy link
Collaborator

rayluo commented Sep 22, 2022

FYI, RHEL 8 comes with Python 3.6, which will be maintained until May 2029.

Thanks for the information. That same link indicates that RHEL even supports Python 2.7 until June 2024.

Regardless, most of the libraries in the ecosystem would probably, if they haven't already, drop old Python support in their release X.Y, long before those dates above. I guess someone in RHEL will then somehow pin their environment dependency as library Foo X.Y-1.

@rayluo rayluo linked a pull request May 16, 2025 that will close this issue
@rayluo
Copy link
Collaborator

rayluo commented May 16, 2025

Python 2 and Python 3.6 support was dropped since MSAL Python 1.28.

@rayluo rayluo closed this as completed May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants