| route-pattern | /:user_id/:repository/pull/:id/commits/:range(.:format) |
| route-controller | pull_requests |
| route-action | commits |
| fetch-nonce | v2:7f64a50f-0576-fa8a-b544-dfab233c5288 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E5AC:384EC7:AE8F4D:E8D1AF:69963B59 |
| html-safe-nonce | 71ac4c5df7bda613d2f3bbd17af0932034d01917fc859013a48ea6043aa9816b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUFDOjM4NEVDNzpBRThGNEQ6RThEMUFGOjY5OTYzQjU5IiwidmlzaXRvcl9pZCI6IjIwODk0MjU1Nzg5NDQyNDg2NjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | babd6b1997fc6d8a4e965ba09383f7bba86501bfe3243afe7542996dfe5ac1cc |
| hovercard-subject-tag | pull_request:2947689996 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/commits |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
| twitter:image | https://avatars.githubusercontent.com/u/78818069?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/78818069?s=400&v=4 |
| og:image:alt | When iterparse() opens a file by filename and is not explicitly closed, emit a ResourceWarning to alert developers of the resource leak.
This implements the TODO comment at line 1270 of ElementTree... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | bb5fc598983958d677e5179b50e71c2bfa2a8ac1568110d429775cd645bbe799 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | ddb60c6732f32ef004e33aed240bef867c5f545f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F140603%2Fcommits%2F0f9b5094c712f8ca8093017140f1af78a191b965 |
| GitHub CopilotWrite better code with AI | https://github.com/features/copilot |
| GitHub SparkBuild and deploy intelligent apps | https://github.com/features/spark |
| GitHub ModelsManage and compare prompts | https://github.com/features/models |
| MCP RegistryNewIntegrate external tools | https://github.com/mcp |
| ActionsAutomate any workflow | https://github.com/features/actions |
| CodespacesInstant dev environments | https://github.com/features/codespaces |
| IssuesPlan and track work | https://github.com/features/issues |
| Code ReviewManage code changes | https://github.com/features/code-review |
| GitHub Advanced SecurityFind and fix vulnerabilities | https://github.com/security/advanced-security |
| Code securitySecure your code as you build | https://github.com/security/advanced-security/code-security |
| Secret protectionStop leaks before they start | https://github.com/security/advanced-security/secret-protection |
| Why GitHub | https://github.com/why-github |
| Documentation | https://docs.github.com |
| Blog | https://github.blog |
| Changelog | https://github.blog/changelog |
| Marketplace | https://github.com/marketplace |
| View all features | https://github.com/features |
| Enterprises | https://github.com/enterprise |
| Small and medium teams | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| App Modernization | https://github.com/solutions/use-case/app-modernization |
| DevSecOps | https://github.com/solutions/use-case/devsecops |
| DevOps | https://github.com/solutions/use-case/devops |
| CI/CD | https://github.com/solutions/use-case/ci-cd |
| View all use cases | https://github.com/solutions/use-case |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| View all industries | https://github.com/solutions/industry |
| View all solutions | https://github.com/solutions |
| AI | https://github.com/resources/articles?topic=ai |
| Software Development | https://github.com/resources/articles?topic=software-development |
| DevOps | https://github.com/resources/articles?topic=devops |
| Security | https://github.com/resources/articles?topic=security |
| View all topics | https://github.com/resources/articles |
| Customer stories | https://github.com/customer-stories |
| Events & webinars | https://github.com/resources/events |
| Ebooks & reports | https://github.com/resources/whitepapers |
| Business insights | https://github.com/solutions/executive-insights |
| GitHub Skills | https://skills.github.com |
| Documentation | https://docs.github.com |
| Customer support | https://support.github.com |
| Community forum | https://github.com/orgs/community/discussions |
| Trust center | https://github.com/trust-center |
| Partners | https://github.com/partners |
| GitHub SponsorsFund open source developers | https://github.com/sponsors |
| Security Lab | https://securitylab.github.com |
| Maintainer Community | https://maintainers.github.com |
| Accelerator | https://github.com/accelerator |
| Archive Program | https://archiveprogram.github.com |
| Topics | https://github.com/topics |
| Trending | https://github.com/trending |
| Collections | https://github.com/collections |
| Enterprise platformAI-powered developer platform | https://github.com/enterprise |
| GitHub Advanced SecurityEnterprise-grade security features | https://github.com/security/advanced-security |
| Copilot for BusinessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/premium-support |
| Pricing | https://github.com/pricing |
| Search syntax tips | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
| documentation | https://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F140603%2Fcommits%2F0f9b5094c712f8ca8093017140f1af78a191b965 |
|
Sign up
| https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
| Reload | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
| Reload | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
34.1k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
71.6k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Code
| https://github.com/python/cpython |
|
Issues
5k+
| https://github.com/python/cpython/issues |
|
Pull requests
2.1k
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
31
| https://github.com/python/cpython/projects |
|
Security
0
| https://github.com/python/cpython/security |
|
Insights
| https://github.com/python/cpython/pulse |
|
Code
| https://github.com/python/cpython |
|
Issues
| https://github.com/python/cpython/issues |
|
Pull requests
| https://github.com/python/cpython/pulls |
|
Actions
| https://github.com/python/cpython/actions |
|
Projects
| https://github.com/python/cpython/projects |
|
Security
| https://github.com/python/cpython/security |
|
Insights
| https://github.com/python/cpython/pulse |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose |
| serhiy-storchaka | https://github.com/serhiy-storchaka |
| python:main | https://github.com/python/cpython/tree/main |
| osamakader:issue-140601-iterparse-warning | https://github.com/osamakader/cpython/tree/issue-140601-iterparse-warning |
|
Conversation
33
| https://github.com/python/cpython/pull/140603 |
|
Commits
17
| https://github.com/python/cpython/pull/140603/commits |
|
Checks
44
| https://github.com/python/cpython/pull/140603/checks |
|
Files changed
| https://github.com/python/cpython/pull/140603/files |
| Please reload this page | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
|
gh-140601: Add ResourceWarning to iterparse when not closed
| https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965#top |
|
Show all changes
17 commits
| https://github.com/python/cpython/pull/140603/files |
|
bf3f888
gh-140601: Add ResourceWarning to iterparse when not closed
osamakader Oct 25, 2025
| https://github.com/python/cpython/pull/140603/commits/bf3f8888b277817bb674b899c564cef27cfd0a12 |
|
e6c11de
Address review feedback from serhiy-storchaka
osamakader Oct 26, 2025
| https://github.com/python/cpython/pull/140603/commits/e6c11de1ba59c128c2711374cd53f8eba3891c12 |
|
53f63b9
remove extra whitespace
osamakader Oct 26, 2025
| https://github.com/python/cpython/pull/140603/commits/53f63b9971332ce075bfd7037d0fe51dd54eb8c3 |
|
c8ea776
remove unused import
osamakader Oct 26, 2025
| https://github.com/python/cpython/pull/140603/commits/c8ea7768a3e062132e8bd497559940ab27652c70 |
|
fcd7ca0
Use % formatting instead of f-strings in __del__
osamakader Oct 26, 2025
| https://github.com/python/cpython/pull/140603/commits/fcd7ca09a77f22aa6362bce805746c4254d0a5ec |
|
0f9b509
Add assertions to verify ResourceWarning content
osamakader Oct 26, 2025
| https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
|
6e3b071
Remove redundant test_iterparse_resource_warning function
osamakader Oct 26, 2025
| https://github.com/python/cpython/pull/140603/commits/6e3b0711626669da8e458d09f1bd3fe9bef2876b |
|
86fc36b
Remove source=self from ResourceWarning
osamakader Oct 26, 2025
| https://github.com/python/cpython/pull/140603/commits/86fc36b3d3e9d4d5ea670e2b50a99b55332e889d |
|
329c09c
Add explicit close().
serhiy-storchaka Oct 27, 2025
| https://github.com/python/cpython/pull/140603/commits/329c09c4054e8257b1573b2b4c2484e1f700a3f5 |
|
dd20441
Reorganize tests.
serhiy-storchaka Oct 27, 2025
| https://github.com/python/cpython/pull/140603/commits/dd204415282d99ec7bbf51528e2c8a3a7e7bd997 |
|
b1f67a4
Exhausted or failed iterators are auto-closed.
serhiy-storchaka Oct 27, 2025
| https://github.com/python/cpython/pull/140603/commits/b1f67a4eb6506dcdc5eab06e00eee07aca61335c |
|
15c0c5b
Add versionchanged directive for ResourceWarning
osamakader Oct 27, 2025
| https://github.com/python/cpython/pull/140603/commits/15c0c5b99dd5bd0308b7da3cb35b9da8ff9b04f2 |
|
a7ef9f2
Merge branch 'main' into issue-140601-iterparse-warning
serhiy-storchaka Nov 12, 2025
| https://github.com/python/cpython/pull/140603/commits/a7ef9f28693e2be4d0e3f290dbfcb5af0790daf8 |
|
766d510
Always emit a warning. Add tests for exhausted not closed iterator.
serhiy-storchaka Nov 12, 2025
| https://github.com/python/cpython/pull/140603/commits/766d5103bae24ef3afdc7945120faa7ef6a131dc |
|
53880a6
Apply suggestions from code review
serhiy-storchaka Nov 13, 2025
| https://github.com/python/cpython/pull/140603/commits/53880a65a4963bffd9ce3a1d6a45dfd74f45091c |
|
8a37683
Refactor tests.
serhiy-storchaka Nov 13, 2025
| https://github.com/python/cpython/pull/140603/commits/8a37683925f56a0ad890076325427bc323832d7b |
|
6c5c5e8
Merge branch 'main' into issue-140601-iterparse-warning
serhiy-storchaka Nov 13, 2025
| https://github.com/python/cpython/pull/140603/commits/6c5c5e82c484b4bcac7bde34cc9b812ab0fa70b4 |
|
Clear filters
| https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
| Please reload this page | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
| Please reload this page | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
|
Prev
| https://github.com/python/cpython/pull/140603/commits/fcd7ca09a77f22aa6362bce805746c4254d0a5ec |
|
Next
| https://github.com/python/cpython/pull/140603/commits/6e3b0711626669da8e458d09f1bd3fe9bef2876b |
| Please reload this page | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965 |
|
| https://github.com/osamakader |
| osamakader | https://github.com/python/cpython/commits?author=osamakader |
| Lib/test/test_xml_etree.py | https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454 |
|
View file
| https://github.com/osamakader/cpython/blob/0f9b5094c712f8ca8093017140f1af78a191b965/Lib/test/test_xml_etree.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/140603/commits/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454 |
|
| https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454 |
|
| https://github.com/python/cpython/pull/140603/commits/0f9b5094c712f8ca8093017140f1af78a191b965#diff-cd2315ff25ab49e653d363de2d213e390ecb1b01bbc86e2be3b700db4b0bf454 |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |