René's URL Explorer Experiment


Title: Fix `bm_fastapi` failing when an HTTP proxy is configured by sendaoYan · Pull Request #505 · python/pyperformance · GitHub

Open Graph Title: Fix `bm_fastapi` failing when an HTTP proxy is configured by sendaoYan · Pull Request #505 · python/pyperformance

X Title: Fix `bm_fastapi` failing when an HTTP proxy is configured by sendaoYan · Pull Request #505 · python/pyperformance

Description: Fixes #504 Problem The fastapi benchmark (bm_fastapi) fails when the environment has an HTTP proxy configured — e.g. HTTP_PROXY/http_proxy set, which is common in CI or corporate environments — and 127.0.0.1 is not listed in NO_PROXY. The benchmark starts a uvicorn server on 127.0.0.1 and then talks to it with httpx.AsyncClient(). Because httpx reads proxy configuration from the environment by default, the request to http://127.0.0.1:/items/0 is routed through the proxy. The proxy cannot reach the benchmark machine's loopback address, so it returns 503 Service Unavailable and the benchmark dies: httpx.HTTPStatusError: Server error '503 Service Unavailable' for url 'http://127.0.0.1:40027/items/0' ... RuntimeError: Benchmark died ERROR: Benchmark fastapi failed: Benchmark died Fix Create the client with trust_env=False so it never reads proxy (or .netrc) settings from the environment: async with httpx.AsyncClient(trust_env=False) as client: This is correct for this benchmark because it only ever connects to its own loopback server, so it must never be routed through a proxy. In environments with no proxy configured, trust_env=False behaves identically to the default, so benchmark results are unaffected for the common case. Only bm_fastapi is affected: the other networking benchmarks (bm_tornado_http, bm_asyncio_tcp, bm_asyncio_websockets, bm_async_tree) use clients that do not read proxy environment variables. Testing Reproduced by running the benchmark with proxy environment variables inherited and 127.0.0.1 absent from NO_PROXY: $ python -m pyperformance run bm_fastapi --inherit-environ http_proxy,https_proxy,no_proxy Before the change: Benchmark fastapi failed: Benchmark died with the 503 above. After the change: the benchmark completes and reports a result.

Open Graph Description: Fixes #504 Problem The fastapi benchmark (bm_fastapi) fails when the environment has an HTTP proxy configured — e.g. HTTP_PROXY/http_proxy set, which is common in CI or corporate environments — and...

X Description: Fixes #504 Problem The fastapi benchmark (bm_fastapi) fails when the environment has an HTTP proxy configured — e.g. HTTP_PROXY/http_proxy set, which is common in CI or corporate environments — and...

Opengraph URL: https://github.com/python/pyperformance/pull/505

X: @github

direct link

Domain: github.com

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:92cae239-2504-0ade-c514-0cf28cd39e63
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD4CC:1201C:33AD0D1:449B3A8:6B01EFC4
html-safe-nonce1c96e76ca65dfa7f31b0be18e397b93332c57d08e2cda5f493550dec86a8e61f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENENDOjEyMDFDOjMzQUQwRDE6NDQ5QjNBODo2QjAxRUZDNCIsInZpc2l0b3JfaWQiOiIyNjMyOTIyODY5NTkxNTY4MzI1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac044c6ded0c5c8796e7b6eb6d614a9b43d03f8e71ecfc71831ecfeba2571ca54a
hovercard-subject-tagpull_request:5173876792
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/pyperformance/pull/505/files
twitter:imagehttps://avatars.githubusercontent.com/u/24123821?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/24123821?s=400&v=4
og:image:altFixes #504 Problem The fastapi benchmark (bm_fastapi) fails when the environment has an HTTP proxy configured — e.g. HTTP_PROXY/http_proxy set, which is common in CI or corporate environments — and...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/pyperformance git https://github.com/python/pyperformance.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id65949828
octolytics-dimension-repository_nwopython/pyperformance
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id65949828
octolytics-dimension-repository_network_root_nwopython/pyperformance
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/pyperformance/pull/505/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fpyperformance%2Fpull%2F505%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%2Fpyperformance%2Fpull%2F505%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%2Fpyperformance
Reloadhttps://github.com/python/pyperformance/pull/505/files
Reloadhttps://github.com/python/pyperformance/pull/505/files
Reloadhttps://github.com/python/pyperformance/pull/505/files
pythonhttps://github.com/python
pyperformancehttps://github.com/python/pyperformance
Codehttps://github.com/python/pyperformance
Issues53 (53)https://github.com/python/pyperformance/issues
Pull requests34 (34)https://github.com/python/pyperformance/pulls
Actionshttps://github.com/python/pyperformance/actions
Projectshttps://github.com/python/pyperformance/projects
Security and qualityhttps://github.com/python/pyperformance/security
Insightshttps://github.com/python/pyperformance/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fpyperformance%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fpyperformance%2Fissues%2Fnew%2Fchoose
savannahostrowskihttps://github.com/savannahostrowski
python:mainhttps://github.com/python/pyperformance/tree/main
sendaoYan:fix-fastapi-proxyhttps://github.com/sendaoYan/pyperformance-ysd/tree/fix-fastapi-proxy
Conversation 3 https://github.com/python/pyperformance/pull/505
Commits 4 https://github.com/python/pyperformance/pull/505/commits
Checks 0 https://github.com/python/pyperformance/pull/505/checks
Files changed https://github.com/python/pyperformance/pull/505/files
Please reload this pagehttps://github.com/python/pyperformance/pull/505/files
Fix bm_fastapi failing when an HTTP proxy is configured https://github.com/python/pyperformance/pull/505/files#top
Show all changes 4 commits https://github.com/python/pyperformance/pull/505/files
142b5ec Fix bm_fastapi benchmark failing when an HTTP proxy is configured sendaoYan Nov 5, 2026 https://github.com/python/pyperformance/pull/505/commits/142b5ecefc03f23e6a9e7c06057ee91c7225f2e9
26d1946 Merge branch 'main' into fix-fastapi-proxy hugovk Nov 7, 2026 https://github.com/python/pyperformance/pull/505/commits/26d1946dcc37f3ad43bb3a8094b273dcd7a2a302
44f94bc Merge branch 'main' into fix-fastapi-proxy sendaoYan Nov 9, 2026 https://github.com/python/pyperformance/pull/505/commits/44f94bc0e35c1822cefdeb0e3db460b3e172a4ac
06e5e7f Merge branch 'main' into fix-fastapi-proxy savannahostrowski Nov 9, 2026 https://github.com/python/pyperformance/pull/505/commits/06e5e7fb0ef310eb75c68c5d88998e30302c27cc
Clear filters https://github.com/python/pyperformance/pull/505/files
Please reload this pagehttps://github.com/python/pyperformance/pull/505/files
Please reload this pagehttps://github.com/python/pyperformance/pull/505/files
pyperformance/data-files/benchmarks/bm_fastapi/run_benchmark.pyhttps://github.com/python/pyperformance/pull/505/files#diff-69929ca712583806422c053bde2bf98eef8b5a03dd9088996fc50091ac530854
View file https://github.com/sendaoYan/pyperformance-ysd/blob/06e5e7fb0ef310eb75c68c5d88998e30302c27cc/pyperformance/data-files/benchmarks/bm_fastapi/run_benchmark.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/pyperformance/pull/505/{{ revealButtonHref }}
https://github.com/python/pyperformance/pull/505/files#diff-69929ca712583806422c053bde2bf98eef8b5a03dd9088996fc50091ac530854
https://github.com/python/pyperformance/pull/505/files#diff-69929ca712583806422c053bde2bf98eef8b5a03dd9088996fc50091ac530854
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.