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

ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead #6305

Open
wRAR opened this issue Apr 2, 2024 · 1 comment · May be fixed by #6306
Open

ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead #6305

wRAR opened this issue Apr 2, 2024 · 1 comment · May be fixed by #6306

Comments

@wRAR
Copy link
Member

wRAR commented Apr 2, 2024

scrapy/utils/misc.py:249: DeprecationWarning: ast.NameConstant is deprecated and will be removed in Python 3.14; use ast.Constant instead
    value is None or isinstance(value, ast.NameConstant) and value.value is None

Also, if I understand it correctly isinstance(value, ast.NameConstant) is always False, as ast.NameConstant() returns an ast.Constant instance, so I wonder if this case is covered by a test.

@lizdenhup
Copy link

Hello! I would like to contribute to this project. Here is my PR addressing this issue.

Please let me know if you have any questions, concerns or suggestions at your convenience. Thank you!

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

Successfully merging a pull request may close this issue.

2 participants