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

Python: Avoid typed-ast dependency #195

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Python: Avoid typed-ast dependency #195

merged 1 commit into from
Jan 30, 2023

Conversation

RyanGlScott
Copy link
Contributor

The typed-ast package is being end-of-life'd soon. See python/typed_ast#179. Moreover, it is causing issues when building with Python 3.11+. See GaloisInc/cryptol#1491. Thankfully, typed-ast is no longer required if you use sufficiently new versions of mypy and Python. This patch raises the lower version bounds to make it possible to shed the typed-ast dependency entirely.

@RyanGlScott RyanGlScott requested a review from kquick January 26, 2023 19:20
@RyanGlScott RyanGlScott force-pushed the cryptol-T1491 branch 2 times, most recently from 6d75db7 to d00a3a0 Compare January 26, 2023 20:09
The `typed-ast` package is being end-of-life'd soon. See python/typed_ast#179.
Moreover, it is causing issues when building with Python 3.11+. See
GaloisInc/cryptol#1491.  Thankfully, `typed-ast` is no longer required if you
use sufficiently new versions of `mypy` and Python. This patch raises the lower
version bounds to make it possible to shed the `typed-ast` dependency entirely.
@@ -51,7 +51,7 @@ jobs:
poetry install
- name: Typecheck python code
working-directory: ./python
run: poetry run mypy argo_client
run: poetry run mypy --install-types --non-interactive argo_client
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is a bit unfortunate, but perhaps unavoidable. mypy-0.900 do not install third-party libraries' type packages unless you explicitly opt in to it with --install-types. Moreover, I'm unclear if it's possible to make mypy always use --install-types as a pyproject.toml configuration option. At the very least, I can't find anything about this in the list of configuration options.

@RyanGlScott RyanGlScott merged commit 80194cc into master Jan 30, 2023
@RyanGlScott RyanGlScott deleted the cryptol-T1491 branch January 30, 2023 12:53
RyanGlScott added a commit to GaloisInc/cryptol that referenced this pull request Jan 30, 2023
This patch:

* Bumps the `mypy` lower bounds to avoid incurring a dependency on `typed-ast`,
  which is being EOL'd soon. See python/typed_ast#179.
* Bumps the `argo` lower bounds to bring in the changes from
  GaloisInc/argo#195, which makes corresponding changes on the `argo` side.

Fixes #1491.
RyanGlScott added a commit to GaloisInc/cryptol that referenced this pull request Jan 30, 2023
This patch:

* Bumps the `mypy` lower bounds to avoid incurring a dependency on `typed-ast`,
  which is being EOL'd soon. See python/typed_ast#179.
* Bumps the `argo` lower bounds to bring in the changes from
  GaloisInc/argo#195, which makes corresponding changes on the `argo` side.

Fixes #1491.
RyanGlScott added a commit to GaloisInc/cryptol that referenced this pull request Jan 30, 2023
This patch:

* Bumps the `mypy` lower bounds to avoid incurring a dependency on `typed-ast`,
  which is being EOL'd soon. See python/typed_ast#179.
* Bumps the `argo` lower bounds to bring in the changes from
  GaloisInc/argo#195, which makes corresponding changes on the `argo` side.

Fixes #1491.
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Jan 30, 2023
This patch:

* Bumps the `mypy` lower bounds to avoid incurring a dependency on `typed-ast`,
  which is being EOL'd soon. See python/typed_ast#179.
* Bumps the `argo` submodule to bring in the changes from
  GaloisInc/argo#195, which makes corresponding changes on the `argo` side.
* Bumps the `cryptol` submodule to bring in the changes from
  GaloisInc/cryptol#1493, which makes the corresponding changes on the `cryptol`
  side.
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Jan 31, 2023
This patch:

* Bumps the `mypy` lower bounds to avoid incurring a dependency on `typed-ast`,
  which is being EOL'd soon. See python/typed_ast#179.
* Bumps the `argo` submodule to bring in the changes from
  GaloisInc/argo#195, which makes corresponding changes on the `argo` side.
* Bumps the `cryptol` submodule to bring in the changes from
  GaloisInc/cryptol#1493, which makes the corresponding changes on the `cryptol`
  side.
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Jan 31, 2023
This patch:

* Bumps the `mypy` lower bounds to avoid incurring a dependency on `typed-ast`,
  which is being EOL'd soon. See python/typed_ast#179.
* Bumps the `argo` submodule to bring in the changes from
  GaloisInc/argo#195, which makes corresponding changes on the `argo` side.
* Bumps the `cryptol` submodule to bring in the changes from
  GaloisInc/cryptol#1493, which makes the corresponding changes on the `cryptol`
  side.
RyanGlScott added a commit to GaloisInc/saw-script that referenced this pull request Jan 31, 2023
This patch:

* Bumps the `mypy` lower bounds to avoid incurring a dependency on `typed-ast`,
  which is being EOL'd soon. See python/typed_ast#179.
* Bumps the `argo` submodule to bring in the changes from
  GaloisInc/argo#195, which makes corresponding changes on the `argo` side.
* Bumps the `cryptol` submodule to bring in the changes from
  GaloisInc/cryptol#1493, which makes the corresponding changes on the `cryptol`
  side.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants