Path: csiph.com!news.dns-netz.com!news.freedyn.net!aioe.org!bofh.it!news.nic.it!robomod From: Andreas Tille Newsgroups: linux.debian.maint.python,linux.debian.bugs.dist Subject: Re: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) Date: Mon, 16 Dec 2019 11:10:02 +0100 Message-ID: References: X-Original-To: Debian Python X-Mailbox-Line: From debian-python-request@lists.debian.org Mon Dec 16 10:07:25 2019 Old-Return-Path: X-Amavis-Spam-Status: No, score=-5.34 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, SARE_MLH_Stock10=1.66] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate:hard: -4.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Mailing-List: archive/latest/17759 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/20191216100707.GQ13090@an3as.eu Approved: robomod@news.nic.it Lines: 30 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: 943083@bugs.debian.org X-Original-Date: Mon, 16 Dec 2019 11:07:07 +0100 X-Original-Message-ID: <20191216100707.GQ13090@an3as.eu> X-Original-References: <20191216081750.GN13090@an3as.eu> <20191216083102.GI2390860@belkar.wrar.name> Xref: csiph.com linux.debian.maint.python:12156 linux.debian.bugs.dist:987418 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