Your message dated Tue, 24 Jun 2014 20:51:34 -0400
with message-id <[email protected]>
and subject line Re: Bug#748711: gdb uses python3, which breaks everything
has caused the Debian Bug report #748711,
regarding gdb uses python3, which breaks everything
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.)


-- 
748711: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=748711
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: gdb
Version: 7.6.2-1.1
Severity: important

Dear Maintainer,

A recent upload of gdb switched to python3 instead of python2.

Even if you really think a python3 gdb is useful, it should not be the
default, e.g. ship a gdb package using python2 and a gdb-python3 package
for people who don't like working software.

Besides the obvious breakage in every pretty-printer ever written (there
are more packages than libstdc++, you know!), it also breaks gdb in strange
ways. For example, after converting my pretty-printers to python3, I get
a python exception when just running 'info pretty-printer'.

(gdb should not be using copy.copy at all here)

(gdb) set python print-stack full
(gdb) info pretty-printer
  objfile /home/ben/conf/bin/tmwa-admin pretty-printers:
  tmwa
Traceback (most recent call last):
  File "/usr/share/gdb/python/gdb/command/pretty_printers.py", line 164, in 
invoke
    object_re, name_re, subname_re)
  File "/usr/share/gdb/python/gdb/command/pretty_printers.py", line 150, in 
invoke1
    self.list_pretty_printers(printer_list, name_re, subname_re)
  File "/usr/share/gdb/python/gdb/command/pretty_printers.py", line 136, in 
list_pretty_printers
    sorted_subprinters = sorted (copy.copy(printer.subprinters),
  File "/usr/lib/python3.3/copy.py", line 105, in copy
    return _reconstruct(x, rv, 0)
  File "/usr/lib/python3.3/copy.py", line 295, in _reconstruct
    y = callable(*args)
  File "/usr/lib/python3.3/copyreg.py", line 88, in __newobj__
    return cls.__new__(cls, *args)
TypeError: object.__new__(dict_values) is not safe, use dict_values.__new__()
Error occurred in Python command: object.__new__(dict_values) is not safe, use 
dict_values.__new__()


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (600, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.13-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages gdb depends on:
ii  gdbserver     7.6.2-1.1
ii  libc6         2.18-5
ii  libexpat1     2.1.0-4
ii  liblzma5      5.1.1alpha+20120614-2
ii  libncurses5   5.9+20140118-1
ii  libpython3.3  3.3.5-1
ii  libreadline6  6.3-6
ii  libtinfo5     5.9+20140118-1
ii  zlib1g        1:1.2.8.dfsg-1

Versions of packages gdb recommends:
ii  libc6-dbg [libc-dbg]  2.18-5

Versions of packages gdb suggests:
ii  gdb-doc  7.6.2-1

-- no debconf information

--- End Message ---
--- Begin Message ---
Hmm, it seems to me we should discussing this on #727003, where you
asked for the switch to be done in the first place.

Matthias Klose <[email protected]> writes:

> Control: reopen -1
>
> so this is a very generic claim ("breaks everything") without giving any
> concrete package.

Well, considering that the technical claims in this bug only had to be
balanced against those in bug #727003 (there are none), and what I'd
already seen without looking terribly hard, I've come to the conclusion
that GDB shouldn't just switch Python versions without an actual
argument being given.

Pros for switching:

  * It would help with the goal proclaimed in bug #727003:
      "Pretty printers should be ready to be used with python3 for the
      jessie release."

  * It would motivate Debian people to fix problems that Ubuntu has due
    to having already switched.  (Wait, remind me how that's a pro for
    Debian?)

Cons:

  * It doesn't magically complete the goal proclaimed in bug #727003

  * It seems to break lots of people's pretty printers and other
    scripts.  Without particularly looking for trouble, I found:

    - libstdc++'s pretty-printers, which are basically the flagship for
      pretty-printers, aren't fixed yet upstream (yes, I know they were
      working in Debian. That's not the point).  And just think, I could
      be working on submitting my fix *right* now.

    - python3 broke the pretty printers for the hobby project I was
      working on (though I think I've fixed them now)

    - python3 broke my "qattach.py" script (though I hear someone
      commented on the relevant blogpost with a fix)

    - Ben Longbons says it broke his extra-Debian pretty printers, and
      that his *target* system is still using gdb built with python2
      (probably most of this was only said in #gdb on freenode)

  * It doesn't seem wise to do this with essentially no warning.

Also, I note that Fedora, who are usually pretty adventurous about GDB
things, don't seem to have switched yet.

So, I'm thinking that, unless there's some urgent reason to do it now
that nobody has mentioned yet, we should take it slowly:

  * Guarantee that GDB will pull in the "six" package appropriate for
    the Python it's built against (python-six or python3-six)

  * Issue a NEWS.Debian bulletin that people should prepare their GDB
    Python, in or out of Debian, for use with either series of Python,
    in preparation for jessie+1

And, as I guess you've probably seen, Hector suggests that we also:

  * Ship builds of GDB against both versions of Python

This would certainly facilitate testing of code with both series, so I
guess we'll probably do that if there are no major objections?

--- End Message ---

Reply via email to