| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8e676415-39ac-18da-18ba-5d7a25334b63 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C12C:A39F5:1B854F4:258A8A8:696AB918 |
| html-safe-nonce | 0171b042f3df6ccae776e92e95cb177621f5d0d67763bd9e4075ae91c35a5746 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTJDOkEzOUY1OjFCODU0RjQ6MjU4QThBODo2OTZBQjkxOCIsInZpc2l0b3JfaWQiOiIxNjc4NjI5MjcwMDkyMTY3NDQ4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5cad82bae379db498c8353cae2ae188e6ad620e693d30da51676fcc166b9a414 |
| hovercard-subject-tag | pull_request:1903291762 |
| 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/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/120049/files |
| twitter:image | https://avatars.githubusercontent.com/u/102677655?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/102677655?s=400&v=4 |
| og:image:alt | Add a short note on when Path.unlink() raises NotADirectoryError
This can occur "in the wild", for example, after calling shutil.move(src, dst) where dst is a non-existent directory. Debu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 46ce962e0e18113ea447391b6ace8b02d4d2861e57b4fbab3658698f73d8855b |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 30300f30bb3949de255e84a146706a3bdb5c19c9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/python/cpython/pull/120049/files#start-of-content |
|
| https://github.com/ |
|
Sign in
| https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F120049%2Ffiles |
| 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%2F120049%2Ffiles |
|
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%2Ffiles&source=header-repo&source_repo=python%2Fcpython |
| Reload | https://github.com/python/cpython/pull/120049/files |
| Reload | https://github.com/python/cpython/pull/120049/files |
| Reload | https://github.com/python/cpython/pull/120049/files |
|
python
| https://github.com/python |
| cpython | https://github.com/python/cpython |
| Please reload this page | https://github.com/python/cpython/pull/120049/files |
|
Notifications
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Fork
33.9k
| https://github.com/login?return_to=%2Fpython%2Fcpython |
|
Star
71.1k
| 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
Uh oh!
There was an error while loading. Please reload this page.
| https://github.com/python/cpython/security |
| Please reload this page | https://github.com/python/cpython/pull/120049/files |
|
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 |
| MusicalNinjaDad | https://github.com/MusicalNinjaDad |
| python:main | https://github.com/python/cpython/tree/main |
| MusicalNinjaDad:MusicalNinjaDad/issue119993 | https://github.com/MusicalNinjaDad/cpython/tree/MusicalNinjaDad/issue119993 |
|
Conversation
17
| https://github.com/python/cpython/pull/120049 |
|
Commits
13
| https://github.com/python/cpython/pull/120049/commits |
|
Checks
38
| https://github.com/python/cpython/pull/120049/checks |
|
Files changed
| https://github.com/python/cpython/pull/120049/files |
| Please reload this page | https://github.com/python/cpython/pull/120049/files |
|
gh-119993 ignore NotADirectoryError in Path.unlink() if missing_ok is True
| https://github.com/python/cpython/pull/120049/files#top |
|
Show all changes
13 commits
| https://github.com/python/cpython/pull/120049/files |
|
e80568d
Add a comment on when `NotADirectoryError`is raised by Path.unlink()
MusicalNinjaDad Jun 4, 2024
| https://github.com/python/cpython/pull/120049/commits/e80568d0af6f8cb663e12c4c625e669445164c24 |
|
0db9ce0
don't prefer any specific OSError type in Path.unlink documentation
MusicalNinjaDad Jun 13, 2024
| https://github.com/python/cpython/pull/120049/commits/0db9ce0df8ca46191cd0c641063dd8f62d64309b |
|
2573a3a
maintain the original clarity that FileNotFound will be raised if mis…
MusicalNinjaDad Jun 30, 2024
| https://github.com/python/cpython/pull/120049/commits/2573a3a84dca7743e591b8e497938311fe09a9be |
|
f3269d9
clarify that FileNotFoundError is a subclass of OSError
MusicalNinjaDad Jun 30, 2024
| https://github.com/python/cpython/pull/120049/commits/f3269d9fe94512d7dedab5d58c24d70c1cd767b2 |
|
6286d80
fix whitespace
MusicalNinjaDad Jun 30, 2024
| https://github.com/python/cpython/pull/120049/commits/6286d808b30bd45b4caeb955663b79691f0d5aa6 |
|
ce3577d
ignore NotADirectoryError on missing_ok = True
MusicalNinjaDad Jul 4, 2024
| https://github.com/python/cpython/pull/120049/commits/ce3577dd2b4a5de0f6d3330b4767494749c352a9 |
|
4a776cd
Merge branch 'main' into MusicalNinjaDad/issue119993
MusicalNinjaDad Jul 4, 2024
| https://github.com/python/cpython/pull/120049/commits/4a776cd2bb2794a4a3dd2d0f00b6d6b4df6cb190 |
|
a4cb846
Windows doesn't raise NotADirectoryError
MusicalNinjaDad Jul 5, 2024
| https://github.com/python/cpython/pull/120049/commits/a4cb84641953e090ea08b404ad973a631aba9e5c |
|
9b4d22b
make the documentation more succinct
MusicalNinjaDad Sep 6, 2024
| https://github.com/python/cpython/pull/120049/commits/9b4d22b55b6e407b53bb2f1bca995bbfa09f206e |
|
84eeea3
also run `test_unlink_missing_ok_intermediate_file` against `DummyPath`
MusicalNinjaDad Sep 6, 2024
| https://github.com/python/cpython/pull/120049/commits/84eeea30245cbfdc231ba8996e5eacea6f42a1fe |
|
626af70
DummyPath.unlink raises NotADirectoryError
MusicalNinjaDad Sep 11, 2024
| https://github.com/python/cpython/pull/120049/commits/626af70ebc3dedaca21d93fdb5bab9b8c8d882a4 |
|
22faf97
Only test on posix
MusicalNinjaDad Jan 24, 2025
| https://github.com/python/cpython/pull/120049/commits/22faf979e78df7acb906f69b3ff515e4f50ad0b2 |
|
ba739ca
Merge remote-tracking branch 'origin/main' into MusicalNinjaDad/issue…
MusicalNinjaDad Jan 24, 2025
| https://github.com/python/cpython/pull/120049/commits/ba739cada4116a1314a52a6539c3c936bf7f8ae3 |
|
Clear filters
| https://github.com/python/cpython/pull/120049/files |
| Please reload this page | https://github.com/python/cpython/pull/120049/files |
| Please reload this page | https://github.com/python/cpython/pull/120049/files |
|
pathlib.rst
| https://github.com/python/cpython/pull/120049/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c |
|
_local.py
| https://github.com/python/cpython/pull/120049/files#diff-605d7dbf8e86b830b276d61a776a8d7da625b34316c59e154441624beabbe70a |
|
test_pathlib.py
| https://github.com/python/cpython/pull/120049/files#diff-03d884d0a180340cc959b85206069287a4720ba88da9463cc94f79396d0f8f9c |
|
test_pathlib_abc.py
| https://github.com/python/cpython/pull/120049/files#diff-4669f270f5520190bbc1c9e99ac03db2847c44be835fb3d2d9ff727d73761f58 |
|
2024-07-04-11-55-15.gh-issue-119993._IXsOb.rst
| https://github.com/python/cpython/pull/120049/files#diff-854e677dfc7489d38f2fb70cf24d474ed479b10be0529279b5f2da9c85640943 |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L525 |
| Doc/library/pathlib.rst | https://github.com/python/cpython/pull/120049/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c |
|
View file
| https://github.com/python/cpython/blob/ba739cada4116a1314a52a6539c3c936bf7f8ae3/Doc/library/pathlib.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/120049/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/120049/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c |
|
| https://github.com/python/cpython/pull/120049/files#diff-1134e36a94ecfde1df43bee5efd285de5d67426fbca086425201ecc753f9139c |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L526 |
| Lib/pathlib/_local.py | https://github.com/python/cpython/pull/120049/files#diff-605d7dbf8e86b830b276d61a776a8d7da625b34316c59e154441624beabbe70a |
|
View file
| https://github.com/python/cpython/blob/ba739cada4116a1314a52a6539c3c936bf7f8ae3/Lib/pathlib/_local.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/120049/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/120049/files#diff-605d7dbf8e86b830b276d61a776a8d7da625b34316c59e154441624beabbe70a |
|
| https://github.com/python/cpython/pull/120049/files#diff-605d7dbf8e86b830b276d61a776a8d7da625b34316c59e154441624beabbe70a |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L527 |
| Lib/test/test_pathlib/test_pathlib.py | https://github.com/python/cpython/pull/120049/files#diff-03d884d0a180340cc959b85206069287a4720ba88da9463cc94f79396d0f8f9c |
|
View file
| https://github.com/python/cpython/blob/ba739cada4116a1314a52a6539c3c936bf7f8ae3/Lib/test/test_pathlib/test_pathlib.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/120049/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/120049/files#diff-03d884d0a180340cc959b85206069287a4720ba88da9463cc94f79396d0f8f9c |
| Please reload this page | https://github.com/python/cpython/pull/120049/files |
|
| https://github.com/python/cpython/pull/120049/files#diff-03d884d0a180340cc959b85206069287a4720ba88da9463cc94f79396d0f8f9c |
|
| https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L527 |
| Lib/test/test_pathlib/test_pathlib_abc.py | https://github.com/python/cpython/pull/120049/files#diff-4669f270f5520190bbc1c9e99ac03db2847c44be835fb3d2d9ff727d73761f58 |
|
View file
| https://github.com/python/cpython/blob/ba739cada4116a1314a52a6539c3c936bf7f8ae3/Lib/test/test_pathlib/test_pathlib_abc.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/120049/{{ revealButtonHref }} |
|
| https://github.com/python/cpython/pull/120049/files#diff-4669f270f5520190bbc1c9e99ac03db2847c44be835fb3d2d9ff727d73761f58 |
|
| https://github.com/python/cpython/pull/120049/files#diff-4669f270f5520190bbc1c9e99ac03db2847c44be835fb3d2d9ff727d73761f58 |
| Misc/NEWS.d/next/Library/2024-07-04-11-55-15.gh-issue-119993._IXsOb.rst | https://github.com/python/cpython/pull/120049/files#diff-854e677dfc7489d38f2fb70cf24d474ed479b10be0529279b5f2da9c85640943 |
|
View file
| https://github.com/python/cpython/blob/ba739cada4116a1314a52a6539c3c936bf7f8ae3/Misc/NEWS.d/next/Library/2024-07-04-11-55-15.gh-issue-119993._IXsOb.rst |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/python/cpython/pull/120049/{{ revealButtonHref }} |
| Please reload this page | https://github.com/python/cpython/pull/120049/files |
|
| 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 |