Opened 9 months ago
Closed 9 months ago
#35320 closed Cleanup/optimization (fixed)
Remove unnecessary django.core.files.move._samefile() hook.
Reported by: | bcail | Owned by: | bcail |
---|---|---|---|
Component: | File uploads/storage | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | bcail | Triage Stage: | Ready for checkin |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Currently, there's a custom _samefile() function in core/files/move.py
. It checks for whether os.path
has a samefile
function, and falls back to another implementation if it doesn't.
In 2012, Python was updated to put samefile
in genericpath
, so it's always available in os.path
.
Could we remove the custom _samefile()
function and always use the Python version?
Change History (8)
comment:1 by , 9 months ago
Component: | Uncategorized → File uploads/storage |
---|
comment:2 by , 9 months ago
Type: | Uncategorized → Cleanup/optimization |
---|---|
Version: | 5.0 → dev |
comment:3 by , 9 months ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Triage Stage: | Unreviewed → Accepted |
comment:4 by , 9 months ago
Summary: | Always use `os.path.samefile` in `core/files/move.py` → Remove unnecessary django.core.files.move._samefile() hook. |
---|
comment:7 by , 9 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Sounds reasonable.