Refs #27753 -- Removed django.utils._os.abspathu(), upath(), and npath().

This commit is contained in:
Tim Graham 2019-02-04 19:50:30 -05:00
parent d1f4b3c68a
commit efe28d3f56
2 changed files with 5 additions and 16 deletions

View File

@ -4,22 +4,6 @@ from os.path import abspath, dirname, join, normcase, sep
from django.core.exceptions import SuspiciousFileOperation
# For backwards-compatibility in Django 2.0
abspathu = abspath
def upath(path):
"""Always return a unicode path (did something for Python 2)."""
return path
def npath(path):
"""
Always return a native path, that is unicode on Python 3 and bytestring on
Python 2. Noop for Python 3.
"""
return path
def safe_join(base, *paths):
"""

View File

@ -257,6 +257,11 @@ Django 3.0, we're removing these APIs at this time.
* ``django.utils.decorators.available_attrs()`` - This function returns
``functools.WRAPPER_ASSIGNMENTS``.
* ``django.utils._os.abspathu()`` - Alias of :func:`os.path.abspath`.
* ``django.utils._os.upath()`` and ``npath()`` - These functions do nothing on
Python 3.
Miscellaneous
-------------