On Mon, 16 Nov 2020, Martin Liška wrote:
> > Let's retry with `ipython' installed now:
> >
> > $ git show 2935ff7eb7ac > 1
> > $ ipython
> > $ Python 2.7.16 (default, Oct 10 2019, 22:02:15)
> > Type "copyright", "credits" or "license" for more information.
>
> Please no python2, it's dead and buried really deep in the ground :)
Well, I only followed your instructions as you gave them. For Python 3
it's `ipython3' and `ipython' is Python 2 here. As I say, a standard
Debian distribution.
> > IPython 5.8.0 -- An enhanced Interactive Python.
> > ? -> Introduction and overview of IPython's features.
> > %quickref -> Quick reference.
> > help -> Python's own help system.
> > object? -> Details about 'object', use 'object??' for extra details.
> >
> > In [1]: from unidiff import PatchSet
> >
> > In [2]: PatchSet(open('1'))
> > Out[2]: <PatchSet: [<PatchedFile: gcc/testsuite/g++.dg/ubsan/pr61272.C>]>
> >
> > Same with `ipython3' except for:
> >
> > Python 3.7.3 (default, Jul 25 2020, 13:03:44)
>
> What tells:
> unidiff.VERSION
> ?
In [1]: from unidiff import PatchSet
In [2]: unidiff.VERSION
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-3-049af7d22b51> in <module>()
----> 1 unidiff.VERSION
NameError: name 'unidiff' is not defined
I noted however in my original message that the package version is 0.5.4
(or 0.5.2 for the other system).
> > Please note however that your script effectively does:
> >
> > In [3]: PatchSet(open('1').read())
> > Out[3]: <PatchSet: []>
> >
> > which my tweak changes into your proposed sequence.
>
> So you're saying that python3 and your .read change fixes that?
It does.
Maciej