Issue33851
Created on 2018-06-13 11:25 by mgedmin, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 7682 | merged | serhiy.storchaka, 2018-06-13 12:14 | |
| PR 7701 | merged | miss-islington, 2018-06-15 08:05 | |
| Messages (8) | |||
|---|---|---|---|
| msg319453 - (view) | Author: Marius Gedminas (mgedmin) * | Date: 2018-06-13 11:25 | |
Python 3.7 removes an isinstance(node.body[0], Expr) check ast.get_docstring() that makes it crash when you pass in AST nodes of modules or functions that do not have docstrings. Steps to reproduce: - git clone https://github.com/mgedmin/findimports - cd findimports - tox -e py37 The failure looks like this: Traceback (most recent call last): ... File "/home/mg/src/findimports/findimports.py", line 337, in find_imports_and_track_names visitor.visit(root) File "/home/mg/opt/python37/lib/python3.7/ast.py", line 262, in visit return visitor(node) File "/home/mg/src/findimports/findimports.py", line 169, in visitSomethingWithADocstring self.processDocstring(ast.get_docstring(node, clean=False), lineno) File "/home/mg/opt/python37/lib/python3.7/ast.py", line 211, in get_docstring node = node.body[0].value AttributeError: 'Import' object has no attribute 'value' |
|||
| msg319455 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2018-06-13 12:15 | |
I think this fix is worth cherry-picking in 3.7.0. |
|||
| msg319592 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2018-06-15 08:05 | |
New changeset 08f127a3cad8ce4eb281d30d9488c91b0fd7cfed by Serhiy Storchaka in branch 'master': bpo-33851: Fix ast.get_docstring() for a node that lacks a docstring. (GH-7682) https://github.com/python/cpython/commit/08f127a3cad8ce4eb281d30d9488c91b0fd7cfed |
|||
| msg319595 - (view) | Author: miss-islington (miss-islington) | Date: 2018-06-15 08:25 | |
New changeset a50b825c18a92655f3dd7939e793fa3d4440d886 by Miss Islington (bot) in branch '3.7': bpo-33851: Fix ast.get_docstring() for a node that lacks a docstring. (GH-7682) https://github.com/python/cpython/commit/a50b825c18a92655f3dd7939e793fa3d4440d886 |
|||
| msg320339 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2018-06-23 23:42 | |
@mgedmin, Just to be certain, are you able to verify that the change in PR 7701 fixes the problem you see with 3.7.0rc1? |
|||
| msg320419 - (view) | Author: Marius Gedminas (mgedmin) * | Date: 2018-06-25 12:25 | |
I've ran my findimports testsuite with CPython's git commit a50b825c18a92655f3dd7939e793fa3d4440d886 and my tests passed, so yes. |
|||
| msg320632 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2018-06-27 22:34 | |
New changeset 235d0fb93cb456701ce24fad2bc307e9f0312d73 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33851: Fix ast.get_docstring() for a node that lacks a docstring. (GH-7682) https://github.com/python/cpython/commit/235d0fb93cb456701ce24fad2bc307e9f0312d73 |
|||
| msg320640 - (view) | Author: Ned Deily (ned.deily) * ![]() |
Date: 2018-06-28 01:29 | |
Fixed in 3.7.0. Thanks, everyone! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:01 | admin | set | github: 78032 |
| 2018-06-28 01:29:04 | ned.deily | set | status: open -> closed priority: release blocker -> messages: + msg320640 resolution: fixed |
| 2018-06-27 22:34:50 | ned.deily | set | messages: + msg320632 |
| 2018-06-25 12:25:23 | mgedmin | set | messages: + msg320419 |
| 2018-06-23 23:42:09 | ned.deily | set | messages: + msg320339 |
| 2018-06-15 08:25:21 | miss-islington | set | nosy:
+ miss-islington messages: + msg319595 |
| 2018-06-15 08:24:33 | serhiy.storchaka | set | assignee: ned.deily |
| 2018-06-15 08:05:38 | miss-islington | set | pull_requests: + pull_request7317 |
| 2018-06-15 08:05:18 | serhiy.storchaka | set | messages: + msg319592 |
| 2018-06-13 12:16:12 | serhiy.storchaka | set | nosy:
+ methane |
| 2018-06-13 12:15:50 | serhiy.storchaka | set | priority: normal -> release blocker versions: + Python 3.8 nosy: + serhiy.storchaka, ned.deily messages: + msg319455 |
| 2018-06-13 12:14:29 | serhiy.storchaka | set | keywords:
+ patch stage: patch review pull_requests: + pull_request7294 |
| 2018-06-13 11:25:47 | mgedmin | create | |
