After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 620032 - string exceptions not supported in Python >= 2.6
string exceptions not supported in Python >= 2.6
Status: RESOLVED FIXED
Product: gnome-games-superseded
Classification: Deprecated
Component: gnome-sudoku
2.31.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2010-05-29 14:21 UTC by Emilio Pozuelo Monfort
Modified: 2010-06-09 23:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Emilio Pozuelo Monfort 2010-05-29 14:21:15 UTC
Hi,

gnome-sudoku uses string exceptions, which have been deprecated for a long time and no longer work on Python >= 2.6:

From http://lists.debian.org/debian-python/2010/05/msg00113.html

$ python2.5 -c "raise 'eggs'"
-c:1: DeprecationWarning: raising a string exception is deprecated
Traceback (most recent call last):
  • File "<string>", line 1 in <module>
    eggs
  • File "<string>", line 1 in <module>
TypeError: exceptions must be old-style classes or derived from BaseException, not str


gnome-sudoku uses them in gnome-sudoku/src/lib/pausable.py:

    def wrapper (self, cls, *args, **kwargs):
        if cls.terminated:
            raise "Terminated!"
        while cls.paused:
            if cls.terminated:
                raise "Terminated!"
            time.sleep(self.sleep_for)
Comment 1 Robert Ancell 2010-06-09 23:42:58 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.