[issue31583] 2to3 call for file in current directory yields error

2018-11-04 Thread Denis Osipov


Change by Denis Osipov :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2018-04-18 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 1957e7b76a1319995360492223a4dfe1cd5d105c by Łukasz Langa (Miss 
Islington (bot)) in branch '3.6':
bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758) (GH-6529)
https://github.com/python/cpython/commit/1957e7b76a1319995360492223a4dfe1cd5d105c


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2018-04-18 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 67067d85eb1df8c52399f9fc74dc4c1a32ec86cd by Łukasz Langa (Miss 
Islington (bot)) in branch '3.7':
bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758) (#6528)
https://github.com/python/cpython/commit/67067d85eb1df8c52399f9fc74dc4c1a32ec86cd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2018-04-18 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6223

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2018-04-18 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6222

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2018-04-18 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset e3a523a0fa16aec880880928303bfcbd1fb74bc2 by Łukasz Langa (Denis 
Osipov) in branch 'master':
bpo-31583: Fix 2to3 for using with --add-suffix option (GH-3758)
https://github.com/python/cpython/commit/e3a523a0fa16aec880880928303bfcbd1fb74bc2


--
nosy: +lukasz.langa

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread Jonathan Abdo

Jonathan Abdo  added the comment:

Inserting (with 12 spaces)

if not output_dir:
output_dir = "./"

at lines 83 and 84 works as a temporary workaround.  `StdoutRefactoringTool` is 
not receiving an `output_dir` from `option`, which seems to only be an issue 
when `--add-sufix` is used.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread R. David Murray

R. David Murray  added the comment:

Yes, redistributors sometimes backport non-security fixes if they consider them 
important enough.

Note that I haven't evaluated the merits of this issue, and there is a related 
issue about how 2to3 finds its fixers that this may overlap with.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread Jonathan Abdo

Jonathan Abdo  added the comment:

Gotcha, sorry about that. Active uses 3.5, so I guess I would take it up
with them?

On Oct 3, 2017 2:27 PM, "R. David Murray"  wrote:

>
> R. David Murray  added the comment:
>
> 3.5 is in security-fix-only mode, and we use versions to indicate which
> versions we plan to fix the bug in.
>
> --
> nosy: +r.david.murray
> versions:  -Python 3.5
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread R. David Murray

R. David Murray  added the comment:

3.5 is in security-fix-only mode, and we use versions to indicate which 
versions we plan to fix the bug in.

--
nosy: +r.david.murray
versions:  -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-10-03 Thread Jonathan Abdo

Jonathan Abdo  added the comment:

Issue also effects 3.5

--
nosy: +jabdo
versions: +Python 3.5
Added file: https://bugs.python.org/file47187/2to3bugpython.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-09-29 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-09-25 Thread Denis Osipov

Changes by Denis Osipov :


--
keywords: +patch
pull_requests: +3744
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue31583] 2to3 call for file in current directory yields error

2017-09-25 Thread Denis Osipov

New submission from Denis Osipov:

2to3 doesn't work if called for file in current directory with --add-suffix 
option.

$ /d/repos/cpython/python.bat /d/repos/cpython/Tools/scripts/2to3 -n -W 
--add-suffix=3 test2to3.py
Running Debug|x64 interpreter...
WARNING: --write-unchanged-files/-W implies -w.
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Refactored test2to3.py
--- test2to3.py (original)
+++ test2to3.py (refactored)

--some changes--

Traceback (most recent call last):
  File "D:/repos/cpython/Tools/scripts/2to3", line 5, in 
sys.exit(main("lib2to3.fixes"))
  File "D:\repos\cpython\lib\lib2to3\main.py", line 259, in main
options.processes)
  File "D:\repos\cpython\lib\lib2to3\refactor.py", line 687, in refactor
items, write, doctests_only)
  File "D:\repos\cpython\lib\lib2to3\refactor.py", line 282, in refactor
self.refactor_file(dir_or_file, write, doctests_only)
  File "D:\repos\cpython\lib\lib2to3\refactor.py", line 728, in refactor_file
*args, **kwargs)
  File "D:\repos\cpython\lib\lib2to3\refactor.py", line 339, in refactor_file
write=write, encoding=encoding)
  File "D:\repos\cpython\lib\lib2to3\refactor.py", line 505, in processed_file
self.write_file(new_text, filename, old_text, encoding)
  File "D:\repos\cpython\lib\lib2to3\main.py", line 84, in write_file
os.makedirs(output_dir)
  File "D:\repos\cpython\\lib\os.py", line 221, in makedirs
mkdir(name, mode)
FileNotFoundError: [WinError 3] The system cannot find the path specified: ''


It works well if I use absolute path for target file or set -o:

$ /d/repos/cpython/python.bat /d/repos/cpython/Tools/scripts/2to3 -n -W 
--add-suffix=3 /d/MyPythonScripts/test2to3.py

$ /d/repos/cpython/python.bat /d/repos/cpython/Tools/scripts/2to3 -n -W 
--add-suffix=3 -o . test2to3.py

--
components: 2to3 (2.x to 3.x conversion tool)
messages: 303001
nosy: denis-osipov
priority: normal
severity: normal
status: open
title: 2to3 call for file in current directory yields error
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com