Bug#902650: SyntaxError during package configuration with Python 3.7

Andrey Rahmatullin wrar at debian.org
Fri Jun 29 07:38:58 BST 2018


Package: diffoscope
Version: 97
Severity: grave

Setting up diffoscope (97) ...
  File "/usr/lib/python3/dist-packages/diffoscope/comparators/json.py", line 41
    file.magic_file_type.startswith(x)
    ^
SyntaxError: Generator expression must be parenthesized

  File "/usr/lib/python3/dist-packages/diffoscope/presenters/formats.py", line
112
    x['klass'].supports_visual_diffs for x in self.config.values(),
    ^
SyntaxError: Generator expression must be parenthesized

dpkg: error processing package diffoscope (--configure):
 installed diffoscope package post-installation script subprocess returned
error exit status 1


>From the 3.7 release notes
(https://docs.python.org/3.7/whatsnew/3.7.html#changes-in-python-behavior):

"""
Due to an oversight, earlier Python versions erroneously accepted the following
syntax:

f(1 for x in [1],)

class C(1 for x in [1]):
    pass
Python 3.7 now correctly raises a SyntaxError, as a generator expression always
needs to be directly inside a set of parentheses and cannot have a comma on
either side, and the duplication of the parentheses can be omitted only on
calls.
"""



-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'unstable'), (500, 'testing'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

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

Versions of packages diffoscope depends on:
ii  libpython3.6-stdlib    3.6.6-1
ii  python3                3.6.6-1
ii  python3-distro         1.0.1-2
ii  python3-distutils      3.6.6-1
ii  python3-libarchive-c   2.1-3.1
ii  python3-magic          2:0.4.15-1
ii  python3-pkg-resources  39.2.0-1

Versions of packages diffoscope recommends:
pn  abootimg                         <none>
ii  acl                              2.2.52-3+b1
pn  apktool                          <none>
pn  binutils-multiarch               <none>
ii  bzip2                            1.0.6-8.1
ii  caca-utils                       0.99.beta19-2+b3
ii  colord                           1.3.3-2
pn  db-util                          <none>
ii  default-jdk [java-sdk]           2:1.10-67
ii  default-jdk-headless             2:1.10-67
pn  device-tree-compiler             <none>
pn  docx2txt                         <none>
ii  e2fsprogs                        1.44.2-1
pn  enjarify                         <none>
pn  fontforge-extras                 <none>
pn  fp-utils                         <none>
ii  genisoimage                      9:1.1.11-3+b2
ii  gettext                          0.19.8.1-6+b1
pn  ghc                              <none>
ii  ghostscript                      9.22~dfsg-2.1
pn  giflib-tools                     <none>
pn  gnumeric                         <none>
ii  imagemagick                      8:6.9.9.39+dfsg-1
ii  imagemagick-6.q16 [imagemagick]  8:6.9.9.39+dfsg-1
pn  jsbeautifier                     <none>
pn  libarchive-tools                 <none>
pn  llvm                             <none>
ii  mono-utils                       4.6.2.7+dfsg-2
pn  odt2txt                          <none>
pn  oggvideotools                    <none>
ii  openjdk-10-jdk [java-sdk]        10.0.1+10-4
ii  openssh-client                   1:7.7p1-2
pn  pgpdump                          <none>
ii  poppler-utils                    0.63.0-2
pn  procyon-decompiler               <none>
pn  python3-argcomplete              <none>
pn  python3-binwalk                  <none>
ii  python3-debian                   0.1.32
pn  python3-defusedxml               <none>
pn  python3-guestfs                  <none>
pn  python3-jsondiff                 <none>
pn  python3-progressbar              <none>
pn  python3-pyxattr                  <none>
ii  python3-tlsh                     3.4.4+20151206-1+b3
pn  r-base-core                      <none>
pn  sng                              <none>
ii  sqlite3                          3.24.0-1
ii  squashfs-tools                   1:4.3-6
ii  tcpdump                          4.9.2-3
ii  unzip                            6.0-21
ii  vim-common                       2:8.1.0089-1
pn  xmlutils                         <none>
ii  xxd                              2:8.1.0089-1
ii  xz-utils                         5.2.2-1.3

Versions of packages diffoscope suggests:
ii  libjs-jquery  3.2.1-1

-- debconf-show failed



More information about the Reproducible-builds mailing list