summaryrefslogtreecommitdiff
path: root/sphinx/util/osutil.py
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2018-02-05 21:37:45 +0000
committerStephen Finucane <stephen@that.guru>2018-02-07 11:26:59 +0000
commitd35cda9943ebb6d9657f03a7231963c4f4798787 (patch)
treeb31fc57fc215409a800a6833b2b96fe020e5f6f6 /sphinx/util/osutil.py
parent05f851fa1907dc14100b1391aa2d692f80426f63 (diff)
downloadsphinx-git-d35cda9943ebb6d9657f03a7231963c4f4798787.tar.gz
util: Mark deprecated functions with warning
This ensures the functions can actually be removed as expected. Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r--sphinx/util/osutil.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py
index b52fde0d6..21464bbe6 100644
--- a/sphinx/util/osutil.py
+++ b/sphinx/util/osutil.py
@@ -19,11 +19,14 @@ import re
import shutil
import sys
import time
+import warnings
from io import BytesIO, StringIO
from os import path
from six import PY2, PY3, text_type
+from sphinx.deprecation import RemovedInSphinx30Warning
+
if False:
# For type annotation
from typing import Any, Iterator, List, Tuple, Union # NOQA
@@ -181,8 +184,10 @@ def make_filename(string):
def ustrftime(format, *args):
# type: (unicode, Any) -> unicode
- # [DEPRECATED] strftime for unicode strings
- # It will be removed at Sphinx-1.5
+ """[DEPRECATED] strftime for unicode strings."""
+ warnings.warn('sphinx.util.osutil.ustrtime is deprecated for removal',
+ RemovedInSphinx30Warning)
+
if not args:
# If time is not specified, try to use $SOURCE_DATE_EPOCH variable
# See https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal