Title: Fix unintended behavior change in elementtree introduced in #114269 · Issue #114737 · python/cpython · GitHub
Open Graph Title: Fix unintended behavior change in elementtree introduced in #114269 · Issue #114737 · python/cpython
X Title: Fix unintended behavior change in elementtree introduced in #114269 · Issue #114737 · python/cpython
Description: Bug report Bug description: As it was discussed here, after merging of #114269 it.root is no longer None once an iterator is created. There was no intention to change this, it should be reverted. Meanwhile, I think it will be good to add...
Open Graph Description: Bug report Bug description: As it was discussed here, after merging of #114269 it.root is no longer None once an iterator is created. There was no intention to change this, it should be reverted. M...
X Description: Bug report Bug description: As it was discussed here, after merging of #114269 it.root is no longer None once an iterator is created. There was no intention to change this, it should be reverted. M...
Opengraph URL: https://github.com/python/cpython/issues/114737
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Fix unintended behavior change in elementtree introduced in #114269","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\nAs it was discussed [here](https://github.com/python/cpython/pull/114269#discussion_r1468734070), after merging of #114269 `it.root` is no longer `None` once an iterator is created. There was no intention to change this, it should be reverted.\r\n\r\nMeanwhile, I think it will be good to add test for `root` attribute.\r\n - Right after function returned iterator: `it.root` must be `None`.\r\n - After iterator exhaustion: `it.root` must be an instance of `xml.etree.ElementTree.Element`.\r\n\r\n### CPython versions tested on:\r\n\r\nCPython main branch\r\n\r\n### Operating systems tested on:\r\n\r\nOther\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-114755\n* gh-114798\n* gh-114799\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Prometheus3375","@type":"Person","name":"Prometheus3375"},"datePublished":"2024-01-29T22:47:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/114737/cpython/issues/114737"}
| 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:bf6d9cae-4a2f-5e6e-1e78-c4f78b0c1a38 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AA6A:2DE4E0:1A085:214D5:696B314F |
| html-safe-nonce | cf85c6684b3de64e451788cff3f88dbbc804aa95dd200686db61452a0a429443 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQTZBOjJERTRFMDoxQTA4NToyMTRENTo2OTZCMzE0RiIsInZpc2l0b3JfaWQiOiIyNzYyMzE3ODIxNzM3OTA2NTExIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5461a4771a33a55049d9355a7397c05c6aef83bfdd3b4fbeaf4b763883302784 |
| hovercard-subject-tag | issue:2106573034 |
| 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/114737/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c334e24731d6e86fa50402ecbd77d8ea87978f78f30af98f2217d1a109cd029a/python/cpython/issues/114737 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c334e24731d6e86fa50402ecbd77d8ea87978f78f30af98f2217d1a109cd029a/python/cpython/issues/114737 |
| og:image:alt | Bug report Bug description: As it was discussed here, after merging of #114269 it.root is no longer None once an iterator is created. There was no intention to change this, it should be reverted. M... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Prometheus3375 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width