From f72202cf11450275abf4437c475bd2d2931f67c5 Mon Sep 17 00:00:00 2001 From: Denis Osipov Date: Tue, 26 Sep 2017 09:59:17 +0500 Subject: [PATCH 1/3] Fix bpo-31583 --- Lib/lib2to3/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/lib2to3/main.py b/Lib/lib2to3/main.py index 1a1df013ade3ea..d6b708848ede1a 100644 --- a/Lib/lib2to3/main.py +++ b/Lib/lib2to3/main.py @@ -80,7 +80,7 @@ def write_file(self, new_text, filename, old_text, encoding): filename += self._append_suffix if orig_filename != filename: output_dir = os.path.dirname(filename) - if not os.path.isdir(output_dir): + if not os.path.isdir(output_dir) and output_dir: os.makedirs(output_dir) self.log_message('Writing converted %s to %s.', orig_filename, filename) From 33b97b26f177d133277621a018226efe0efb9e4b Mon Sep 17 00:00:00 2001 From: Denis Osipov Date: Tue, 26 Sep 2017 10:11:46 +0500 Subject: [PATCH 2/3] Add news entry in Misc/NEWS.d --- .../next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst diff --git a/Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst b/Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst new file mode 100644 index 00000000000000..2d2b0ba0554415 --- /dev/null +++ b/Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst @@ -0,0 +1,2 @@ +Fix 2to3 for using with --add-suffix option without -o or --output-dir +option for relative path to files in current directory. From 06237dab27ef98d22a01ec439cd68dff99fc1f7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Langa?= Date: Tue, 17 Apr 2018 15:00:19 -0700 Subject: [PATCH 3/3] Bumped to get CI run again --- .../next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst b/Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst index 2d2b0ba0554415..472f61c5129e33 100644 --- a/Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst +++ b/Misc/NEWS.d/next/Tools-Demos/2017-09-26-10-11-21.bpo-31583.TM90_H.rst @@ -1,2 +1,2 @@ -Fix 2to3 for using with --add-suffix option without -o or --output-dir +Fix 2to3 for using with --add-suffix option but without --output-dir option for relative path to files in current directory.