From owner-svn-ports-head@FreeBSD.ORG Thu May 22 10:17:42 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1334F15D; Thu, 22 May 2014 10:17:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAE082139; Thu, 22 May 2014 10:17:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s4MAHfu4066516; Thu, 22 May 2014 10:17:41 GMT (envelope-from miwi@svn.freebsd.org) Received: (from miwi@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s4MAHfvI066514; Thu, 22 May 2014 10:17:41 GMT (envelope-from miwi@svn.freebsd.org) Message-Id: <201405221017.s4MAHfvI066514@svn.freebsd.org> From: Martin Wilke Date: Thu, 22 May 2014 10:17:41 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r354821 - in head/textproc/py-feedparser: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 May 2014 10:17:42 -0000 Author: miwi Date: Thu May 22 10:17:41 2014 New Revision: 354821 URL: http://svnweb.freebsd.org/changeset/ports/354821 QAT: https://qat.redports.org/buildarchive/r354821/ Log: - Backport a fix for chardet issue which prevents mail/rss2email3 from working correctly on certain environment. PR: 187397 Submitted by: poyopoyo@puripuri.plala.or.jp Approved by: maintainer timeout Added: head/textproc/py-feedparser/files/patch-feedparser_feedparser.py (contents, props changed) Modified: head/textproc/py-feedparser/Makefile Modified: head/textproc/py-feedparser/Makefile ============================================================================== --- head/textproc/py-feedparser/Makefile Thu May 22 10:16:15 2014 (r354820) +++ head/textproc/py-feedparser/Makefile Thu May 22 10:17:41 2014 (r354821) @@ -3,7 +3,7 @@ PORTNAME= feedparser PORTVERSION= 5.1.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Added: head/textproc/py-feedparser/files/patch-feedparser_feedparser.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-feedparser/files/patch-feedparser_feedparser.py Thu May 22 10:17:41 2014 (r354821) @@ -0,0 +1,15 @@ +--- feedparser/feedparser.py.orig 2014-03-10 01:45:12.000000000 +0900 ++++ feedparser/feedparser.py 2014-03-10 01:45:53.000000000 +0900 +@@ -3766,7 +3766,11 @@ + chardet_encoding = None + tried_encodings = [] + if chardet: +- chardet_encoding = unicode(chardet.detect(data)['encoding'] or '', 'ascii', 'ignore') ++ chardet_encoding = chardet.detect(data)['encoding'] ++ if not chardet_encoding: ++ chardet_encoding = '' ++ if not isinstance(chardet_encoding, str): ++ chardet_encoding = str(chardet_encoding, 'ascii', 'ignore') + # try: HTTP encoding, declared XML encoding, encoding sniffed from BOM + for proposed_encoding in (rfc3023_encoding, xml_encoding, bom_encoding, + chardet_encoding, u'utf-8', u'windows-1252', u'iso-8859-2'):