Opened 2 years ago
Closed 2 years 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 , 2 years ago
| Component: | Uncategorized → File uploads/storage |
|---|
comment:2 by , 2 years ago
| Type: | Uncategorized → Cleanup/optimization |
|---|---|
| Version: | 5.0 → dev |
comment:3 by , 2 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
| Triage Stage: | Unreviewed → Accepted |
comment:4 by , 2 years ago
| Summary: | Always use `os.path.samefile` in `core/files/move.py` → Remove unnecessary django.core.files.move._samefile() hook. |
|---|
comment:7 by , 2 years ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Note:
See TracTickets
for help on using tickets.
Sounds reasonable.