From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Qety3-0002Dt-AI for garchives@archives.gentoo.org; Thu, 07 Jul 2011 19:10:31 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73BB421C10A; Thu, 7 Jul 2011 19:10:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 336B421C10A for ; Thu, 7 Jul 2011 19:10:24 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AFE4B2AC083 for ; Thu, 7 Jul 2011 19:10:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 0BC358003D for ; Thu, 7 Jul 2011 19:10:23 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/, pym/portage/tests/lazyimport/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/__init__.py pym/portage/_ensure_encodings.py pym/portage/tests/lazyimport/test_lazy_import_portage_baseline.py X-VCS-Directories: pym/portage/ pym/portage/tests/lazyimport/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: ed303d89530b2aafaf1c8a95b2828d35dac7e006 Date: Thu, 7 Jul 2011 19:10:23 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 4ef2da16d9d6fc5561a1ab1a16e17ebc commit: ed303d89530b2aafaf1c8a95b2828d35dac7e006 Author: Zac Medico gentoo org> AuthorDate: Thu Jul 7 19:10:08 2011 +0000 Commit: Zac Medico gentoo org> CommitDate: Thu Jul 7 19:10:08 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/portage.git;a= =3Dcommit;h=3Ded303d89 Remove the _ensure_encodings module. This was only needed for ancient versions of python built with USE=3Dbuild since the ebuilds used to remove the encodings module in that case. Since the StreamWriter and StreamReader classes may be deprecated in the near future, now would be a good time to stop using them. --- pym/portage/__init__.py | 24 ---- pym/portage/_ensure_encodings.py | 132 --------------= ------ .../test_lazy_import_portage_baseline.py | 2 +- 3 files changed, 1 insertions(+), 157 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index bc2eedb..47e2e48 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -327,30 +327,6 @@ _python_interpreter =3D os.path.realpath(sys.executa= ble) _bin_path =3D PORTAGE_BIN_PATH _pym_path =3D PORTAGE_PYM_PATH =20 -def _ensure_default_encoding(): - - default_encoding =3D sys.getdefaultencoding().lower().replace('-', '_') - filesystem_encoding =3D _encodings['merge'].lower().replace('-', '_') - required_encodings =3D set(['ascii', 'utf_8']) - required_encodings.add(default_encoding) - required_encodings.add(filesystem_encoding) - missing_encodings =3D set() - for codec_name in required_encodings: - try: - codecs.lookup(codec_name) - except LookupError: - missing_encodings.add(codec_name) - - if not missing_encodings: - return - - from portage import _ensure_encodings - _ensure_encodings._setup_encodings(default_encoding, - filesystem_encoding, missing_encodings) - -# Do this ASAP since writemsg() might not work without it. -_ensure_default_encoding() - def _shell_quote(s): """ Quote a string in double-quotes and use backslashes to diff --git a/pym/portage/_ensure_encodings.py b/pym/portage/_ensure_encod= ings.py deleted file mode 100644 index 5e62843..0000000 --- a/pym/portage/_ensure_encodings.py +++ /dev/null @@ -1,132 +0,0 @@ -# Copyright 2010 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -import codecs - -_codec_map =3D None - -def _setup_encodings(default_encoding, filesystem_encoding, missing_enco= dings): - """ - The