Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.maint.python > #12154 > unrolled thread
| Started by | Andreas Tille <andreas@an3as.eu> |
|---|---|
| First post | 2019-12-16 09:30 +0100 |
| Last post | 2019-12-16 11:20 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.debian.maint.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Bug#943083: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) Andreas Tille <andreas@an3as.eu> - 2019-12-16 09:30 +0100
Bug#943083: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) Andrey Rahmatullin <wrar@debian.org> - 2019-12-16 09:40 +0100
Re: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) Andreas Tille <andreas@an3as.eu> - 2019-12-16 11:10 +0100
Re: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) Andrey Rahmatullin <wrar@debian.org> - 2019-12-16 11:20 +0100
| From | Andreas Tille <andreas@an3as.eu> |
|---|---|
| Date | 2019-12-16 09:30 +0100 |
| Subject | Bug#943083: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) |
| Message-ID | <zdTLH-1Ej-3@gated-at.bofh.it> |
Control: tags -1 help
Hi,
I tried 2to3 on the Python files belonging to libncl test suite.
Upstream is using a somehow complex method to read config files.
Before trying a complete rewrite I wonder whether someone might
be able to make some sense out of:
...
make check-local
make[4]: Entering directory '/build/libncl-2.1.21+git20190531.feceb81/example/ncltest'
/usr/bin/python3 ../../test/roundTripNCLTest.py ../../example/ncltest/ncltest ../../test/OldValidIn ../../test/OldValidOut
Traceback (most recent call last):
File "../../test/roundTripNCLTest.py", line 243, in <module>
inputParentPath = lineIter.next().strip()
AttributeError: '_io.StringIO' object has no attribute 'next'
make[4]: *** [Makefile:626: check-local] Error 1
...
Kind regards
Andreas.
--
http://fam-tille.de
[toc] | [next] | [standalone]
| From | Andrey Rahmatullin <wrar@debian.org> |
|---|---|
| Date | 2019-12-16 09:40 +0100 |
| Message-ID | <zdU53-1KK-1@gated-at.bofh.it> |
| In reply to | #12154 |
[Multipart message — attachments visible in raw view] — view raw
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. -- WBR, wRAR
[toc] | [prev] | [next] | [standalone]
| From | Andreas Tille <andreas@an3as.eu> |
|---|---|
| Date | 2019-12-16 11:10 +0100 |
| Subject | Re: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) |
| Message-ID | <zdVua-2KO-13@gated-at.bofh.it> |
| In reply to | #12155 |
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
[toc] | [prev] | [next] | [standalone]
| From | Andrey Rahmatullin <wrar@debian.org> |
|---|---|
| Date | 2019-12-16 11:20 +0100 |
| Subject | Re: Help needed (Was: Bug#943083: libncl: Python2 removal in sid/bullseye) |
| Message-ID | <zdVDP-2Oc-3@gated-at.bofh.it> |
| In reply to | #12156 |
[Multipart message — attachments visible in raw view] — view raw
On Mon, Dec 16, 2019 at 11:07:07AM +0100, Andreas Tille wrote:
> 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))
It worked for me, but didn't change that line.
ii 2to3 3.7.5-3 all 2to3 binary using python3
--
WBR, wRAR
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.maint.python
csiph-web