René's URL Explorer Experiment


Title: Do not spawn uname(1) every time version info is needed by wdoekes · Pull Request #151 · Asana/python-asana · GitHub

Open Graph Title: Do not spawn uname(1) every time version info is needed by wdoekes · Pull Request #151 · Asana/python-asana

X Title: Do not spawn uname(1) every time version info is needed by wdoekes · Pull Request #151 · Asana/python-asana

Description: On Unixes, there is a os.uname() call which provides the same info and we don't need to fork()+execve() to get it. That uname(1) call wastes resources and trips IDSes with its unexpected fork(). Before: $ strace -feexecve python3 -c "import os; import platform; __version__ = 'x'; print({'language': 'Python', 'version': __version__, 'language_version': platform.python_version(), 'os': platform.system(), 'os_version': platform.release()})" execve("/usr/bin/python3", ["python3", "-c", "import os; import platform; __ve"...], 0x7ffc828c5c38 /* 63 vars */) = 0 strace: Process 4112873 attached [pid 4112873] execve("/usr/local/sbin/uname", ["uname", "-p"], 0x7fff0c485da8 /* 63 vars */) = -1 ENOENT (No such file or directory) [pid 4112873] execve("/usr/local/bin/uname", ["uname", "-p"], 0x7fff0c485da8 /* 63 vars */) = -1 ENOENT (No such file or directory) [pid 4112873] execve("/usr/sbin/uname", ["uname", "-p"], 0x7fff0c485da8 /* 63 vars */) = -1 ENOENT (No such file or directory) [pid 4112873] execve("/usr/bin/uname", ["uname", "-p"], 0x7fff0c485da8 /* 63 vars */) = -1 ENOENT (No such file or directory) [pid 4112873] execve("/sbin/uname", ["uname", "-p"], 0x7fff0c485da8 /* 63 vars */) = -1 ENOENT (No such file or directory) [pid 4112873] execve("/bin/uname", ["uname", "-p"], 0x7fff0c485da8 /* 63 vars */) = 0 [pid 4112873] +++ exited with 0 +++ --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=4112873, si_uid=1000, si_status=0, si_utime=0, si_stime=0} --- {'language': 'Python', 'version': 'x', 'language_version': '3.8.10', 'os': 'Linux', 'os_version': '5.4.0-109-generic'} +++ exited with 0 +++ After: $ strace -feexecve python3 -c "import os; import platform; __version__ = 'x'; print({'language': 'Python', 'version': __version__, 'language_version': platform.python_version(), 'os': (hasattr(os, 'uname') and os.uname().sysname or platform.system()), 'os_version': (hasattr(os, 'uname') and os.uname().release or platform.release())})" execve("/usr/bin/python3", ["python3", "-c", "import os; import platform; __ve"...], 0x7ffdf3b12e18 /* 63 vars */) = 0 {'language': 'Python', 'version': 'x', 'language_version': '3.8.10', 'os': 'Linux', 'os_version': '5.4.0-109-generic'} +++ exited with 0 +++

Open Graph Description: On Unixes, there is a os.uname() call which provides the same info and we don't need to fork()+execve() to get it. That uname(1) call wastes resources and trips IDSes with its unexpected fork()...

X Description: On Unixes, there is a os.uname() call which provides the same info and we don't need to fork()+execve() to get it. That uname(1) call wastes resources and trips IDSes with its unexpected fo...

