Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 49937 Details for
Bug 80073
net-mail/getmail prints deprecation warnings when used with python 2.4
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to getmail to avoid DeprecationWarning
getmail-4.2.5-python-2.4.patch (text/plain), 3.05 KB, created by
Marien Zwart (RETIRED)
on 2005-01-30 07:50:14 UTC
(
hide
)
Description:
patch to getmail to avoid DeprecationWarning
Filename:
MIME Type:
Creator:
Marien Zwart (RETIRED)
Created:
2005-01-30 07:50:14 UTC
Size:
3.05 KB
patch
obsolete
>diff -ur getmail-4.2.5-orig/getmailcore/message.py getmail-4.2.5/getmailcore/message.py >--- getmail-4.2.5-orig/getmailcore/message.py 2005-01-30 15:23:39.000000000 +0100 >+++ getmail-4.2.5/getmailcore/message.py 2005-01-30 16:29:05.844722000 +0100 >@@ -7,6 +7,7 @@ > 'Message', > ] > >+import sys > import os > import time > import cStringIO >@@ -86,20 +87,32 @@ > # of filters, etc, which should be saner. > if fromlines: > try: >- self.__msg = email.message_from_string(os.linesep.join( >- fromlines), strict=False) >+ if sys.version_info < (2, 4): >+ self.__msg = email.message_from_string(os.linesep.join( >+ fromlines), strict=False) >+ else: >+ self.__msg = email.message_from_string(os.linesep.join( >+ fromlines)) > except email.Errors.MessageError, o: > self.__msg = corrupt_message(o, fromlines=fromlines) > self.__raw = os.linesep.join(fromlines) > elif fromstring: > try: >- self.__msg = email.message_from_string(fromstring, strict=False) >+ if sys.version_info < (2, 4): >+ self.__msg = email.message_from_string(fromstring, >+ strict=False) >+ else: >+ self.__msg = email.message_from_string(fromstring) > except email.Errors.MessageError, o: > self.__msg = corrupt_message(o, fromstring=fromstring) > self.__raw = fromstring > elif fromfile: > try: >- self.__msg = email.message_from_file(fromfile, strict=False) >+ if sys.version_info < (2, 4): >+ self.__msg = email.message_from_file(fromfile, >+ strict=False) >+ else: >+ self.__msg = email.message_from_file(fromfile) > except email.Errors.MessageError, o: > # Shouldn't happen > self.__msg = corrupt_message(o, fromstring=fromfile.read()) >diff -ur getmail-4.2.5-orig/getmailcore/_retrieverbases.py getmail-4.2.5/getmailcore/_retrieverbases.py >--- getmail-4.2.5-orig/getmailcore/_retrieverbases.py 2005-01-30 15:23:39.000000000 +0100 >+++ getmail-4.2.5/getmailcore/_retrieverbases.py 2005-01-30 15:31:40.000000000 +0100 >@@ -33,6 +33,7 @@ > 'RetrieverSkeleton', > ] > >+import sys > import os > import socket > import time >@@ -426,7 +427,11 @@ > self.log.trace() > msgnum = self._getmsgnumbyid(msgid) > response, headerlist, octets = self.conn.top(msgnum, 0) >- parser = email.Parser.Parser(strict=False) >+ # 'strict' argument is deprecated (and unneeded) in python 2.4 >+ if sys.version_info < (2, 4): >+ parser = email.Parser.Parser(strict=False) >+ else: >+ parser = email.Parser.Parser() > return parser.parsestr(os.linesep.join(headerlist), headersonly=True) > > def initialize(self):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 80073
: 49937 |
49939