René's URL Explorer Experiment


Title: gh-108834: Cleanup libregrtest by vstinner · Pull Request #108858 · python/cpython · GitHub

Open Graph Title: gh-108834: Cleanup libregrtest by vstinner · Pull Request #108858 · python/cpython

X Title: gh-108834: Cleanup libregrtest by vstinner · Pull Request #108858 · python/cpython

Description: Remove "global variables" from libregrtest: no longer pass 'ns' magic namespace which was used to get and set 'random' attributes. Instead, each class has its own attributes, and some classes are even read-only (frozen dataclass), like RunTests. Reorganize files: Rename runtest.py to single.py. Rename runtest_mp.py to mp_runner.py. Create findtests.py, result.py, results.py and worker.py. Reorganize classes: Copy command line options ('ns' namespace) to Regrtest and RunTests attributes: add many attributes. Add Results class with methods: get_state(), display_result(), get_exitcode(), JUnit methods, etc. Add Logger class: log(), display_progress(), system load tracker. Remove WorkerJob class: the worker now gets a RunTests instance. Move function and methods: Convert Regrtest.list_cases() to a function. Convert display_header(), display_sanitizers(), set_temp_dir() and create_temp_dir() methods of Regrtest to functions in utils.py. Rename set_temp_dir() to select_temp_dir(). Rename create_temp_dir() to make_temp_dir(). Move abs_module_name() and normalize_test_name() to utils.py. cmdline.py changes: Rename internal --worker-args command line option to --worker-json. Rename ns.trace to ns.coverage. No longer gets the number of CPUs: it's now done by Regrtest class. Add missing attributes to Namespace: coverage, threshold, wait. Misc: Add test_parse_memlimit() and test_set_memlimit() to test_support. Add some type annotations. Issue: gh-108834

Open Graph Description: Remove "global variables" from libregrtest: no longer pass 'ns' magic namespace which was used to get and set 'random' attributes. Instead, each class has its own attribut...

X Description: Remove "global variables" from libregrtest: no longer pass 'ns' magic namespace which was used to get and set 'random' attributes. Instead, each cl...

