#35320: Always use `os.path.samefile` in `core/files/move.py`
-----------------------------------------+------------------------
Reporter: bcail | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
Currently, there's a custom
[
https://github.com/django/django/blob/main/django/core/files/move.py#L16
_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
[
https://github.com/python/cpython/commit/490b32a3976d84eaf1d6ca8cdcb00eac0ce5055b
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?
--
Ticket URL: <
https://code.djangoproject.com/ticket/35320>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.