After upgrading to python 2.5, I get the following error: $ sb_imapfilter.py File "/usr/bin/sb_imapfilter.py", line 93 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file Re-emerging does not help, but instead produces more similar errors: * Byte compiling python modules for python-2.5 .. ... Compiling /usr/lib/python2.5/site-packages/spambayes/Corpus.py ... File "/usr/lib/python2.5/site-packages/spambayes/Corpus.py", line 82 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file Compiling /usr/lib/python2.5/site-packages/spambayes/FileCorpus.py ... File "/usr/lib/python2.5/site-packages/spambayes/FileCorpus.py", line 85 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file Compiling /usr/lib/python2.5/site-packages/spambayes/message.py ... File "/usr/lib/python2.5/site-packages/spambayes/message.py", line 78 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file Compiling /usr/lib/python2.5/site-packages/spambayes/Corpus.py ... File "/usr/lib/python2.5/site-packages/spambayes/Corpus.py", line 82 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file Compiling /usr/lib/python2.5/site-packages/spambayes/FileCorpus.py ... File "/usr/lib/python2.5/site-packages/spambayes/FileCorpus.py", line 85 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file Compiling /usr/lib/python2.5/site-packages/spambayes/message.py ... File "/usr/lib/python2.5/site-packages/spambayes/message.py", line 78 from __future__ import generators SyntaxError: from __future__ imports must occur at the beginning of the file [ ok ] >>> mail-filter/spambayes-1.0.4 merged. Reproducible: Always Steps to Reproduce: Upstream bug is here: https://sourceforge.net/tracker/?func=detail&atid=498103&aid=1758473&group_id=61702. But they haven't made a release (other than alphas) that includes these changes. Can we get a patch and include it with the 1.0.4 ebuild?
Created attachment 160912 [details] emerge --info
Created attachment 160977 [details, diff] Patch to fix from __future__ imports in mail-filter/spambayes-1.0.4.ebuild Ebuild patch for mail-filter/spambayes-1.0.4 Some ebuilds are going to suffer from this in Python2.5. At least is an easy, painless fix ;D
Created attachment 160979 [details, diff] Patch used in mail-filter/spambayes-1.0.4.ebuild new ebuild Moves from __future__ import lines to a suitable place Best regards,
Created attachment 161383 [details, diff] Patch for mail-filter/spambayes-1.0.4 fixing 'from __future import' I have missed scripts/sb_imapfilter.py from the list.
Thanks for the report, Matt, added fix to CVS. Thanks for the patches, Jesus.