From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id A8C05138206 for ; Sat, 30 Apr 2016 00:13:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1250A21C044; Sat, 30 Apr 2016 00:13:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A22E121C044 for ; Sat, 30 Apr 2016 00:13:00 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5868C340D5D for ; Sat, 30 Apr 2016 00:12:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0F9B7329 for ; Sat, 30 Apr 2016 00:12:57 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1461975095.83baf60851c023fd985eab8a119f52a781c9be74.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/module.py X-VCS-Directories: pym/portage/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 83baf60851c023fd985eab8a119f52a781c9be74 X-VCS-Branch: master Date: Sat, 30 Apr 2016 00:12:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 16e36346-12f5-4021-a22e-d325718efdc2 X-Archives-Hash: df4cef1f27dcc87b183a9df3838d8d71 commit: 83baf60851c023fd985eab8a119f52a781c9be74 Author: Brian Dolbec gentoo org> AuthorDate: Sat Apr 30 00:11:35 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Apr 30 00:11:35 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=83baf608 portage/modules.py: Change warnings output to writemsg() Add the missing attribute and filepath to the output for best clarity, bug reporting. pym/portage/module.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pym/portage/module.py b/pym/portage/module.py index b7967ba..f9828a5 100644 --- a/pym/portage/module.py +++ b/pym/portage/module.py @@ -4,12 +4,11 @@ from __future__ import print_function -import warnings - from portage import os from portage.exception import PortageException from portage.cache.mappings import ProtectedDict from portage.localization import _ +from portage.util import writemsg class InvalidModuleName(PortageException): @@ -53,10 +52,10 @@ class Module(object): kid['module_name'] = '.'.join([mod_name, kid['sourcefile']]) except KeyError: kid['module_name'] = '.'.join([mod_name, self.name]) - warnings.warn( - _("%s module's module_spec is old and needs updating. " - "Backward compatibility may be removed in the future.") - % (self.name), UserWarning, stacklevel=2) + msg = ("%s module's module_spec is old, missing attribute: " + "'sourcefile'. Backward compatibility may be " + "removed in the future.\nFile: %s\n") + writemsg(_(msg) % (self.name, self._module.__file__)) kid['is_imported'] = False self.kids[kidname] = kid self.kids_names.append(kidname) From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id D6274138222 for ; Tue, 3 May 2016 06:11:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D0D89E087E; Tue, 3 May 2016 06:11:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 022A2E087B for ; Tue, 3 May 2016 06:11:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 23C89340A26 for ; Tue, 3 May 2016 06:11:33 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0722E338 for ; Tue, 3 May 2016 06:11:29 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1461975095.83baf60851c023fd985eab8a119f52a781c9be74.dolsen@gentoo> Subject: [gentoo-commits] proj/portage:repoman commit in: pym/portage/ X-VCS-Repository: proj/portage X-VCS-Files: pym/portage/module.py X-VCS-Directories: pym/portage/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 83baf60851c023fd985eab8a119f52a781c9be74 X-VCS-Branch: repoman Date: Tue, 3 May 2016 06:11:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 83e459d7-acf7-44cc-9339-55d5d68781b7 X-Archives-Hash: 96004aed77f636110c91469f356e6ee0 Message-ID: <20160503061129.G-d0OakO4xvD0mnpM9dn8ciU7qHHGPB8cV_1JXUvUz8@z> commit: 83baf60851c023fd985eab8a119f52a781c9be74 Author: Brian Dolbec gentoo org> AuthorDate: Sat Apr 30 00:11:35 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Apr 30 00:11:35 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=83baf608 portage/modules.py: Change warnings output to writemsg() Add the missing attribute and filepath to the output for best clarity, bug reporting. pym/portage/module.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pym/portage/module.py b/pym/portage/module.py index b7967ba..f9828a5 100644 --- a/pym/portage/module.py +++ b/pym/portage/module.py @@ -4,12 +4,11 @@ from __future__ import print_function -import warnings - from portage import os from portage.exception import PortageException from portage.cache.mappings import ProtectedDict from portage.localization import _ +from portage.util import writemsg class InvalidModuleName(PortageException): @@ -53,10 +52,10 @@ class Module(object): kid['module_name'] = '.'.join([mod_name, kid['sourcefile']]) except KeyError: kid['module_name'] = '.'.join([mod_name, self.name]) - warnings.warn( - _("%s module's module_spec is old and needs updating. " - "Backward compatibility may be removed in the future.") - % (self.name), UserWarning, stacklevel=2) + msg = ("%s module's module_spec is old, missing attribute: " + "'sourcefile'. Backward compatibility may be " + "removed in the future.\nFile: %s\n") + writemsg(_(msg) % (self.name, self._module.__file__)) kid['is_imported'] = False self.kids[kidname] = kid self.kids_names.append(kidname)