Opened 7 years ago
Closed 7 years ago
#30173 closed Cleanup/optimization (fixed)
Use subprocess.run and PGPASSWORD for client in postgres backend
| Reported by: | Daniel Bowring | Owned by: | nobody |
|---|---|---|---|
| Component: | Database layer (models, ORM) | Version: | 2.1 |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Accepted | |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | yes |
| Easy pickings: | no | UI/UX: | no |
Description
subprocess.run was added in python 3.5 (which is the minimum version since Django 2.1). This function allows you to pass a custom environment for the subprocess.
Using this in django.db.backends.postgres.client to set PGPASSWORD simplifies the code and makes it more reliable.
Change History (5)
comment:1 by , 7 years ago
| Has patch: | set |
|---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
| Component: | Uncategorized → Database layer (models, ORM) |
|---|---|
| Easy pickings: | unset |
| Patch needs improvement: | set |
| Triage Stage: | Unreviewed → Accepted |
| Type: | Uncategorized → Cleanup/optimization |
Some test failures need to be addressed.
Note:
See TracTickets
for help on using tickets.
Github PR