scrapy / scrapy

Scrapy, a fast high-level web crawling & scraping framework for Python.
https://scrapy.org
BSD 3-Clause "New" or "Revised" License
50.99k stars 10.34k forks source link

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

Open wRAR opened 1 month ago

wRAR commented 1 month ago
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 commented 1 month ago

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!