Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: pu

Hi,

pytris in stable doesn't run. It imports a stdlib library that was
renamed in Python 2.5, which is the default Python in lenny.

There has been a fix in testing and unstable for the last six months.

Is this upload acceptable for s-p-u?

SR

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

Kernel: Linux 2.6.32-5-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_ZA.UTF-8, LC_CTYPE=en_ZA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru pytris-0.98/debian/changelog pytris-0.98+lenny1/debian/changelog
--- pytris-0.98/debian/changelog        2006-04-06 20:50:35.000000000 +0200
+++ pytris-0.98+lenny1/debian/changelog 2011-01-01 15:31:26.000000000 +0200
@@ -1,3 +1,11 @@
+pytris (0.98+lenny1) stable; urgency=low
+
+  * Non-maintainer upload.
+  * Support Python 2.6 (whrandom -> random) (closes: #588716).
+  * Fix TypeError upon exit (closes: #589097)
+
+ -- Stefano Rivera <stef...@rivera.za.net>  Sat, 01 Jan 2011 15:30:35 +0200
+
 pytris (0.98) unstable; urgency=low
 
   * added back forgotten manpage (closes: #360757)
diff -Nru pytris-0.98/pytris.py pytris-0.98+lenny1/pytris.py
--- pytris-0.98/pytris.py       2006-04-06 20:24:38.000000000 +0200
+++ pytris-0.98+lenny1/pytris.py        2010-07-15 00:03:33.000000000 +0200
@@ -2,7 +2,7 @@
 
 #from ncurses.curses import *
 from curses import *
-import time, traceback, whrandom, copy, socket, sys, getopt
+import time, traceback, random, copy, socket, sys, getopt
 import string, pickle, os, pwd
 
 def make_tensor(*args):
@@ -241,10 +241,6 @@
         display.stdscr.noutrefresh()
         doupdate()
 
-    def __del__(self):
-        echo()
-        nl()
-        curs_set(1)
       
       
 
@@ -547,12 +543,12 @@
                 )
                     
         self.masks = masks[t]
-        self.rpool = map(lambda x, self=self:whrandom.choice(self.masks), 
(globalvar.next+1)*[None]) # pool of pieces
+        self.rpool = map(lambda x, self=self:random.choice(self.masks), 
(globalvar.next+1)*[None]) # pool of pieces
                     
     def getpiece(self):
         p = self.rpool[0]
         del self.rpool[0]
-        self.rpool.append(whrandom.choice(self.masks))
+        self.rpool.append(random.choice(self.masks))
         return p
 
 
@@ -787,8 +783,8 @@
     "act as robot"
     tickv = 1
     r = 1
-    kpr = ord(whrandom.choice(('u', 'i', 'o')))
-    if whrandom.random()>0.3:
+    kpr = ord(random.choice(('u', 'i', 'o')))
+    if random.random()>0.3:
         kpr = -1
     if kpr == ord('u'):
         a.left()
@@ -1095,5 +1091,11 @@
         finscore(0)
         finalwait()
 
+def restore_screen():
+    echo()
+    nl()
+    curs_set(1)
+
 wrapper(disp)
+restore_screen()
 

Reply via email to