Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

typed-ast end of life? #170

Closed
srittau opened this issue Nov 9, 2021 · 12 comments
Closed

typed-ast end of life? #170

srittau opened this issue Nov 9, 2021 · 12 comments

Comments

@srittau
Copy link
Collaborator

srittau commented Nov 9, 2021

I suggest we officially end of life typed-ast:

  • Officially stop support after Python 3.10 (i.e. close Compilation fails on Python 3.11 #167).
  • Add recommendation to use ast on Python 3.8+ in the package's long_description and more prominently in the README.
  • Add < 3.11 to python_requires.

We can keep maintaining it until 3.7 (or 3.10) reaches end of life, and improved ast is generally available.

@hauntsaninja
Copy link
Collaborator

Bullet point 2 sounds good to me.

I'm opposed to point 1... I think typed_ast will continue to have value until 3.7 reaches EOL, and I'm happy to accept PRs from people fixing real issues like #167 / I'm happy to make releases.

Open source is always best effort, so if in a year no effort has surfaced to get things working on 3.11, we can do bullet point 3.

@srittau
Copy link
Collaborator Author

srittau commented Nov 10, 2021

Adding python_requires is about setting expectations. Sure, if we receive a PR to support 3.11, we can lift that restriction, but without it, people expect that typed_ast will work on 3.11. By setting it, we communicate clearly that it doesn't.

My amended suggestion:

  • Keep Compilation fails on Python 3.11 #167 open for now.
  • Add recommendation to use ast on Python 3.8+ in the package's long_description and more prominently in the README.
  • Add < 3.11 to python_requires, until we receive a PR that lifts that restriction.
  • Archive this project after 3.7 reaches end of life.

@JukkaL
Copy link
Collaborator

JukkaL commented Nov 10, 2021

This seems fine to me, if we can wait until 3.7 EoL (and are open to making a 3.11 compatible release, in case somebody makes a PR).

StevenMaude added a commit to opensafely-core/opensafely-cli that referenced this issue Nov 11, 2021
Apart from updating, this also removes the typed-ast dependency that
doesn't exist as a wheel for Python 3.10, and seems to be no longer
[actively developed](python/typed_ast#170).
StevenMaude added a commit to opensafely-core/opensafely-cli that referenced this issue Nov 11, 2021
Apart from updating, this also removes the typed-ast dependency that
doesn't exist as a wheel for Python 3.10, and seems to be no longer
[actively developed](python/typed_ast#170).
StevenMaude added a commit to opensafely-core/opensafely-cli that referenced this issue Nov 11, 2021
Apart from updating, this also removes the typed-ast dependency that
doesn't exist as a wheel for Python 3.10, and seems to be no longer
[actively developed](python/typed_ast#170).
@vstinner
Copy link
Member

vstinner commented Dec 2, 2021

I hit #167 issue on Python 3.11 while trying to port mypyc to Python 3.11 (to test my PR): python/mypy#11652

I proposed a simple fix to port typed_ast to Python 3.11: #176

Right now, mypyc still requires typed_ast, so making it compatible with Python 3.11 solves a practical issue ;-)

@srittau
Copy link
Collaborator Author

srittau commented Dec 2, 2021

Since @vstinner fixed #167 and we now suggest to use ast, my proposal is now basically down to "archive this project after 3.7 reaches end of life".

@vstinner
Copy link
Member

vstinner commented Dec 2, 2021

Well, you can still plan the death of the project if you want, but in that case, please help users (like mypy) to migrate to something else ;-) typed_ast seems to be quite popular: https://libraries.io/pypi/typed-ast

  • Dependent packages: 277
  • Dependent repositories: 5.18K

@srittau
Copy link
Collaborator Author

srittau commented Dec 2, 2021

We will most likely keep typed_ast around for a bit even after 3.7 reaches end of life, but upgrading to ast (Python 3.8+) should be fairly trivial. Current users often still support Python 3.6 or 3.7.

@JelleZijlstra
Copy link
Member

I don't know what the packages depending on typed-ast are using it for, but typed-ast can't parse Python 3.8+, so they probably should look for something else.

mypy and black need typed-ast only for parsing under old versions of Python, and should be able to drop usage when they drop those old Python versions.

@srittau
Copy link
Collaborator Author

srittau commented Dec 2, 2021

(Also, archiving the project does not mean that typed-ast is gone from pypi, just that it won't receive any updates.)

@hauntsaninja
Copy link
Collaborator

my proposal is now basically down to "archive this project after 3.7 reaches end of life".

To avoid user confusion, I summarised this in #179

@JelleZijlstra
Copy link
Member

JelleZijlstra commented Dec 2, 2021

I'm going to keep posting here to avoid bringing confusion to the other issue :)

I realized that tools that want to consume stub files and support only 3.6+ already don't need to use typed-ast, because ast.parse in 3.6 should support everything stub files support. This affects my typeshed-client project: JelleZijlstra/typeshed_client#30.

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Dec 3, 2021

@hauntsaninja @JelleZijlstra Just as a quick suggestion, to further avoid user confusion :) , I'd suggest locking #179 as resolved so only collaborators can post, and bolding/unparenthesizing your redirect at the bottom. In my experience with similar issues, unfortunately all too many users miss such things, so its best to be proactive.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants