René's URL Explorer Experiment


Title: perf: replace dict merge with ChainMap in resolve_variables by matheusvir · Pull Request #628 · theskumar/python-dotenv · GitHub

Open Graph Title: perf: replace dict merge with ChainMap in resolve_variables by matheusvir · Pull Request #628 · theskumar/python-dotenv

X Title: perf: replace dict merge with ChainMap in resolve_variables by matheusvir · Pull Request #628 · theskumar/python-dotenv

Description: Reads key-value pairs from a .env file and can set them as environment variables. It helps in developing applications following the 12-factor principles. - perf: replace dict merge with ChainMap in resolve_variables by matheusvir · Pull Request #628 · theskumar/python-dotenv

Open Graph Description: What was done Changes were made to resolve_variables() in src/dotenv/main.py. Previously, python-dotenv built the resolved environment by repeatedly merging dictionaries, creating full copies of al...

X Description: What was done Changes were made to resolve_variables() in src/dotenv/main.py. Previously, python-dotenv built the resolved environment by repeatedly merging dictionaries, creating full copies of al...

Opengraph URL: https://github.com/theskumar/python-dotenv/pull/628

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/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:0066410d-9a38-3469-be55-b561b6341927
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE498:14EB29:52E0DD:72B7AC:6AFDE700
html-safe-nonce7b60c185a6693b1cd75c01de03db391c227ed01cdc448904d0e7ea9b665e78a7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNDk4OjE0RUIyOTo1MkUwREQ6NzJCN0FDOjZBRkRFNzAwIiwidmlzaXRvcl9pZCI6IjQ3ODcwNjMwMzgyOTUyNzExNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacbf2a08c2f95fc3833730a683a2a1ea02f35651c17d44d5ee8d238af979d6071e
hovercard-subject-tagpull_request:3386962773
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///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/theskumar/python-dotenv/628/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/df7ec9c55cd3520e40dc22979b05f40dee4be5f586d976a7d06a521a8bbc3e77/theskumar/python-dotenv/pull/628
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/df7ec9c55cd3520e40dc22979b05f40dee4be5f586d976a7d06a521a8bbc3e77/theskumar/python-dotenv/pull/628
og:image:altWhat was done Changes were made to resolve_variables() in src/dotenv/main.py. Previously, python-dotenv built the resolved environment by repeatedly merging dictionaries, creating full copies of al...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamematheusvir
hostnamegithub.com
expected-hostnamegithub.com
None91ef1a291a064ac31ac459ab3f75261dbdd924c41ea5bd027e591c5b46cc9ce7
turbo-cache-controlno-cache
go-importgithub.com/theskumar/python-dotenv git https://github.com/theskumar/python-dotenv.git
octolytics-dimension-user_id236356
octolytics-dimension-user_logintheskumar
octolytics-dimension-repository_id23727790
octolytics-dimension-repository_nwotheskumar/python-dotenv
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id23727790
octolytics-dimension-repository_network_root_nwotheskumar/python-dotenv
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
released62bc98ce2346f4006e4a2810e9e22f37e7e6422
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/theskumar/python-dotenv/pull/628#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftheskumar%2Fpython-dotenv%2Fpull%2F628
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%2Ftheskumar%2Fpython-dotenv%2Fpull%2F628
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=theskumar%2Fpython-dotenv
Reloadhttps://github.com/theskumar/python-dotenv/pull/628
Reloadhttps://github.com/theskumar/python-dotenv/pull/628
Reloadhttps://github.com/theskumar/python-dotenv/pull/628
theskumarhttps://github.com/theskumar
python-dotenvhttps://github.com/theskumar/python-dotenv
Codehttps://github.com/theskumar/python-dotenv
Issues52 (52)https://github.com/theskumar/python-dotenv/issues
Pull requests74 (74)https://github.com/theskumar/python-dotenv/pulls
Actionshttps://github.com/theskumar/python-dotenv/actions
Wikihttps://github.com/theskumar/python-dotenv/wiki
Security and quality1 (1)https://github.com/theskumar/python-dotenv/security
Insightshttps://github.com/theskumar/python-dotenv/pulse
https://github.com/theskumar/python-dotenv
matheusvirhttps://github.com/matheusvir
theskumar:mainhttps://github.com/theskumar/python-dotenv/tree/main
matheusvir:optimization/chainmap-resolve-variableshttps://github.com/matheusvir/python-dotenv/tree/optimization/chainmap-resolve-variables
Conversationhttps://github.com/theskumar/python-dotenv/pull/628
Commits11 (11)https://github.com/theskumar/python-dotenv/pull/628/commits
Checkshttps://github.com/theskumar/python-dotenv/pull/628/checks
Files changedhttps://github.com/theskumar/python-dotenv/pull/628/files
perf: replace dict merge with ChainMap in resolve_variableshttps://github.com/theskumar/python-dotenv/pull/628#top
matheusvirhttps://github.com/matheusvir
theskumar:mainhttps://github.com/theskumar/python-dotenv/tree/main
matheusvir:optimization/chainmap-resolve-variableshttps://github.com/matheusvir/python-dotenv/tree/optimization/chainmap-resolve-variables
https://github.com/matheusvir
matheusvirhttps://github.com/matheusvir
Mar 12, 2026https://github.com/theskumar/python-dotenv/pull/628#issue-4061552596
https://raw.githubusercontent.com/matheusvir/eda-oss-performance/main/analysis/plots/python-dotenv/dotenv_chainmap_no_interpolation.png
https://raw.githubusercontent.com/matheusvir/eda-oss-performance/main/analysis/plots/python-dotenv/dotenv_chainmap_interpolation.png
matheusvir/eda-oss-performancehttps://github.com/matheusvir/eda-oss-performance
setup/python-dotenv/Dockerfilehttps://github.com/matheusvir/eda-oss-performance/blob/main/setup/python-dotenv/Dockerfile
experiments/python-dotenv/chainmap_load_test/generate_load.pyhttps://github.com/matheusvir/eda-oss-performance/blob/main/experiments/python-dotenv/chainmap_load_test/generate_load.py
experiments/python-dotenv/chainmap_load_test/run_load_test_no_interpolation.pyhttps://github.com/matheusvir/eda-oss-performance/blob/main/experiments/python-dotenv/chainmap_load_test/run_load_test_no_interpolation.py
experiments/python-dotenv/chainmap_load_test/run_load_test_interpolation.pyhttps://github.com/matheusvir/eda-oss-performance/blob/main/experiments/python-dotenv/chainmap_load_test/run_load_test_interpolation.py
experiments/python-dotenv/chainmap_load_test/run.shhttps://github.com/matheusvir/eda-oss-performance/blob/main/experiments/python-dotenv/chainmap_load_test/run.sh
#504https://github.com/theskumar/python-dotenv/issues/504
Please reload this pagehttps://github.com/theskumar/python-dotenv/pull/628
RailtonDantashttps://github.com/RailtonDantas
March 11, 2026 22:28https://github.com/theskumar/python-dotenv/pull/628#commits-pushed-da4c0e2
https://github.com/RailtonDantas
https://github.com/matheusvir
https://github.com/ManoelNetto26
https://github.com/Predd0o
https://github.com/Lucaslg7
https://github.com/jpereira-Dev
perf: use ChainMap in resolve_variables to avoid redundant dict copieshttps://github.com/theskumar/python-dotenv/pull/628/commits/da4c0e208d39a639960ef6ad41c41cc570796977
da4c0e2https://github.com/theskumar/python-dotenv/pull/628/commits/da4c0e208d39a639960ef6ad41c41cc570796977
https://github.com/RailtonDantas
https://github.com/matheusvir
https://github.com/ManoelNetto26
https://github.com/Predd0o
https://github.com/Lucaslg7
https://github.com/jpereira-Dev
docs(python-dotenv): describe resolve_variables methodhttps://github.com/theskumar/python-dotenv/pull/628/commits/93439895c9eb3fa4a1ba6176e31d4037d3068c09
9343989https://github.com/theskumar/python-dotenv/pull/628/commits/93439895c9eb3fa4a1ba6176e31d4037d3068c09
https://github.com/matheusvir
matheusvirhttps://github.com/matheusvir
force-pushedhttps://github.com/theskumar/python-dotenv/compare/8a3d28737861581b4c0c65b1b25c20a9a5dad64d..93439895c9eb3fa4a1ba6176e31d4037d3068c09
8a3d287https://github.com/theskumar/python-dotenv/commit/8a3d28737861581b4c0c65b1b25c20a9a5dad64d
9343989https://github.com/theskumar/python-dotenv/commit/93439895c9eb3fa4a1ba6176e31d4037d3068c09
Compare https://github.com/theskumar/python-dotenv/compare/8a3d28737861581b4c0c65b1b25c20a9a5dad64d..93439895c9eb3fa4a1ba6176e31d4037d3068c09
March 12, 2026 01:38https://github.com/theskumar/python-dotenv/pull/628#event-23490532934
RailtonDantashttps://github.com/RailtonDantas
March 11, 2026 23:19https://github.com/theskumar/python-dotenv/pull/628#commits-pushed-cfdc7e5
https://github.com/RailtonDantas
style: merge collections imports into single linehttps://github.com/theskumar/python-dotenv/pull/628/commits/cfdc7e57a6b9c5ee429f3a25d8c4c6d51fc450a2
cfdc7e5https://github.com/theskumar/python-dotenv/pull/628/commits/cfdc7e57a6b9c5ee429f3a25d8c4c6d51fc450a2
https://github.com/RailtonDantas
style: apply ruff formatting to main.pyhttps://github.com/theskumar/python-dotenv/pull/628/commits/f3a1b2fa50f475ba8af0400d989bee19d344df66
f3a1b2fhttps://github.com/theskumar/python-dotenv/pull/628/commits/f3a1b2fa50f475ba8af0400d989bee19d344df66
https://github.com/RailtonDantas
style: add type comment to ChainMap assignments in resolve_variableshttps://github.com/theskumar/python-dotenv/pull/628/commits/51aa9b8f2c34630b77f3dca468a9b123bf8f3228
51aa9b8https://github.com/theskumar/python-dotenv/pull/628/commits/51aa9b8f2c34630b77f3dca468a9b123bf8f3228
https://github.com/RailtonDantas
style: fix unecessary spacehttps://github.com/theskumar/python-dotenv/pull/628/commits/4cdda2e250d4f5cf8b2c69e76290d1037b8ca966
4cdda2ehttps://github.com/theskumar/python-dotenv/pull/628/commits/4cdda2e250d4f5cf8b2c69e76290d1037b8ca966
https://github.com/RailtonDantas
style: fix space problemhttps://github.com/theskumar/python-dotenv/pull/628/commits/5c5db9616999d6e9825c3eebad8b686ff5a6865c
5c5db96https://github.com/theskumar/python-dotenv/pull/628/commits/5c5db9616999d6e9825c3eebad8b686ff5a6865c
https://github.com/RailtonDantas
style: fix ruff problemshttps://github.com/theskumar/python-dotenv/pull/628/commits/738a47f7673ab48c53162f0cfa5f19a988bd52d3
738a47fhttps://github.com/theskumar/python-dotenv/pull/628/commits/738a47f7673ab48c53162f0cfa5f19a988bd52d3
https://github.com/RailtonDantas
style: add breakline after unset_key()https://github.com/theskumar/python-dotenv/pull/628/commits/03a4ee947db1198d08e132c4546e90bf36666e14
03a4ee9https://github.com/theskumar/python-dotenv/pull/628/commits/03a4ee947db1198d08e132c4546e90bf36666e14
https://github.com/RailtonDantas
style: fix ruff problemshttps://github.com/theskumar/python-dotenv/pull/628/commits/e7ca8b39af583d35a99ccaacf1c80ba28596392e
e7ca8b3https://github.com/theskumar/python-dotenv/pull/628/commits/e7ca8b39af583d35a99ccaacf1c80ba28596392e
https://github.com/RailtonDantas
style: fix ruff problemshttps://github.com/theskumar/python-dotenv/pull/628/commits/1f1ba01eb85b27902f7970346cc8b76896823858
1f1ba01https://github.com/theskumar/python-dotenv/pull/628/commits/1f1ba01eb85b27902f7970346cc8b76896823858
https://github.com/matheusvir
matheusvirhttps://github.com/matheusvir
Mar 26, 2026https://github.com/theskumar/python-dotenv/pull/628#event-23912871387
https://github.com/TheNetherWatcher
TheNetherWatcherhttps://github.com/TheNetherWatcher
Oct 9, 2026 https://github.com/theskumar/python-dotenv/pull/628#ref-pullrequest-5783878626
fix: don't let a variable without a value mask the environment in expansion #728 https://github.com/theskumar/python-dotenv/pull/728
https://github.co/hiddenchars
https://github.com/theskumar/python-dotenv/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftheskumar%2Fpython-dotenv%2Fpull%2F628
Please reload this pagehttps://github.com/theskumar/python-dotenv/pull/628
Please reload this pagehttps://github.com/theskumar/python-dotenv/pull/628
https://github.com/matheusvir
https://github.com/RailtonDantas
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.