Opengraph URL: https://github.com/python/cpython/pull/108858

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:55455c93-88f9-908f-38a2-3a6173532fff
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE810:3136D1:DFACD1:1308B26:6B0652BD
html-safe-nonce7a9b43438f1b57360a2b9475676d4e735a57b5fde805b801cfa0755595bec167
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODEwOjMxMzZEMTpERkFDRDE6MTMwOEIyNjo2QjA2NTJCRCIsInZpc2l0b3JfaWQiOiI1MDc5NzAyMDA5Mzk4MzE3NzU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac105d2ad943d5367a5561bfe1a73c8af2da855b6dc1db7614450c3d4b5dc72c51
hovercard-subject-tagpull_request:1500731242
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/108858/files
twitter:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/194129?s=400&v=4
og:image:altRemove "global variables" from libregrtest: no longer pass 'ns' magic namespace which was used to get and set 'random' attributes. Instead, each class has its own attribut...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasef1f9a08f7c769a37f1dfc18ad43d463c222a7eea
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/108858/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F108858%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F108858%2Ffiles
Sign uphttps://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
Reloadhttps://github.com/python/cpython/pull/108858/files
Reloadhttps://github.com/python/cpython/pull/108858/files
Reloadhttps://github.com/python/cpython/pull/108858/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
vstinnerhttps://github.com/vstinner
python:mainhttps://github.com/python/cpython/tree/main
vstinner:regrtest_resultshttps://github.com/vstinner/cpython/tree/regrtest_results
Conversation 18 https://github.com/python/cpython/pull/108858
Commits 1 https://github.com/python/cpython/pull/108858/commits
Checks 0 https://github.com/python/cpython/pull/108858/checks
Files changed https://github.com/python/cpython/pull/108858/files
Please reload this pagehttps://github.com/python/cpython/pull/108858/files
gh-108834: Cleanup libregrtest https://github.com/python/cpython/pull/108858/files#top
Show all changes 1 commit https://github.com/python/cpython/pull/108858/files
de5a058 gh-108834: Cleanup libregrtest vstinner Sep 3, 2023 https://github.com/python/cpython/pull/108858/commits/de5a0589158d871d8114783c75b8168eede9f154
Clear filters https://github.com/python/cpython/pull/108858/files
Please reload this pagehttps://github.com/python/cpython/pull/108858/files
Please reload this pagehttps://github.com/python/cpython/pull/108858/files
__init__.py https://github.com/python/cpython/pull/108858/files#diff-dc4a0e38b963dbdd1fa278cd30e11359f17a2133b5e2c2727594b635665d564c
cmdline.py https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
findtests.py https://github.com/python/cpython/pull/108858/files#diff-b926948bcce7fa202425839f37fbb423f844b2f69941838a22a5a5b18a353137
logger.py https://github.com/python/cpython/pull/108858/files#diff-87704fc0fc0539a8f4d1392b988d3e328bf4bab5480cde8bd52899a40ce95894
main.py https://github.com/python/cpython/pull/108858/files#diff-90b1258926545f5c3c67e7de0cb5f50dc293b41c7a075a3eb316df99f3b875d5
mp_runner.py https://github.com/python/cpython/pull/108858/files#diff-4601a48345ae9a88da6a213cebc2db551dab62ac0288e401095348b9e421dd8a
pgo.py https://github.com/python/cpython/pull/108858/files#diff-fc08d02347d3ba59b6caf7adae3f39f5e96d2c26d62baaa66209fe3bcef37e3b
refleak.py https://github.com/python/cpython/pull/108858/files#diff-a9ae74da20089d7e315cc884eec16e9105c45fefd9b3da12e3382fb43c4310c9
result.py https://github.com/python/cpython/pull/108858/files#diff-1b131ec944e1c99abfd828cfd9176c91ab59a6b2b89da32902853c7f3c326dfb
results.py https://github.com/python/cpython/pull/108858/files#diff-5797cb7ab7b1f2433197a65c656bc3b81edf675bb41e758ccb05f0c8751b7919
runtest.py https://github.com/python/cpython/pull/108858/files#diff-1bf573387e0d829113f1ae507ebf33dd4e2090330a9c83a71d7eb14c033582d9
runtests.py https://github.com/python/cpython/pull/108858/files#diff-4445069a1c72713ba6c516b82aa53a620dd6cf7fa23f6953d37c5a068b085cf1
save_env.py https://github.com/python/cpython/pull/108858/files#diff-92cacf1f1009bb27d80a473598a35262d738775a20a07c7ffb0b391ff0d5ea1b
setup.py https://github.com/python/cpython/pull/108858/files#diff-eefc485ae89c3a0b808e188159ab31fe82beb9dda5f6245caddb01117512424a
single.py https://github.com/python/cpython/pull/108858/files#diff-e795484b2b979b7a4fe0ee745aa74d1e3919d60894ee9fb2a06701fa1300d85e
utils.py https://github.com/python/cpython/pull/108858/files#diff-8e9a29443bf1ce629c10cc3b9e8cd9c3db85e3db313859d0a645f7736a845491
worker.py https://github.com/python/cpython/pull/108858/files#diff-77ff2ded7d5950568cf0f5df580ddabd2ab321a52840f0ed4a9517c2f42e1fab
__init__.py https://github.com/python/cpython/pull/108858/files#diff-d925268c057737ba320c489ca302fd5125f14840d22e50cfe226bdb5bb88ba8d
test_regrtest.py https://github.com/python/cpython/pull/108858/files#diff-0efcd6408facaca9938a255b25aeac062326b4f7185533c67426fc3057b53893
test_support.py https://github.com/python/cpython/pull/108858/files#diff-cb42fd26146ec61cb2242243494a9f314667a9a39153ad17e37465ff5a8a8000
2023-09-05-21-13-17.gh-issue-108834._CnOtt.rst https://github.com/python/cpython/pull/108858/files#diff-a2e038c662c59aff43cc3315cdc5b64a15611f801255d8c8589193006aadc9d8
Lib/test/libregrtest/__init__.pyhttps://github.com/python/cpython/pull/108858/files#diff-dc4a0e38b963dbdd1fa278cd30e11359f17a2133b5e2c2727594b635665d564c
View file https://github.com/vstinner/cpython/blob/de5a0589158d871d8114783c75b8168eede9f154/Lib/test/libregrtest/__init__.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/108858/{{ revealButtonHref }}
Lib/test/libregrtest/cmdline.pyhttps://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
View file https://github.com/vstinner/cpython/blob/de5a0589158d871d8114783c75b8168eede9f154/Lib/test/libregrtest/cmdline.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/108858/{{ revealButtonHref }}
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
https://github.com/python/cpython/pull/108858/files#diff-6cc0edcd126ff36a9cb3c8fe9e56d3cb0987b5ac2c0930268e477e493131190f
Lib/test/libregrtest/findtests.pyhttps://github.com/python/cpython/pull/108858/files#diff-b926948bcce7fa202425839f37fbb423f844b2f69941838a22a5a5b18a353137
View file https://github.com/vstinner/cpython/blob/de5a0589158d871d8114783c75b8168eede9f154/Lib/test/libregrtest/findtests.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/108858/{{ revealButtonHref }}
Lib/test/libregrtest/logger.pyhttps://github.com/python/cpython/pull/108858/files#diff-87704fc0fc0539a8f4d1392b988d3e328bf4bab5480cde8bd52899a40ce95894
View file https://github.com/vstinner/cpython/blob/de5a0589158d871d8114783c75b8168eede9f154/Lib/test/libregrtest/logger.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/108858/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/108858/files
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.