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

Error when trying to run pip install -r requirements-dev.txt #67

Open
Omcsesz opened this issue Mar 26, 2024 · 1 comment
Open

Error when trying to run pip install -r requirements-dev.txt #67

Omcsesz opened this issue Mar 26, 2024 · 1 comment

Comments

@Omcsesz
Copy link

Omcsesz commented Mar 26, 2024

Hello, Team!

I got an error when I try to run pip install -r requirements-dev.txt:
ReqDevInstallDoesNotWork

Can you please support?

@steve-s
Copy link

steve-s commented Apr 15, 2024

Just passing by facing the same/similar problem. The issue is that one of the dependencies: typed-ast, which is not maintained anymore [0] (the authors suggest moving to the builtin module ast), has this code in it:

#include "code.h"

According to what's new in Python 3.11 [1]:

The non-limited API files cellobject.h, classobject.h, code.h, context.h, funcobject.h, genobject.h and longintrepr.h have been moved to the Include/cpython directory. Moreover, the eval.h header file was removed. These files must not be included directly, as they are already included in Python.h: Include Files. If they have been included directly, consider including Python.h instead. (Contributed by Victor Stinner in bpo-35134.)

Porting m2r2 from typed-ast to builtin ast module is probably the best long term fix. In the meanwhile, just replacing the

#include "code.h"

with

#include <Python.h>

should do, but requires patching the source of the dependency...

[0] python/typed_ast#179
[1] https://docs.python.org/3.11/whatsnew/3.11.html

Edit: it seems that typed-ast is a transitive dependency, so whoever depends on it needs to migrate to ast...

Edit2/TL;DR: it's mypy that needs to be updated

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

No branches or pull requests

2 participants