Your message dated Sun, 01 Sep 2019 19:20:08 +0000
with message-id <[email protected]>
and subject line Bug#939154: fixed in lyx 2.3.3-2
has caused the Debian Bug report #939154,
regarding lyx-common: convertDefault.py will not work with Python3
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
939154: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939154
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: lyx-common
Version: 2.3.3-1
Severity: important
Tags: patch

Dear Maintainer,

I was porting one of my packages (pycode-browser) from Python2
to Python3, in order to close the bug report #937407 filed by
Matthias Klose, "Python2 removal in sid/bullseye".

The build raised a series of errors, due to the script
convertDefault.py, which is not properly ported to Python3:

----------- for example---8<-----------------------------------
support/Systemcall.cpp (276): Systemcall: 'python3 -tt
"/usr/share/lyx/scripts/convertDefault.py" png
"/tmp/lyx_tmpdir.SihlAXIKJELT/lyx_tmpbuf0/47_home_georgesk_developpement_pycode-
browser_collab_pycode-browser_pybooksrc_pics_lsfit.png" eps
"/tmp/lyx_tmpdir.SihlAXIKJELT/lyx_tmpbuf0/47_home_georgesk_developpement_pycode-
browser_collab_pycode-browser_pybooksrc_pics_lsfit.eps"' finished with exit
code 1
Traceback (most recent call last):
  File "/usr/share/lyx/scripts/convertDefault.py", line 38, in <module>
    output = output.decode()
AttributeError: 'str' object has no attribute 'decode'
-----------------------------8<--------------------------------

The reason for this misbehavior is that either with Python2 or
with Python3, os.popen deals with 'str' data, never 'bytes' data.

So, lines 37 and 38 of the script must be erased.

Here is a short diff which fixes this issue:

-----------------------8<----------------------------------
--- a/convertDefault.py 2019-09-01 18:16:59.833826411 +0200
+++ b/convertDefault.py 2019-09-01 18:18:38.622524626 +0200
@@ -33,9 +33,8 @@
     command = 'convert'
     fout = os.popen('convert -version 2>&1')
     output = fout.readline()
+    # assert type(output)==type("") # os.popen deals with strings in Python3
     fout.close()
-if not PY2:
-    output = output.decode()

 version = re_version.match(output)
 -----------------------8<----------------------------------

Best regards,                     Georges.



-- System Information:
Debian Release: 10.0
  APT prefers stable
  APT policy: (900, 'stable'), (499, 'testing'), (400, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), 
LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lyx-common depends on:
ii  python3     3.7.3-1
ii  tex-common  6.11

Versions of packages lyx-common recommends:
ii  lyx  2.3.3-1

lyx-common suggests no packages.

-- debconf-show failed
--- a/convertDefault.py 2019-09-01 18:16:59.833826411 +0200
+++ b/convertDefault.py 2019-09-01 18:18:38.622524626 +0200
@@ -33,9 +33,8 @@
     command = 'convert'
     fout = os.popen('convert -version 2>&1')
     output = fout.readline()
+    # assert type(output)==type("") # os.popen deals with strings in Python3
     fout.close()
-if not PY2:
-    output = output.decode()
 
 version = re_version.match(output)
 

--- End Message ---
--- Begin Message ---
Source: lyx
Source-Version: 2.3.3-2

We believe that the bug you reported is fixed in the latest version of
lyx, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Dr. Tobias Quathamer <[email protected]> (supplier of updated lyx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 01 Sep 2019 20:56:27 +0200
Source: lyx
Architecture: source
Version: 2.3.3-2
Distribution: unstable
Urgency: medium
Maintainer: Dr. Tobias Quathamer <[email protected]>
Changed-By: Dr. Tobias Quathamer <[email protected]>
Closes: 939154
Changes:
 lyx (2.3.3-2) unstable; urgency=medium
 .
   * Recommend texlive-plain-generic instead of transitional packages
   * Fix os.popen for Python 3.
     os.popen returns 'str' data in Python 2 and 3, so do
     not use decode(), which results in an AttributeError
     ('str' object has no attribute 'decode')
     Thanks to Georges Khaznadar (Closes: #939154)
   * Switch to debhelper-compat and use v12
   * Update Standards-Version to 4.4.0, no changes needed
   * Apply fixes from cme fix dpkg
Checksums-Sha1:
 c7ddcc6a78e48a5a55095eece5f556c9fba9be2d 2204 lyx_2.3.3-2.dsc
 75418b8ff7d6ff9f6048dcef6e8c4d6cffc44179 31844 lyx_2.3.3-2.debian.tar.xz
 7b181c27f53adcfaab7b297238d02b27e2577a28 13135 lyx_2.3.3-2_amd64.buildinfo
Checksums-Sha256:
 a5c08677c1dc83a0436a504626c403c2f29f1053a8ca704004f64e59fe340d1c 2204 
lyx_2.3.3-2.dsc
 4ba8e9ddb95b1f5c263f42f15b60323689e2da9ca8267af81597118f1b395b60 31844 
lyx_2.3.3-2.debian.tar.xz
 acf714f474862a9665c1d2c139444154dced80d91df5016b78b012e0cce66ab0 13135 
lyx_2.3.3-2_amd64.buildinfo
Files:
 74608afc18b0bc56b10ae4cfbe460309 2204 editors optional lyx_2.3.3-2.dsc
 c1ca80796628d937ffd0f6e04f55ecc4 31844 editors optional 
lyx_2.3.3-2.debian.tar.xz
 691c2803b941a0fe899eabcf2714f4dc 13135 editors optional 
lyx_2.3.3-2_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE0cuPObxd7STF0seMEwLx8Dbr6xkFAl1sFmsACgkQEwLx8Dbr
6xlNjg/7B+RmjpqZX9TIgEDLc5B8vSzhUqzBqzdhdymHW36hVLej16SbaOJDktyy
wex3GDyRkEMPCLFIlL8LTmXCinud4V7POndnomfSCzEUdZVHcswUKrUBNWuaL+0p
zeDyG7UjHvjnwUTxovhVUHpq3BMpqjKqIih+YJgqthdiBXSluy9BZoa6/NOG1Xq2
/VLAzuuA8MvzvRxQDgzUvjxDw0eQpiPZx51IYOPd7v2ygSo7QiF54sfrgSGW1NbT
ohyGS73Fx98akkrKl36DkoZEZUV4Yrmku8ZR3qoh+n/1STwDS/vOX6Gn5KH6HIq1
8XUruZFmXQ8XLpEtLwBh4dpfTbujpzFBZjsPJypoI8LM1/YHyzYJp9yGJcGIhMAm
LbeDMf/CgklBeQokRUlyGKCBQSkuIHLx+hstsd1VqmLY3v8iieiJZVpE27gwObYv
Tq1h6rvpy4OKTMDc31vIR8rIkOEEul6LGV+neaiMWwkTbGMjPV43Qmh1QwEooHW7
bT1hqx8bk/ZkHig9wIU+ayBd5merUEVva5KkVXJxOdxvDG5RvhYOTJLRH9o9/gPX
+02TG2PJbrXbKpfbbqiavhZB/WFMptCcOUrQ2E6siV5CqJ03m6rNMr3SsjFPDOYN
RUihXu5E+3iDImSWHYSDj6b+TGN6rj6O6zx5NilwfI85nizID9I=
=bYle
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to