René's URL Explorer Experiment


Title: bpo-32230, bpo-20361: Set sys.warnoptions for all command line options by ncoghlan · Pull Request #4734 · python/cpython · GitHub

Open Graph Title: bpo-32230, bpo-20361: Set sys.warnoptions for all command line options by ncoghlan · Pull Request #4734 · python/cpython

X Title: bpo-32230, bpo-20361: Set sys.warnoptions for all command line options by ncoghlan · Pull Request #4734 · python/cpython

Description: Rather than supporting dev mode and the command line BytesWarning flag directly in the warnings module, this instead adjusts the initialisation code to add extra entries to sys.warnoptions when these options are enabled. This ensures that dev mode behaves exactly as if -Wdefault had been passed on the command line, including in the way it interacts with sys.warnoptions, and with other command line flags like -bb. It also ensures that the -b and -bb options take precedence of other warnings filter options like -Wdefault or PYTHONWARNINGS=ignore. https://bugs.python.org/issue32230 https://bugs.python.org/issue20361

Open Graph Description: Rather than supporting dev mode and the command line BytesWarning flag directly in the warnings module, this instead adjusts the initialisation code to add extra entries to sys.warnoptions when the...

X Description: Rather than supporting dev mode and the command line BytesWarning flag directly in the warnings module, this instead adjusts the initialisation code to add extra entries to sys.warnoptions when the...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:a211b158-4bd8-f7ad-e630-7b6a0dd4320b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id82F0:47423:5E7881F:84B5D68:6A500479
html-safe-nonce61aaddadf3e91f2c51ac665b5cfcf0a182755863e00f9faccba14300c04c2174
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkYwOjQ3NDIzOjVFNzg4MUY6ODRCNUQ2ODo2QTUwMDQ3OSIsInZpc2l0b3JfaWQiOiIxNzc0ODAyNzM5MzEyNzMzMzciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac5efee1d2b41dc15e3e63df4bbc3740eac2f502db496ea0a827cd649e59b989f5
hovercard-subject-tagpull_request:156692162
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/4734/files
twitter:imagehttps://avatars.githubusercontent.com/u/1026649?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1026649?s=400&v=4
og:image:altRather than supporting dev mode and the command line BytesWarning flag directly in the warnings module, this instead adjusts the initialisation code to add extra entries to sys.warnoptions when the...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None56eec25a3430492dd6ec2a480eb33256a0da5192d5714b0db4f5ab5f33203d94
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
releasee155b8a71f9284454f73118dfe5e634e74f7afb3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/4734/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F4734%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
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
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
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/enterprise/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%2Fpull%2F4734%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
Reloadhttps://github.com/python/cpython/pull/4734/files
Reloadhttps://github.com/python/cpython/pull/4734/files
Reloadhttps://github.com/python/cpython/pull/4734/files
Please reload this pagehttps://github.com/python/cpython/pull/4734/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/4734/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.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.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 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 and quality 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 servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
ncoghlanhttps://github.com/ncoghlan
python:masterhttps://github.com/python/cpython/tree/master
ncoghlan:issue-32230-set-warnoptions-in-dev-modehttps://github.com/ncoghlan/cpython/tree/issue-32230-set-warnoptions-in-dev-mode
Conversation 14 https://github.com/python/cpython/pull/4734
Commits 11 https://github.com/python/cpython/pull/4734/commits
Checks 0 https://github.com/python/cpython/pull/4734/checks
Files changed https://github.com/python/cpython/pull/4734/files
Please reload this pagehttps://github.com/python/cpython/pull/4734/files
bpo-32230, bpo-20361: Set sys.warnoptions for all command line options https://github.com/python/cpython/pull/4734/files#top
Show all changes 11 commits https://github.com/python/cpython/pull/4734/files
a8b40f3 bpo-32230: Set sys.warnoptions with -X dev ncoghlan Dec 6, 2017 https://github.com/python/cpython/pull/4734/commits/a8b40f3b9dab8f7ae043ec38453203bd798611c7
0cb8f29 Fix typo in NEWS entry ncoghlan Dec 6, 2017 https://github.com/python/cpython/pull/4734/commits/0cb8f29c664f1d315fe0a805a830898cd90aa614
e1a7d62 -X dev should take precedence over PYTHONWARNINGS ncoghlan Dec 6, 2017 https://github.com/python/cpython/pull/4734/commits/e1a7d62d9381cf1e49b7ccd1f1c202095ae0c6a3
89960ef Add explanatory comment about BytesWarning ncoghlan Dec 6, 2017 https://github.com/python/cpython/pull/4734/commits/89960efb5879c5201fad10592e8a1ec55c2beecf
d5c1576 Fix Python level checks for a debug build ncoghlan Dec 6, 2017 https://github.com/python/cpython/pull/4734/commits/d5c157691dba9a034dbc5ea065b7f99c38cb804a
019dbea Add a comment explaining warnings filter priority order ncoghlan Dec 6, 2017 https://github.com/python/cpython/pull/4734/commits/019dbea0b569f2f186688c33b31605c965d8709c
04f7de3 Address PR review feedback ncoghlan Dec 7, 2017 https://github.com/python/cpython/pull/4734/commits/04f7de32e0a5a229bea9f595cac3d2cf000f4656
6e44c43 Second NEWS entry, and update What's New ncoghlan Dec 7, 2017 https://github.com/python/cpython/pull/4734/commits/6e44c431c85acdbc8b698f22271c7b8f78af7f25
ed37a23 Add warnings filter test case ncoghlan Dec 7, 2017 https://github.com/python/cpython/pull/4734/commits/ed37a23abcef7362411fbca5c008d447a99be8e0
77b1f02 Use the code role to avoid a warning ncoghlan Dec 7, 2017 https://github.com/python/cpython/pull/4734/commits/77b1f02aa39d5e7f0f9d1f6aeba13ec296b57df1
a85790b Suppress false alarms from 'make suspicious' ncoghlan Dec 7, 2017 https://github.com/python/cpython/pull/4734/commits/a85790be3a816f44ca6f01e2dd6ad596850af733
Clear filters https://github.com/python/cpython/pull/4734/files
Please reload this pagehttps://github.com/python/cpython/pull/4734/files
Please reload this pagehttps://github.com/python/cpython/pull/4734/files
susp-ignored.csv https://github.com/python/cpython/pull/4734/files#diff-f2d07d8e818b46b42f9fff17a09058c554e8cb6baa7fbfbdf77b266c97155f4e
3.7.rst https://github.com/python/cpython/pull/4734/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
subprocess.py https://github.com/python/cpython/pull/4734/files#diff-619941af4b328b6abf2dc02c54e774fc17acc1ac4172c14db27d6097cbbff92a
test_cmd_line.py https://github.com/python/cpython/pull/4734/files#diff-128fff16ea63b541718887f5c714e0c1a357414fe1146b4893ef699e8853e3b0
warnings.py https://github.com/python/cpython/pull/4734/files#diff-1d0c2ffbcb01254c4ab02053d85527be50e03ea2908dc6cdba9fc185b8df9b7b
2017-12-06-20-18-34.bpo-32230.PgGQaB.rst https://github.com/python/cpython/pull/4734/files#diff-982404a504d43aaf42a0f219e7c554fe8381d27c9349d34fcce965879e105a76
2017-12-07-17-22-30.bpo-20361.zQUmbi.rst https://github.com/python/cpython/pull/4734/files#diff-0acd3ba272130705bda843f696683d18ac17d267d8cab8a193439b72753691a6
main.c https://github.com/python/cpython/pull/4734/files#diff-79e40dbd94b164b5f42a960224cc7496e33c189b4c66a6810904eda7d703b6f2
_warnings.c https://github.com/python/cpython/pull/4734/files#diff-868cb9c3ec7f49459c652319e480e03ee132976b45fbedacb94958f8e0a9ea58
Doc/tools/susp-ignored.csvhttps://github.com/python/cpython/pull/4734/files#diff-f2d07d8e818b46b42f9fff17a09058c554e8cb6baa7fbfbdf77b266c97155f4e
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Doc/tools/susp-ignored.csv
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4734/files#diff-f2d07d8e818b46b42f9fff17a09058c554e8cb6baa7fbfbdf77b266c97155f4e
Doc/whatsnew/3.7.rsthttps://github.com/python/cpython/pull/4734/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Doc/whatsnew/3.7.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4734/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
https://github.com/python/cpython/pull/4734/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
https://github.com/python/cpython/pull/4734/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
https://github.com/python/cpython/pull/4734/files#diff-830b405713d1c40982ffa918864e39c40c1b318d79b8dd2b523646dc3bd18b52
Lib/subprocess.pyhttps://github.com/python/cpython/pull/4734/files#diff-619941af4b328b6abf2dc02c54e774fc17acc1ac4172c14db27d6097cbbff92a
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Lib/subprocess.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4734/files#diff-619941af4b328b6abf2dc02c54e774fc17acc1ac4172c14db27d6097cbbff92a
https://github.com/python/cpython/pull/4734/files#diff-619941af4b328b6abf2dc02c54e774fc17acc1ac4172c14db27d6097cbbff92a
https://github.com/python/cpython/pull/4734/files#diff-619941af4b328b6abf2dc02c54e774fc17acc1ac4172c14db27d6097cbbff92a
Lib/test/test_cmd_line.pyhttps://github.com/python/cpython/pull/4734/files#diff-128fff16ea63b541718887f5c714e0c1a357414fe1146b4893ef699e8853e3b0
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Lib/test/test_cmd_line.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4734/files#diff-128fff16ea63b541718887f5c714e0c1a357414fe1146b4893ef699e8853e3b0
https://github.com/python/cpython/pull/4734/files#diff-128fff16ea63b541718887f5c714e0c1a357414fe1146b4893ef699e8853e3b0
https://github.com/python/cpython/pull/4734/files#diff-128fff16ea63b541718887f5c714e0c1a357414fe1146b4893ef699e8853e3b0
Lib/warnings.pyhttps://github.com/python/cpython/pull/4734/files#diff-1d0c2ffbcb01254c4ab02053d85527be50e03ea2908dc6cdba9fc185b8df9b7b
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Lib/warnings.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4734/files#diff-1d0c2ffbcb01254c4ab02053d85527be50e03ea2908dc6cdba9fc185b8df9b7b
Misc/NEWS.d/next/Core and Builtins/2017-12-06-20-18-34.bpo-32230.PgGQaB.rsthttps://github.com/python/cpython/pull/4734/files#diff-982404a504d43aaf42a0f219e7c554fe8381d27c9349d34fcce965879e105a76
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Misc/NEWS.d/next/Core%20and%20Builtins/2017-12-06-20-18-34.bpo-32230.PgGQaB.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
Misc/NEWS.d/next/Core and Builtins/2017-12-07-17-22-30.bpo-20361.zQUmbi.rsthttps://github.com/python/cpython/pull/4734/files#diff-0acd3ba272130705bda843f696683d18ac17d267d8cab8a193439b72753691a6
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Misc/NEWS.d/next/Core%20and%20Builtins/2017-12-07-17-22-30.bpo-20361.zQUmbi.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
Modules/main.chttps://github.com/python/cpython/pull/4734/files#diff-79e40dbd94b164b5f42a960224cc7496e33c189b4c66a6810904eda7d703b6f2
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Modules/main.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4734/files#diff-79e40dbd94b164b5f42a960224cc7496e33c189b4c66a6810904eda7d703b6f2
https://github.com/python/cpython/pull/4734/files#diff-79e40dbd94b164b5f42a960224cc7496e33c189b4c66a6810904eda7d703b6f2
https://github.com/python/cpython/pull/4734/files#diff-79e40dbd94b164b5f42a960224cc7496e33c189b4c66a6810904eda7d703b6f2
Python/_warnings.chttps://github.com/python/cpython/pull/4734/files#diff-868cb9c3ec7f49459c652319e480e03ee132976b45fbedacb94958f8e0a9ea58
View file https://github.com/ncoghlan/cpython/blob/a85790be3a816f44ca6f01e2dd6ad596850af733/Python/_warnings.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/4734/{{ revealButtonHref }}
https://github.com/python/cpython/pull/4734/files#diff-868cb9c3ec7f49459c652319e480e03ee132976b45fbedacb94958f8e0a9ea58
https://github.com/python/cpython/pull/4734/files#diff-868cb9c3ec7f49459c652319e480e03ee132976b45fbedacb94958f8e0a9ea58
https://github.com/python/cpython/pull/4734/files#diff-868cb9c3ec7f49459c652319e480e03ee132976b45fbedacb94958f8e0a9ea58
https://github.com/python/cpython/pull/4734/files#diff-868cb9c3ec7f49459c652319e480e03ee132976b45fbedacb94958f8e0a9ea58
https://github.com/python/cpython/pull/4734/files#diff-868cb9c3ec7f49459c652319e480e03ee132976b45fbedacb94958f8e0a9ea58
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.