From 015acac98dc88fbbca5672c6be678c8dea491a8e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 1 Jun 2010 17:14:30 +0200 Subject: revert commit 346 (this re-enable the deprecation warnings) --- apt/progress/old.py | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) (limited to 'apt/progress/old.py') diff --git a/apt/progress/old.py b/apt/progress/old.py index 2d3fdb59..4bd79f2e 100644 --- a/apt/progress/old.py +++ b/apt/progress/old.py @@ -42,9 +42,8 @@ class OpProgress(base.OpProgress): def __init__(self): base.OpProgress.__init__(self) - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.OpProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.OpProgress is deprecated.", + DeprecationWarning, stacklevel=2) subOp = AttributeDeprecatedBy('subop') Op = AttributeDeprecatedBy('op') @@ -55,9 +54,8 @@ class OpTextProgress(OpProgress, text.OpProgress): def __init__(self): text.OpProgress.__init__(self) - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.OpTextProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.OpTextProgress is deprecated.", + DeprecationWarning, stacklevel=2) class FetchProgress(object): @@ -77,9 +75,8 @@ class FetchProgress(object): self.totalBytes = 0 self.totalItems = 0 self.currentCPS = 0 - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.FetchProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.FetchProgress is deprecated.", + DeprecationWarning, stacklevel=2) def start(self): """Called when the fetching starts.""" @@ -178,9 +175,8 @@ class CdromProgress(object): """Report the cdrom add progress.""" def __init__(self): - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.CdromProgress is deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.CdromProgress is deprecated.", + DeprecationWarning, stacklevel=2) def askCdromName(self): """Ask for a cdrom name""" @@ -197,9 +193,8 @@ class DumbInstallProgress(base.InstallProgress): def __init__(self): base.InstallProgress.__init__(self) - if "PYTHON_APT_DEPRECATION_WARNINGS" in os.environ: - warnings.warn("apt.progress.*InstallProgress are deprecated.", - DeprecationWarning, stacklevel=2) + warnings.warn("apt.progress.*InstallProgress are deprecated.", + DeprecationWarning, stacklevel=2) def updateInterface(self): # *_stream were not available in the old progress reporting classes, -- cgit v1.2.3