René's URL Explorer Experiment


Title: test.support.os_helper.rmdir(): PermissionError: [WinError 32] The process cannot access the file because it is being used by another process · Issue #98219 · python/cpython · GitHub

Open Graph Title: test.support.os_helper.rmdir(): PermissionError: [WinError 32] The process cannot access the file because it is being used by another process · Issue #98219 · python/cpython

X Title: test.support.os_helper.rmdir(): PermissionError: [WinError 32] The process cannot access the file because it is being used by another process · Issue #98219 · python/cpython

Description: On Windows, it's common that a test fails at exit when trying to remove a temporary directory created by a test. Usually, it's because the test spawns a child process in this directory and the test tries to remove the temporary directory...

Open Graph Description: On Windows, it's common that a test fails at exit when trying to remove a temporary directory created by a test. Usually, it's because the test spawns a child process in this directory and the test...

X Description: On Windows, it's common that a test fails at exit when trying to remove a temporary directory created by a test. Usually, it's because the test spawns a child process in this directory and ...

Opengraph URL: https://github.com/python/cpython/issues/98219

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"test.support.os_helper.rmdir(): PermissionError: [WinError 32] The process cannot access the file because it is being used by another process","articleBody":"On Windows, it's common that a test fails at exit when trying to remove a temporary directory created by a test. Usually, it's because the test spawns a child process in this directory and the test tries to remove the temporary directory before the child process completes.\r\n\r\nFor example, temp_dir() of test.support.os_helper creates a temporary directory and then deletes it with rmtree(path) of test.support.os_helper: this function is different than shutil.rmtree(), it tries again on error with a timeout of 1.0 second.\r\n\r\nBut sometimes, the function fails with the error \"PermissionError: [WinError 32] The process cannot access the file because it is being used by another process\" on the os.rmdir() step.\r\n\r\nIf os.rmdir() fails with PermissionError, it would be nice to try again later.\r\n\r\nNotes:\r\n\r\n* I'm not sure why there is a fixed timeout of 1.0 second. I would prefer to use SHORT_TIMEOUT, or even LONG_TIMEOUT, of test.support.\r\n* _force_run() should use test.support.sleeping_retry()\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 483, in temp_dir\r\n    yield path\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 536, in temp_cwd\r\n    yield cwd_dir\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\libregrtest\\main.py\", line 701, in main\r\n    self._main(tests, kwargs)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\libregrtest\\main.py\", line 722, in _main\r\n    run_tests_worker(self.ns, self.worker_test_name)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\libregrtest\\runtest_mp.py\", line 101, in run_tests_worker\r\n    sys.exit(0)\r\nSystemExit: 0\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\__init__.py\", line 203, in _force_run\r\n    return func(*args)\r\n           ^^^^^^^^^^^\r\nPermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\\\a\\\\cpython\\\\cpython\\\\build\\\\test_python_4372�\\\\test_python_worker_1096�'\r\n\r\nDuring handling of the above exception, another exception occurred:\r\n\r\nTraceback (most recent call last):\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\runpy.py\", line 198, in _run_module_as_main\r\n    return _run_code(code, main_globals, None,\r\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\runpy.py\", line 88, in _run_code\r\n    exec(code, run_globals)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\regrtest.py\", line 47, in \u003cmodule\u003e\r\n    _main()\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\regrtest.py\", line 43, in _main\r\n    main()\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\libregrtest\\main.py\", line 763, in main\r\n    Regrtest().main(tests=tests, **kwargs)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\libregrtest\\main.py\", line 695, in main\r\n    with os_helper.temp_cwd(test_cwd, quiet=True):\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\contextlib.py\", line 155, in __exit__\r\n    self.gen.throw(value)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 534, in temp_cwd\r\n    with temp_dir(path=name, quiet=quiet) as temp_path:\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\contextlib.py\", line 155, in __exit__\r\n    self.gen.throw(value)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 488, in temp_dir\r\n    rmtree(path)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 445, in rmtree\r\n    _rmtree(path)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 389, in _rmtree\r\n    _waitfor(lambda p: _force_run(p, os.rmdir, p), path)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 333, in _waitfor\r\n    func(pathname)\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\os_helper.py\", line 389, in \u003clambda\u003e\r\n    _waitfor(lambda p: _force_run(p, os.rmdir, p), path)\r\n                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\r\n  File \"D:\\a\\cpython\\cpython\\Lib\\test\\support\\__init__.py\", line 214, in _force_run\r\n    return func(*args)\r\n           ^^^^^^^^^^^\r\nPermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'D:\\\\a\\\\cpython\\\\cpython\\\\build\\\\test_python_4372�\r\n```\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n- gh-99464\r\n- gh-99504\r\n\r\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/vstinner","@type":"Person","name":"vstinner"},"datePublished":"2022-10-12T15:17:28.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/98219/cpython/issues/98219"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:0e73a5d3-3ffa-86d6-2343-2ef80c0da16a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC778:C5A79:59A97B:7CE0BC:69694CAD
html-safe-noncef35a680988dfd921276efc20753574e15118a7f9474100d13059e3618e50ffa9
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzc4OkM1QTc5OjU5QTk3Qjo3Q0UwQkM6Njk2OTRDQUQiLCJ2aXNpdG9yX2lkIjoiODgyMzI0NjI0MTAxMzUxNzQ4NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf3050cbbd2ca19b579410f1c64d01110307298511c1ad2f2395999a6d02b3297
hovercard-subject-tagissue:1406393022
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/98219/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6585a8d2a6dc0f095fae2cc1b46b942750d1da7b6d6e8fa3a029edf2a7395bc0/python/cpython/issues/98219
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6585a8d2a6dc0f095fae2cc1b46b942750d1da7b6d6e8fa3a029edf2a7395bc0/python/cpython/issues/98219
og:image:altOn Windows, it's common that a test fails at exit when trying to remove a temporary directory created by a test. Usually, it's because the test spawns a child process in this directory and the test...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamevstinner
hostnamegithub.com
expected-hostnamegithub.com
None54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released69ac0477df0f87da03b8b06cebd187012d7a930
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/98219#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F98219
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://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%2Fissues%2F98219
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/98219
Reloadhttps://github.com/python/cpython/issues/98219
Reloadhttps://github.com/python/cpython/issues/98219
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/98219
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 pagehttps://github.com/python/cpython/issues/98219
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/98219
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/98219
test.support.os_helper.rmdir(): PermissionError: [WinError 32] The process cannot access the file because it is being used by another processhttps://github.com/python/cpython/issues/98219#top
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
testsTests in the Lib/test dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22tests%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/vstinner
https://github.com/vstinner
vstinnerhttps://github.com/vstinner
on Oct 12, 2022https://github.com/python/cpython/issues/98219#issue-1406393022
GH-98219: reduce sleep time in asyncio subprocess test #99464https://github.com/python/cpython/pull/99464
[3.11] GH-98219: reduce sleep time in asyncio subprocess test (GH-99464) #99504https://github.com/python/cpython/pull/99504
OS-windowshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22OS-windows%22
testsTests in the Lib/test dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22tests%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.