Title: [ExceptionGroup] Inconsistent raise inside except* · Issue #103590 · python/cpython · GitHub
Open Graph Title: [ExceptionGroup] Inconsistent raise inside except* · Issue #103590 · python/cpython
X Title: [ExceptionGroup] Inconsistent raise inside except* · Issue #103590 · python/cpython
Description: Bug report When raising inside except* block and the caught exception wasn't an ExceptionGroup originally, then raised exception doesn't get wrapped in ExceptionGroup: try: try: raise TypeError(1) # prints ValueError(3) raise ExceptionGr...
Open Graph Description: Bug report When raising inside except* block and the caught exception wasn't an ExceptionGroup originally, then raised exception doesn't get wrapped in ExceptionGroup: try: try: raise TypeError(1) ...
X Description: Bug report When raising inside except* block and the caught exception wasn't an ExceptionGroup originally, then raised exception doesn't get wrapped in ExceptionGroup: try: try: raise TypeE...
Opengraph URL: https://github.com/python/cpython/issues/103590
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ExceptionGroup] Inconsistent raise inside except*","articleBody":"\u003c!--\r\n If you're new to Python and you're not sure whether what you're experiencing is a bug, the CPython issue tracker is not\r\n the right place to seek help. Consider the following options instead:\r\n\r\n - reading the Python tutorial: https://docs.python.org/3/tutorial/\r\n - posting in the \"Users\" category on discuss.python.org: https://discuss.python.org/c/users/7\r\n - emailing the Python-list mailing list: https://mail.python.org/mailman/listinfo/python-list\r\n - searching our issue tracker (https://github.com/python/cpython/issues) to see if\r\n your problem has already been reported\r\n-->\r\n\r\n# Bug report\r\nWhen raising inside except* block and the caught exception wasn't an ExceptionGroup originally, then raised exception doesn't get wrapped in ExceptionGroup:\r\n```py\r\ntry:\r\n try:\r\n raise TypeError(1) # prints ValueError(3)\r\n raise ExceptionGroup('', [TypeError(2)]) # prints ExceptionGroup('', [ValueError(3)])\r\n except* TypeError:\r\n raise ValueError(3)\r\nexcept BaseException as e:\r\n print(repr(e))\r\n```\r\n\r\n# Your environment\r\n\r\n\u003c!-- Include as many relevant details as possible about the environment you experienced the bug in -->\r\n\r\n- CPython versions tested on: 3.11.3\r\n- Operating system and architecture: Windows 11 / Ubuntu 22.04\r\n\r\n\u003c!--\r\nYou can freely edit this text. Remove any lines you believe are unnecessary.\r\n-->\r\n\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-103665\n* gh-104094\n* gh-104095\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/andriilahuta","@type":"Person","name":"andriilahuta"},"datePublished":"2023-04-17T14:34:03Z","url":"https://github.com/python/cpython/issues/103590"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:03c37f33-dd05-db59-8450-282052eb988f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FFA:34F10E:E14685:12DFE41:6B064BB9 |
| html-safe-nonce | aec37fcee3275dc3f5be0ad333fe0c54037b708b188f1e7e0e50f159470da486 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkZBOjM0RjEwRTpFMTQ2ODU6MTJERkU0MTo2QjA2NEJCOSIsInZpc2l0b3JfaWQiOiI2OTkwMjM2MjI4Njg4MTY5OTEzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d4c819e498fac6ff38ae55c11566068046f7ae15f5faa50c34efe38ce04a6186 |
| hovercard-subject-tag | issue:1671335697 |
| 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/103590/issue_layout |
| twitter:image | https://opengraph.githubassets.com/03d1dbad500c33a37761a3c4117d115fcd6f066f2dd6590352e61163974fe263/python/cpython/issues/103590 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/03d1dbad500c33a37761a3c4117d115fcd6f066f2dd6590352e61163974fe263/python/cpython/issues/103590 |
| og:image:alt | Bug report When raising inside except* block and the caught exception wasn't an ExceptionGroup originally, then raised exception doesn't get wrapped in ExceptionGroup: try: try: raise TypeError(1) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andriilahuta |
| hostname | github.com |
| expected-hostname | github.com |
| None | 772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e |
| 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 | f1f9a08f7c769a37f1dfc18ad43d463c222a7eea |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width