void-packages/srcpkgs/python-docutils/patches/0026-py3-Handle-os.getcwdu-...

43 lines
1.4 KiB
Diff

From e90cfe945193ac99cc9ac7a439d1ccc2ad857a6c Mon Sep 17 00:00:00 2001
From: Stephen Finucane <stephen@that.guru>
Date: Tue, 27 Aug 2019 12:11:40 +0000
Subject: [PATCH 26/26] py3: Handle 'os.getcwdu' to 'os.getcwd' rename
We don't need to do the reverse since none of the callers seems to care.
Based on patch by: Stephen Finucane <stephen@that.guru>
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8374 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Signed-off-by: Doan Tran Cong Danh <congdanhqx@gmail.com>
---
docutils/frontend.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docutils/frontend.py b/docutils/frontend.py
index 7bfff6a..372ca44 100644
--- a/docutils/frontend.py
+++ b/docutils/frontend.py
@@ -38,8 +38,10 @@ import optparse
from optparse import SUPPRESS_HELP
if sys.version_info >= (3, 0):
from configparser import RawConfigParser
+ from os import getcwd
else:
from ConfigParser import RawConfigParser
+ from os import getcwdu as getcwd
import docutils
import docutils.utils
@@ -256,7 +258,7 @@ def make_paths_absolute(pathdict, keys, base_path=None):
`OptionParser.relative_path_settings`.
"""
if base_path is None:
- base_path = os.getcwdu() # type(base_path) == unicode
+ base_path = os.getcwd() # type(base_path) == unicode
# to allow combining non-ASCII cwd with unicode values in `pathdict`
for key in keys:
if key in pathdict:
--
2.24.0.375.geb5ae68d41