Skip to content
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

[Bug]: typed-ast dependency has been archived for Python 3.8+ #5054

Closed
phvalguima opened this issue Sep 26, 2024 · 9 comments · Fixed by #5058
Closed

[Bug]: typed-ast dependency has been archived for Python 3.8+ #5054

phvalguima opened this issue Sep 26, 2024 · 9 comments · Fixed by #5058
Assignees
Labels
bug Something isn't working maintenance

Comments

@phvalguima
Copy link

Describe the bug

Following the comments upstream, typed-ast package has been archived:

And both Debian and Ubuntu are removing python3-typed-ast from their repos:

The overall recommendation is to move forward to use standard lib's ast module instead for Python 3.8+. Is there any reason we still need this legacy dependency?

To reproduce

--

Expected behavior

No response

Screenshots

No response

Host / Environment

No response

Additional context

No response

Relevant log output

No response

@phvalguima phvalguima added bug Something isn't working untriaged Issues that have not yet been triaged labels Sep 26, 2024
@gaiksaya
Copy link
Member

gaiksaya commented Sep 26, 2024

[Triage] Thank you for opening the issue @phvalguima
Looks like its is recommended to use ast

 The ast module of Python 3.8+ supports all features of typed_ast. typed_ast does not support parsing code that uses syntax introduced in Python 3.8 onwards. We recommend using ast on Python 3.8 or above.

Adding @peterzhuamazon to take a look. Thanks!

@peterzhuamazon
Copy link
Member

The original usage of this package comes from this PR by @prudhvigodithi :

@peterzhuamazon
Copy link
Member

Judging by the code I dont see this is being used anywhere tho.

Also mypy and pytest both pass:

Success: no issues found in 415 source files

938 passed, 4 warnings in 168.43s (0:02:48)

@peterzhuamazon
Copy link
Member

Sending a PR:

Also ask @prudhvigodithi to take a look as I dont think it is actually used, can remove. Thanks.

@prudhvigodithi
Copy link
Collaborator

Coming from https://github.com/opensearch-project/opensearch-build/pull/2438/files#r945288056 I just added it back (since it was part of Pip lock file) which was removed, I will double check to see the dependency.
Thanks

@prudhvigodithi
Copy link
Collaborator

Coming from #5058 I have cloned the fork and ran ./release_notes.sh check manifests/2.17.0/opensearch-2.17.0.yml --date 2024-07-26, it dint complain for typed-ast but failed for idna, after adding idna = "~=3.10" to PipFile it started to work.
@gaiksaya @peterzhuamazon

@gaiksaya
Copy link
Member

gaiksaya commented Sep 26, 2024

Thanks! Else we can go with the recommendation to use ast just to be safe as to not break any functionality (compile or runtime)

@peterzhuamazon
Copy link
Member

Thanks! Else we can go with the recommendation to use ast just to be safe as to not break any functionality (compile or runtime)

I dont think ast is a drop in replacement because we didnt call typed-ast at all. ast is a builtin for python 3.8 and up.

@peterzhuamazon
Copy link
Member

Coming from #5058 I have cloned the fork and ran ./release_notes.sh check manifests/2.17.0/opensearch-2.17.0.yml --date 2024-07-26, it dint complain for typed-ast but failed for idna, after adding idna = "~=3.10" to PipFile it started to work. @gaiksaya @peterzhuamazon

Thanks, updated PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working maintenance
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants