An empty value ignores ${name:-default}
Maintainers usually reply within 1 day
@SashaMIT is already working on this.
Since Oct 1, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start by running the Python reproduction in the issue and trace the variable-expansion path for ${name:-default}. Verify the behavior for an empty value, an unset value, a non-empty value, and ${name} without a default; done means the shown cases produce the expected values.
Written by the indexing model from the issue text.
Description
${name:-default} is the POSIX form that uses the default when name is unset or empty. An empty value is returned as itself.
dotenv.dotenv_values(stream=io.StringIO("b=\na=${b:-d}"))
# {'b': '', 'a': ''}
a should be d. A missing b already becomes d. b=c still stays c. ${b} with no default stays empty.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 612
- Avg merge
- 4d 23h
- Merged PRs (30d)
- 4
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from theskumar/python-dotenv
-
set_key and unset_key don't fsync before replacing the .env filePossibly taken @Imkkey claimed this 13 days ago. Openenhancement
Difficulty 3/5 1-2 days Newbie friendliness 72/100
theskumar/python-dotenv#713 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
theskumar/python-dotenv#693 · 1 comment ·
Maintainers usually reply within 1 day
-
python-dotenv installation without cli masks python-dotenv cliPossibly taken @gyanu2507 claimed this 52 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
theskumar/python-dotenv#683 · 4 comments ·
Maintainers usually reply within 1 day
-
Feature Request: Automatically copy `default.env` to `.env`Possibly taken @dradetsky claimed this 162 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
theskumar/python-dotenv#644 · 2 comments ·
Maintainers usually reply within 1 day
-
Add `strict` parameter to `load_dotenv()` and `dotenv_values()` for fail-fast behaviorPossibly taken @AhsanSheraz claimed this 213 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
theskumar/python-dotenv#631 · 3 comments · 1 reaction ·
Maintainers usually reply within 1 day
All issues in theskumar/python-dotenv
Similar issues
-
customer-reported question
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Azure/azure-sdk-for-python#49548 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
btclib-org/btclib-wallet#409 ·
Maintainers usually reply within 1 day
-
Phase 2 PSA Capability & Career Profile
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
bcgov/digital-journeys#2310 ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
fastmachinelearning/hls4ml#1582 ·
Maintainers usually reply within 3 days
-
Sort modelsOpenenhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day