diff options
author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-03-07 20:43:25 +0900 |
---|---|---|
committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2020-04-29 15:12:39 +0900 |
commit | a86346aca6bf99a8920da366caaad7c47809ecce (patch) | |
tree | 7aa786e7817f9f3e6a338d06df2f02534d91a4c5 /sphinx/util/osutil.py | |
parent | aa773cbc88e692df731c78353a1043201bcb9f91 (diff) | |
download | sphinx-git-a86346aca6bf99a8920da366caaad7c47809ecce.tar.gz |
Remove deprecated features marked as RemovedInSphinx40Warning
Diffstat (limited to 'sphinx/util/osutil.py')
-rw-r--r-- | sphinx/util/osutil.py | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/sphinx/util/osutil.py b/sphinx/util/osutil.py index 6f4322535..e3c4ebedb 100644 --- a/sphinx/util/osutil.py +++ b/sphinx/util/osutil.py @@ -9,18 +9,14 @@ """ import contextlib -import errno import filecmp import os import re import shutil import sys -import warnings from io import StringIO from os import path -from typing import Any, Generator, Iterator, List, Optional, Tuple, Type - -from sphinx.deprecation import RemovedInSphinx40Warning +from typing import Any, Generator, Iterator, List, Optional, Type try: # for ALT Linux (#6712) @@ -28,11 +24,6 @@ try: except ImportError: Path = None # type: ignore -# Errnos that we need. -EEXIST = getattr(errno, 'EEXIST', 0) # RemovedInSphinx40Warning -ENOENT = getattr(errno, 'ENOENT', 0) # RemovedInSphinx40Warning -EPIPE = getattr(errno, 'EPIPE', 0) # RemovedInSphinx40Warning -EINVAL = getattr(errno, 'EINVAL', 0) # RemovedInSphinx40Warning # SEP separates path elements in the canonical file names # @@ -79,13 +70,6 @@ def ensuredir(path: str) -> None: os.makedirs(path, exist_ok=True) -def walk(top: str, topdown: bool = True, followlinks: bool = False) -> Iterator[Tuple[str, List[str], List[str]]]: # NOQA - warnings.warn('sphinx.util.osutil.walk() is deprecated for removal. ' - 'Please use os.walk() instead.', - RemovedInSphinx40Warning) - return os.walk(top, topdown=topdown, followlinks=followlinks) - - def mtimes_of_files(dirnames: List[str], suffix: str) -> Iterator[float]: for dirname in dirnames: for root, dirs, files in os.walk(dirname): @@ -171,13 +155,6 @@ def abspath(pathdir: str) -> str: return pathdir -def getcwd() -> str: - warnings.warn('sphinx.util.osutil.getcwd() is deprecated. ' - 'Please use os.getcwd() instead.', - RemovedInSphinx40Warning) - return os.getcwd() - - @contextlib.contextmanager def cd(target_dir: str) -> Generator[None, None, None]: cwd = os.getcwd() |