Title: The FixRaise in fix_raise can't fix the py2 code into 2/3 compatible when exception followed by a traceback. · Issue #643 · PythonCharmers/python-future · GitHub
Open Graph Title: The FixRaise in fix_raise can't fix the py2 code into 2/3 compatible when exception followed by a traceback. · Issue #643 · PythonCharmers/python-future
X Title: The FixRaise in fix_raise can't fix the py2 code into 2/3 compatible when exception followed by a traceback. · Issue #643 · PythonCharmers/python-future
Description: The py2 code is here import sys traceback = sys.exc_info()[2] raise ValueError, "wrong value", traceback The code generated by futurize is here import sys traceback = sys.exc_info()[2] raise ValueError("wrong value").with_traceback(trace...
Open Graph Description: The py2 code is here import sys traceback = sys.exc_info()[2] raise ValueError, "wrong value", traceback The code generated by futurize is here import sys traceback = sys.exc_info()[2] raise ValueE...
X Description: The py2 code is here import sys traceback = sys.exc_info()[2] raise ValueError, "wrong value", traceback The code generated by futurize is here import sys traceback = sys.exc_info()[2] ra...
Opengraph URL: https://github.com/PythonCharmers/python-future/issues/643
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The FixRaise in fix_raise can't fix the py2 code into 2/3 compatible when exception followed by a traceback.","articleBody":"The py2 code is here\r\n```python\r\nimport sys\r\n\r\ntraceback = sys.exc_info()[2]\r\n\r\nraise ValueError, \"wrong value\", traceback\r\n```\r\nThe code generated by futurize is here\r\n```python\r\nimport sys\r\n\r\ntraceback = sys.exc_info()[2]\r\n\r\nraise ValueError(\"wrong value\").with_traceback(traceback)\r\n```\r\nThe second one is only legal on python3.\r\nI think that it is reasonable to fix the exception with traceback by use the function future.utils.raise_()","author":{"url":"https://github.com/bulbyang","@type":"Person","name":"bulbyang"},"datePublished":"2024-07-25T08:13:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/643/python-future/issues/643"}
| 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:e985a81a-a219-b8a5-a2ec-992272a10f0a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9174:809B4:1782C40:1FBDEE8:696EAB90 |
| html-safe-nonce | 94487b210dc823919e47f20def095d5af650e449e493474d2c54fcc2f6882145 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTc0OjgwOUI0OjE3ODJDNDA6MUZCREVFODo2OTZFQUI5MCIsInZpc2l0b3JfaWQiOiI2NjExNzY2MTM3MTk0NDU4MDAwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 107dfe18b7dd363aa0bf945d4dd189316889d87fc40a5dde0ecea662e8f48533 |
| hovercard-subject-tag | issue:2429327882 |
| 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/PythonCharmers/python-future/643/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6e4c1702c024ac592ff13f0d7451ffa3f5cb8fbb871aa7f370650cd0fef27629/PythonCharmers/python-future/issues/643 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6e4c1702c024ac592ff13f0d7451ffa3f5cb8fbb871aa7f370650cd0fef27629/PythonCharmers/python-future/issues/643 |
| og:image:alt | The py2 code is here import sys traceback = sys.exc_info()[2] raise ValueError, "wrong value", traceback The code generated by futurize is here import sys traceback = sys.exc_info()[2] raise ValueE... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bulbyang |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdad15fd2ad43212aa8b8be5f2c2725550f8374ceeeb154a999ad9145b43f3f7 |
| turbo-cache-control | no-preview |
| go-import | github.com/PythonCharmers/python-future git https://github.com/PythonCharmers/python-future.git |
| octolytics-dimension-user_id | 3365815 |
| octolytics-dimension-user_login | PythonCharmers |
| octolytics-dimension-repository_id | 11403699 |
| octolytics-dimension-repository_nwo | PythonCharmers/python-future |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 11403699 |
| octolytics-dimension-repository_network_root_nwo | PythonCharmers/python-future |
| 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 | 27b23bc056eb973d350fc95afc848757edb9e7a9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width