This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2020年04月18日 11:50 by Grzegorz Krasoń, last changed 2022年04月11日 14:59 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| demo.py | Grzegorz Krasoń, 2020年04月18日 11:50 | Example | ||
| Messages (5) | |||
|---|---|---|---|
| msg366701 - (view) | Author: Grzegorz Krasoń (Grzegorz Krasoń) | Date: 2020年04月18日 11:50 | |
Based on the attached example: Expected output: ``` 123 class Number: payload = 123 321 class Number: payload = 321 ``` Actual output: ``` 123 class Number: payload = 123 321 class Number: payload = 123 ``` Reproduced using: * Python 2.7.17 * Python 3.7.7 * Python 3.8.2 |
|||
| msg366719 - (view) | Author: Karthikeyan Singaravelan (xtreak) * (Python committer) | Date: 2020年04月18日 14:30 | |
This will be resolved hopefully resolved using https://github.com/python/cpython/pull/10307 . Using my patch on the reproducer in the report. ./python bpo40317.py 123 class Number: payload = 123 321 class Number: payload = 321 |
|||
| msg366728 - (view) | Author: Karthikeyan Singaravelan (xtreak) * (Python committer) | Date: 2020年04月18日 16:34 | |
Fixed in master now with https://github.com/python/cpython/commit/696136b993e11b37c4f34d729a0375e5ad544ade . This includes the change of show decorators for classes too to make it consistent with functions so it's not backported. |
|||
| msg367579 - (view) | Author: Ammar Askar (ammar2) * (Python committer) | Date: 2020年04月28日 23:52 | |
Did you mean to close this Karthik? |
|||
| msg367619 - (view) | Author: Karthikeyan Singaravelan (xtreak) * (Python committer) | Date: 2020年04月29日 03:37 | |
yes, thanks Ammar. Thanks Grzegorz for the report. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:29 | admin | set | github: 84497 |
| 2020年04月29日 03:37:05 | xtreak | set | status: open -> closed versions: + Python 3.9, - Python 2.7, Python 3.7, Python 3.8 superseder: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings messages: + msg367619 resolution: duplicate stage: resolved |
| 2020年04月28日 23:52:00 | ammar2 | set | nosy:
+ ammar2 messages: + msg367579 |
| 2020年04月18日 16:34:05 | xtreak | set | messages: + msg366728 |
| 2020年04月18日 14:30:24 | xtreak | set | nosy:
+ xtreak messages: + msg366719 |
| 2020年04月18日 11:50:37 | Grzegorz Krasoń | create | |