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

poetry install not working on MacOS #1491

Closed
weaversa opened this issue Jan 26, 2023 · 7 comments · Fixed by #1493
Closed

poetry install not working on MacOS #1491

weaversa opened this issue Jan 26, 2023 · 7 comments · Fixed by #1493
Assignees
Labels
bug Something not working correctly remote-api Related to Cryptol's remote API tech-debt For issues that require some internal refactoring.

Comments

@weaversa
Copy link
Collaborator

On MacOS, I cannot get poetry install to work in either the saw-remote-api directory or the cryptol-remote-api directory. The reason is that typed-ast (1.4.3) builds with errors.

ast3/Python/ast.c:4514:9: error: implicit declaration of function '_PyUnicode_DecodeUnicodeEscape' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
            v = _PyUnicode_DecodeUnicodeEscape(s, len, NULL, &first_invalid_escape);

Any help would be appreciated.

@RyanGlScott RyanGlScott added remote-api Related to Cryptol's remote API tech-debt For issues that require some internal refactoring. bug Something not working correctly labels Jan 26, 2023
@RyanGlScott
Copy link
Contributor

Unfortunately, the typed-ast package simply does not build with Python 3.11+. A workaround is to downgrade to an older version of Python, but clearly that is not sustainable long-term.

Given that typed-ast is being end-of-life'd soon, we really should look into getting rid of this dependency. That being said, I'm not sure (from a quick glance) what is incurring this dependency, as we aren't directly depending on it in argo or cryptol-remote-api.

@RyanGlScott RyanGlScott self-assigned this Jan 26, 2023
@RyanGlScott
Copy link
Contributor

Ah, the typed-ast dependency is coming from mypy. Specifically, it's for mypy + Python 3.7 or earlier, as those versions of Python lacked certain capabilities than mypy needs. If I understand things correctly, then we should be able to drop the typed-ast dependency by simply upgrading the mypy version. I'll give that a try.

RyanGlScott added a commit to GaloisInc/argo that referenced this issue Jan 26, 2023
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 added a commit to GaloisInc/argo that referenced this issue Jan 26, 2023
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 added a commit to GaloisInc/argo that referenced this issue Jan 26, 2023
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 added a commit to GaloisInc/argo that referenced this issue Jan 26, 2023
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
Copy link
Contributor

@weaversa, do you mind checking out GaloisInc/argo#195 (i.e., the cryptol-T1491 branch of argo) and seeing if you can successfully run the following:

$ cd python
$ python update
$ python install

If so, that is a pretty good sign that the underlying issue has been fixed.

@weaversa
Copy link
Collaborator Author

poetry install worked!

RyanGlScott added a commit to GaloisInc/argo that referenced this issue Jan 30, 2023
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 added a commit that referenced this issue 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 that referenced this issue 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
Copy link
Contributor

I've released a new argo-client PyPI release with these changes here. #1493 makes corresponding changes on the cryptol-remote-api side.

RyanGlScott added a commit that referenced this issue 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.
@weaversa
Copy link
Collaborator Author

I've released a new argo-client PyPI release with these changes here. #1493 makes corresponding changes on the cryptol-remote-api side.

Thanks! Would you mind seeing that these changes are propagated to saw-remote-api as well (I think the python client there is so old it uses the cryptol-remote-api 2.12 version).

@RyanGlScott
Copy link
Contributor

Yes, definitely. See GaloisInc/saw-script#1809.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something not working correctly remote-api Related to Cryptol's remote API tech-debt For issues that require some internal refactoring.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants