[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye)



On Mon, Dec 16, 2019 at 01:31:02PM +0500, Andrey Rahmatullin wrote:
> On Mon, Dec 16, 2019 at 09:17:50AM +0100, Andreas Tille wrote:
> >     inputParentPath = lineIter.next().strip()
> > AttributeError: '_io.StringIO' object has no attribute 'next'
> This should be changed to next(lineIter).strip(), 2to3 for some reason
> missed it.

I'm afraid 2to3 skipped this very file.  I retried manually:

$ 2to3 -w roundTripNCLTest.py 
RefactoringTool: Skipping optional fixer: buffer
RefactoringTool: Skipping optional fixer: idioms
RefactoringTool: Skipping optional fixer: set_literal
RefactoringTool: Skipping optional fixer: ws_comma
RefactoringTool: Can't parse roundTripNCLTest.py: ParseError: bad input: type=22, value='=', context=('', (41, 93))
RefactoringTool: No files need to be modified.
RefactoringTool: There was 1 error:
RefactoringTool: Can't parse roundTripNCLTest.py: ParseError: bad input: type=22, value='=', context=('', (41, 93))


I also had to replace a call to file() by open() - now it works.

Is this by any chance a bug in 2to3?

Kind regards

        Andreas.

-- 
http://fam-tille.de


Reply to: