Skip to content

Add typing_extensions for backwards compatibility #23180

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
wants to merge 1 commit into from
Closed

Add typing_extensions for backwards compatibility #23180

wants to merge 1 commit into from

Conversation

matthuisman
Copy link

@matthuisman matthuisman commented Apr 4, 2024

PR: #22741 switched to importing TypedDict and Literal in two different files which has broken Python 3.7 (they added to typing in 3.8)

This PR reverts those changes back to using typing_extensions

related issue:
#23179

@matthuisman matthuisman changed the title revert back to using typing_extensions [Pytest] revert back to using typing_extensions Apr 4, 2024
@matthuisman
Copy link
Author

@microsoft-github-policy-service agree

@matthuisman matthuisman changed the title [Pytest] revert back to using typing_extensions [Pytest] revert back to using typing_extensions (fixes python 3.7) Apr 4, 2024

from typing_extensions import Literal, TypedDict # noqa: E402
from testing_tools import socket_manager # noqa: E402
Copy link
Author

Choose a reason for hiding this comment

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

suspect this import here may also have failed without the sys.path change?

@matthuisman matthuisman changed the title [Pytest] revert back to using typing_extensions (fixes python 3.7) [Pytest] revert back to using typing_extensions (Fixes v2024.4.0 Py3.7 Regression) Apr 4, 2024
@karthiknadig
Copy link
Member

@matthuisman Thanks for the PR. We need to discuss internally about supporting 3.7 as it is no longer in support upstream.

@matthuisman
Copy link
Author

matthuisman commented Apr 4, 2024

was breaking 3.7 intentional?
I see the PR that made this change didn't remove other typing_extensions so looks to me like a mistake
Also nothing in the release notes etc :)

Be nice if there could be warning about it and some time for users to migrate etc

@karthiknadig
Copy link
Member

@matthuisman We have announced this in our release notes and blogs:

pytest dropped support as well:
image

We typically leave things as is until there is a change in underlying tools that we depend on. In this case, pytest dropped support for 3.7 we no longer need to preserve support for it in the testing features. For anyone who want to use python extension with 3.7 can pin the python extension version to the one where we still had support.

Python versions will drop on schedule and it is published here: https://devguide.python.org/versions/

@karthiknadig karthiknadig changed the title [Pytest] revert back to using typing_extensions (Fixes v2024.4.0 Py3.7 Regression) Add typing_extensions for backwards compatibility Apr 5, 2024
@luabud
Copy link
Member

luabud commented Apr 8, 2024

Hey @matthuisman, first of all, thank you so much for being interested in contributing to our extension! However, based on the comments above, we'll close this PR. In our contributing guide we specify that we may reject a PR for issues that don't have the "needs PR" label, like the issue linked in this PR. I apologize for this frustration but I hope this doesn't discourage you from submitting more contributions!

@luabud luabud closed this Apr 8, 2024
@oleksandr-yatsuk
Copy link

PySpark extensively uses Python 3.7 for example.
This change breaks all testing functionality on many dev machines

@karthiknadig
Copy link
Member

karthiknadig commented Apr 9, 2024

You can pin python extension to older version.

pyspark has also dropped 3.7 support:
image

@karthiknadig
Copy link
Member

Please use "Install another Version" from the extension view to pin the extension to previous version.
image

Python 3.7 has been out of support for over 6 months. We don't plan on restoring support for out of service version of python.

@microsoft microsoft locked as resolved and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants