Title: inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes) · Issue #82103 · python/cpython · GitHub
Open Graph Title: inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes) · Issue #82103 · python/cpython
X Title: inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes) · Issue #82103 · python/cpython
Description: BPO 37922 Nosy @serhiy-storchaka, @tirkarthi, @cdonovick, @leonardt Superseder bpo-35113: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings Files inspect-getsource-issue.py: Code to...
Open Graph Description: BPO 37922 Nosy @serhiy-storchaka, @tirkarthi, @cdonovick, @leonardt Superseder bpo-35113: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings F...
X Description: BPO 37922 Nosy @serhiy-storchaka, @tirkarthi, @cdonovick, @leonardt Superseder bpo-35113: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings F...
Opengraph URL: https://github.com/python/cpython/issues/82103
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)","articleBody":"BPO | [37922](https://bugs.python.org/issue37922)\n--- | :---\nNosy | @serhiy-storchaka, @tirkarthi, @cdonovick, @leonardt\nSuperseder | \u003cli\u003ebpo-35113: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings\u003c/li\u003e\nFiles | \u003cli\u003e[inspect-getsource-issue.py](https://bugs.python.org/file48557/inspect-getsource-issue.py \"Uploaded as text/plain at 2019-08-22.22:46:07 by @leonardt\"): Code to reproduce the issue\u003c/li\u003e\n\n\u003csup\u003e*Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.*\u003c/sup\u003e\n\n\u003cdetails\u003e\u003csummary\u003eShow more details\u003c/summary\u003e\u003cp\u003e\n\nGitHub fields:\n```python\nassignee = None\nclosed_at = \u003cDate 2019-10-24.09:13:41.081\u003e\ncreated_at = \u003cDate 2019-08-22.22:46:07.221\u003e\nlabels = ['3.7', 'type-bug', 'library']\ntitle = 'inspect.getsource returns wrong class definition when multiple class definitions share the same name (but are defined in different scopes)'\nupdated_at = \u003cDate 2019-10-24.09:13:41.078\u003e\nuser = 'https://github.com/leonardt'\n```\n\nbugs.python.org fields:\n```python\nactivity = \u003cDate 2019-10-24.09:13:41.078\u003e\nactor = 'xtreak'\nassignee = 'none'\nclosed = True\nclosed_date = \u003cDate 2019-10-24.09:13:41.081\u003e\ncloser = 'xtreak'\ncomponents = ['Library (Lib)']\ncreation = \u003cDate 2019-08-22.22:46:07.221\u003e\ncreator = 'lennyt'\ndependencies = []\nfiles = ['48557']\nhgrepos = []\nissue_num = 37922\nkeywords = []\nmessage_count = 5.0\nmessages = ['350235', '350236', '350241', '350244', '355307']\nnosy_count = 4.0\nnosy_names = ['serhiy.storchaka', 'xtreak', 'donovick', 'lennyt']\npr_nums = []\npriority = 'normal'\nresolution = 'duplicate'\nstage = 'resolved'\nstatus = 'closed'\nsuperseder = '35113'\ntype = 'behavior'\nurl = 'https://bugs.python.org/issue37922'\nversions = ['Python 3.7']\n```\n\n\u003c/p\u003e\u003c/details\u003e\n","author":{"url":"https://github.com/leonardt","@type":"Person","name":"leonardt"},"datePublished":"2019-08-22T22:46:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/82103/cpython/issues/82103"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d39fbae7-a0a7-530d-0c1d-192fb2d45324 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE5E:24E7C6:CAC165:114A8FF:6A521051 |
| html-safe-nonce | dd438c8992f52987694d2f4a45fb25e4b8f2c4bd5ccad9b4c6cc0b3e9c6c4744 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTVFOjI0RTdDNjpDQUMxNjU6MTE0QThGRjo2QTUyMTA1MSIsInZpc2l0b3JfaWQiOiI4Nzc0MjE1NjAzMDQ3MjM5NzYxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 2660f795189fda3e968f5c620fb2e5c45e68f45625f7bbc70c1047556b447414 |
| hovercard-subject-tag | issue:1199018240 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/82103/issue_layout |
| twitter:image | https://opengraph.githubassets.com/319dd77a0df32b42025c36a93670b61d2b5d0939dbd4a6e4e6dced012b6184fa/python/cpython/issues/82103 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/319dd77a0df32b42025c36a93670b61d2b5d0939dbd4a6e4e6dced012b6184fa/python/cpython/issues/82103 |
| og:image:alt | BPO 37922 Nosy @serhiy-storchaka, @tirkarthi, @cdonovick, @leonardt Superseder bpo-35113: inspect.getsource returns incorrect source for classes when class definition is part of multiline strings F... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | leonardt |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width