Bug#1005849: ardentryst: 10 deprecation messages at various points

Jens Rottmann JRottm at gmx.de
Tue Feb 15 23:43:57 GMT 2022


Package: ardentryst
Version: 1.71-8
Severity: normal
Tags: patch

I encountered a total of 10 deprecation messages at various points in the game. These are all of the same type (implicit floar->int conversion), all essentially harmless, but they might look alarming to an unsuspecting player. And the sheer number of these warnings makes the game look unprofessional.

I'd have said Severity 'minor', but I upped it to 'normal', because there are so many of them. Present at least in 1.71-8 and -9. Haven't checked if they were introduced with Python 3 in 1.71-7 or if they were there even earlier.

I made a patch fixing all of them, they're all fairly trivial. I'll attach it as soon as I got the ticket number (to reference it in the patch's description).

Full list of warnings follows (line numbers are for 1.71-9):

On Resume Quest screen if >14 saves present:
/usr/share/games/ardentryst/ardentryst.py:1367: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   gsr.midleft = (70, 100 + x * 25 - scroll_factor * 25)
/usr/share/games/ardentryst/ardentryst.py:1373: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   crect.midleft = (65, 100 + cursor * 25 - scroll_factor * 25)
/usr/share/games/ardentryst/ardentryst.py:1378: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   arrowrect.center = (130, 450 + math.sin(tick/10.0)*5)
/usr/share/games/ardentryst/ardentryst.py:1384: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   handr.midright = (int(60+abs(math.sin(tick/10.0))*10.0), 100 + cursor * 25 - scroll_factor * 25)

At Eternal Boulder (save location):
/usr/share/games/ardentryst/ardentryst.py:2339: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   m_r.midleft = (320-Fonts[16].size(msg)[0]/2, 350)
/usr/share/games/ardentryst/ardentryst.py:2347: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   npi_r.center = (320, 400+abs(math.sin(tick/10.0)*15))
/usr/share/games/ardentryst/ardentryst.py:2383: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   m_r.midleft = (320-Fonts[16].size(msg)[0]/2, 350+y)

When Snodom reached on the map:
/usr/share/games/ardentryst/ardentryst.py:2745: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   screen.blit(Data.images["kiripan.png"][0], (290, 141 - Game.KIRI_HEIGHT*60 + math.sin(tick/30.0)*6))
/usr/share/games/ardentryst/ardentryst.py:2778: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   screen.blit(Data.images["kiripan.png"][0], (290, 141 - Game.KIRI_HEIGHT*60 + math.sin(tick/30.0)*6))

When Kiripan floats down (endscene):
/usr/share/games/ardentryst/ardentryst.py:2835: DeprecationWarning: an integer is required (got type float).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
   screen.blit(Data.images["kiripan.png"][0], (290, 81 + Game.ENDSCENE))

Regards,
Jens



More information about the Pkg-games-devel mailing list