[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#771963: unblock: python3-defaults/3.4.2-2



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

Please unblock package python3-defaults

It cleans after bugs like 771095 or 769769 (in python3.4).
py_compile.py in python3.4 was already fixed upstream (see
http://bugs.python.org/issue22966) and in the Debian package (BTW, it
would be great if you could unblock python3.4 as well) but pyc files are
already there (not in stable, though, python3.2 is not affected) and
fixed python3.4 will not remove already generated files


unblock python3-defaults/3.4.2-2

-- System Information:
Debian Release: 8.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.17-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru python3-defaults-3.4.2/debian/changelog python3-defaults-3.4.2/debian/changelog
--- python3-defaults-3.4.2/debian/changelog	2014-10-08 15:43:43.000000000 +0200
+++ python3-defaults-3.4.2/debian/changelog	2014-11-29 18:36:28.000000000 +0100
@@ -1,3 +1,10 @@
+python3-defaults (3.4.2-2) unstable; urgency=medium
+
+  * py3clean: remove pyc files generated from files with dot in its name
+    (workaraunds http://bugs.python.org/issue22966)
+
+ -- Piotr Ożarowski <piotr@debian.org>  Sat, 29 Nov 2014 18:14:17 +0100
+
 python3-defaults (3.4.2-1) unstable; urgency=medium
 
   [ Scott Kitterman ]
diff -Nru python3-defaults-3.4.2/py3clean python3-defaults-3.4.2/py3clean
--- python3-defaults-3.4.2/py3clean	2012-12-12 00:33:09.000000000 +0100
+++ python3-defaults-3.4.2/py3clean	2014-11-29 18:34:17.000000000 +0100
@@ -97,13 +97,18 @@
         # remove compiled files in __pycache__ directory
         def find_files_to_remove(pyfile):
             directory = join(dirname(pyfile), '__pycache__')
-            fnames = "%s.*" % splitext(basename(pyfile))[0]
-            for fn in glob1(directory, fnames):
+            fname = splitext(basename(pyfile))[0]
+            for fn in glob1(directory, "%s.*" % fname):
                 yield join(directory, fn)
             # remove "classic" .pyc files as well
             for filename in ("%sc" % pyfile, "%so" % pyfile):
                 if exists(filename):
                     yield filename
+            # workaround for http://bugs.python.org/issue22966
+            if '.' in fname:
+                sane_fname = join(dirname(pyfile), fname.split('.', 1)[0])
+                for fn in find_files_to_remove(sane_fname):
+                    yield join(directory, fn)
     elif magic_tag is False:
 
         # remove 3.1's .pyc files only
@@ -119,6 +124,11 @@
             fname = splitext(basename(pyfile))[0]
             for fn in glob1(directory, "%s.%s.py[co]" % (fname, magic_tag)):
                 yield join(directory, fn)
+            # workaround for http://bugs.python.org/issue22966
+            if '.' in fname:
+                sane_fname = join(dirname(pyfile), fname.split('.', 1)[0])
+                for fn in find_files_to_remove(sane_fname):
+                    yield join(directory, fn)
 
     def myremove(fname):
         remove(fname)

Attachment: signature.asc
Description: Digital signature


Reply to: