Summary: | app-admin/checkrestart-0.47 doesn't work with Python 2.7 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Andrew Savchenko <bircoph> |
Component: | Current packages | Assignee: | Jeroen Roovers (RETIRED) <jer> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 292401 | ||
Attachments: |
emerge --info
fix for python 2.7 (due to bad programming practice) |
Description
Andrew Savchenko
2011-01-20 10:52:04 UTC
Created attachment 260345 [details]
emerge --info
Created attachment 262139 [details, diff] fix for python 2.7 (due to bad programming practice) From http://docs.python.org/reference/expressions.html: "In Python 2.3 and later releases, a list comprehension "leaks" the control variables of each for it contains into the containing scope. However, this behavior is deprecated, and relying on it will not work in Python 3.0" The author relied on an obscure feature (explained here: http://code.activestate.com/recipes/204297-the-secret-name-of-list-comprehensions/) and should be notified. My suggestion would be to consistently use the "set" data type to prevent duplicate entries. Thanks for the patch. I trust it works for python 2.7 as it does for 2.6, which I tested with. It's applied in -r1. |