From 25e9bde4b3c1eac9aa4430ed1c8536825499e639 Mon Sep 17 00:00:00 2001 From: James Teh Date: Tue, 7 Dec 2010 13:16:40 +1000 Subject: [PATCH] SynthDriver: Remove compatibility code for has* and *MinStep attributes, which were deprecated last release. --- source/synthDriverHandler.py | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/source/synthDriverHandler.py b/source/synthDriverHandler.py index d0c419e9f..5f5d33854 100644 --- a/source/synthDriverHandler.py +++ b/source/synthDriverHandler.py @@ -1,8 +1,8 @@ -#synthDrivers/__init__.py +#synthDriverHandler.py #A part of NonVisual Desktop Access (NVDA) -#Copyright (C) 2006-2007 NVDA Contributors #This file is covered by the GNU General Public License. #See the file COPYING for more details. +#Copyright (C) 2006-2010 Michael Curran , James Teh , Peter Vágner , Aleksey Sadovoy from copy import deepcopy import os @@ -170,7 +170,6 @@ class SynthDriver(baseObject.AutoPropertyObject): @type inflection: int @ivar lastIndex: The index of the chunk of text which was last spoken or C{None} if no index. @type lastIndex: int - @warning: The has* and *MinStep attributes (e.g. hasPitch and pitchMinStep) are deprecated and should not be used in new drivers. """ #: The name of the synth; must be the original module file name. @@ -332,19 +331,7 @@ class SynthDriver(baseObject.AutoPropertyObject): return self._availableVariants def _get_supportedSettings(self): - """This base implementation checks old-style 'has_xxx' and constructs the list of settings. - @returns: list of supported settings - @rtype: l{tuple} - """ - result=[] - settings=(("voice",self.VoiceSetting),("variant",self.VariantSetting),("rate",self.RateSetting),("pitch",self.PitchSetting),("inflection",self.InflectionSetting),("volume",self.VolumeSetting)) - for name,setting in settings: - if not getattr(self,"has%s"%name.capitalize(),False): continue - if hasattr(self,"%sMinStep"%name): - result.append(setting(getattr(self,"%sMinStep"%name))) - else: - result.append(setting()) - return tuple(result) + raise NotImplementedError def getConfigSpec(self): spec=deepcopy(config.synthSpec) -- 2.11.0