theskumar / python-dotenv

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.
https://saurabh-kumar.com/python-dotenv/
BSD 3-Clause "New" or "Revised" License
7.7k stars 431 forks source link

Enhance dotenv run: Switch to execvpe for better resource management and signal handling #523

Closed eekstunt closed 4 months ago

eekstunt commented 4 months ago

By switching to os.execvpe instead of subprocess.Popen, we can replace the parent dotenv process with the new process specified by the user. This results in only one active process—the program the user intended to run.

Closes #522

eekstunt commented 4 months ago

Hello @theskumar @bbc2, are you available for a review of this small PR?

theskumar commented 4 months ago

This look great! Merging in will be part of new release

pmeier commented 3 months ago

@theskumar any chance you can cut a release soon that includes this PR? Spent three hours today hunting a ghost only to find that the signal I sent is swallowed by dotenv run.

aberenda-optifino commented 1 month ago

Hi Any updates here? Do you know when you can release?