Opengraph URL: https://github.com/Asana/python-asana/pull/151

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:d950289c-0fe4-7ec9-33cb-4adcbe7958c2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB904:163D6F:C1C44:105F3C:69976F8B
html-safe-noncec3c762a6f10b07199a24cea541c3115b74811ce81140e0332da18d0125a7a63a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTA0OjE2M0Q2RjpDMUM0NDoxMDVGM0M6Njk5NzZGOEIiLCJ2aXNpdG9yX2lkIjoiMTI4ODYzMDMzOTY0OTM2Nzk0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccd11fc3b41fd8947b5bf1e15b83735a68030f711ceaebe446d8f50e3d5d88291
hovercard-subject-tagpull_request:991293240
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
twitter:imagehttps://avatars.githubusercontent.com/u/1225014?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1225014?s=400&v=4
og:image:altOn Unixes, there is a os.uname() call which provides the same info and we don't need to fork()+execve() to get it. That uname(1) call wastes resources and trips IDSes with its unexpected fork()...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None3f6df5422af98e8455c055522f48ada1a19fab299cf47471bdd590f8b7291770
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/Asana/python-asana git https://github.com/Asana/python-asana.git
octolytics-dimension-user_id1472111
octolytics-dimension-user_loginAsana
octolytics-dimension-repository_id28160576
octolytics-dimension-repository_nwoAsana/python-asana
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id28160576
octolytics-dimension-repository_network_root_nwoAsana/python-asana
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
releasecefaebe5dce897ac919acd478e66f59c8855d342
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FAsana%2Fpython-asana%2Fpull%2F151%2Fcommits%2F377e9086b0794ddbff709c5310ed580d565bb91a
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%2FAsana%2Fpython-asana%2Fpull%2F151%2Fcommits%2F377e9086b0794ddbff709c5310ed580d565bb91a
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=Asana%2Fpython-asana
Reloadhttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Reloadhttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Reloadhttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Asana https://github.com/Asana
python-asanahttps://github.com/Asana/python-asana
Notifications https://github.com/login?return_to=%2FAsana%2Fpython-asana
Fork 109 https://github.com/login?return_to=%2FAsana%2Fpython-asana
Star 332 https://github.com/login?return_to=%2FAsana%2Fpython-asana
Code https://github.com/Asana/python-asana
Issues 9 https://github.com/Asana/python-asana/issues
Pull requests 7 https://github.com/Asana/python-asana/pulls
Actions https://github.com/Asana/python-asana/actions
Security 0 https://github.com/Asana/python-asana/security
Insights https://github.com/Asana/python-asana/pulse
Code https://github.com/Asana/python-asana
Issues https://github.com/Asana/python-asana/issues
Pull requests https://github.com/Asana/python-asana/pulls
Actions https://github.com/Asana/python-asana/actions
Security https://github.com/Asana/python-asana/security
Insights https://github.com/Asana/python-asana/pulse
Sign up for GitHub https://github.com/signup?return_to=%2FAsana%2Fpython-asana%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FAsana%2Fpython-asana%2Fissues%2Fnew%2Fchoose
wdoekeshttps://github.com/wdoekes
Asana:masterhttps://github.com/Asana/python-asana/tree/master
ossobv:fix-not-spawning-uname-on-every-version-lookuphttps://github.com/ossobv/python-asana/tree/fix-not-spawning-uname-on-every-version-lookup
Conversation 1 https://github.com/Asana/python-asana/pull/151
Commits 1 https://github.com/Asana/python-asana/pull/151/commits
Checks 1 https://github.com/Asana/python-asana/pull/151/checks
Files changed https://github.com/Asana/python-asana/pull/151/files
Please reload this pagehttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Do not spawn uname(1) every time version info is needed https://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a#top
Show all changes 1 commit https://github.com/Asana/python-asana/pull/151/files
377e908 Do not spawn uname(1) every time version info is needed wdoekes Jul 8, 2022 https://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Clear filters https://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Please reload this pagehttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Please reload this pagehttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
Please reload this pagehttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a
https://github.com/wdoekes
wdoekeshttps://github.com/Asana/python-asana/commits?author=wdoekes
asana/client.pyhttps://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a#diff-e0bc4d31897a8753ead5076403f536abe37713f3f91d672fd5c2b69f1b7cbb10
View file https://github.com/Asana/python-asana/blob/377e9086b0794ddbff709c5310ed580d565bb91a/asana/client.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/Asana/python-asana/pull/151/commits/{{ revealButtonHref }}
https://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a#diff-e0bc4d31897a8753ead5076403f536abe37713f3f91d672fd5c2b69f1b7cbb10
https://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a#diff-e0bc4d31897a8753ead5076403f536abe37713f3f91d672fd5c2b69f1b7cbb10
https://github.com/Asana/python-asana/pull/151/commits/377e9086b0794ddbff709c5310ed580d565bb91a#diff-e0bc4d31897a8753ead5076403f536abe37713f3f91d672fd5c2b69f1b7cbb10
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.