Don't generate DeprecationWarning for portdbapi arguments. Wait until new
authorZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:49:35 +0000 (19:49 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 2 Mar 2010 19:49:35 +0000 (19:49 -0000)
portdbapi constructor is in stable portage first. (trunk r15290)

svn path=/main/branches/2.1.7/; revision=15529

pym/portage/dbapi/porttree.py

index 1b5567a8e003b4954a83db86590b22f6c9f7124d..452674bb8d2f0970b88cc4340cd1a7477a968699 100644 (file)
@@ -143,7 +143,7 @@ class portdbapi(dbapi):
 
        def __init__(self, _unused_param=None, mysettings=None):
                """
-               @param _unused_param: deprecated
+               @param _unused_param: deprecated, use mysettings['PORTDIR'] instead
                @type _unused_param: None
                @param mysettings: an immutable config instance
                @type mysettings: portage.config
@@ -157,7 +157,8 @@ class portdbapi(dbapi):
                        from portage import settings
                        self.mysettings = config(clone=settings)
 
-               if _unused_param is not None:
+               # enable this warning after this parameter is unused in stable portage
+               if False and _unused_param is not None:
                        warnings.warn("The first parameter of the " + \
                                "portage.dbapi.porttree.portdbapi" + \
                                " constructor is now unused. Use " + \