Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated validation function. #5932

Closed
wants to merge 1 commit into from

Conversation

derekriemer
Copy link
Collaborator

Removes validation function that has been there for several NVDA versions now.

errorStrings.append("%s: %s, defaulting to %s"%(k,v,defaultValue))
return errorStrings

#: @deprecated: Use C{conf.validator} instead.
val = Validator()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've removed the deprecation note here, but not the variable. We may as well remove this variable too and instead make ConfigManager instantiate Validator directly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

um, fail on my part.

On 6/9/2016 6:01 PM, James Teh wrote:

In source/config/init.py
#5932 (comment):

  •   if v is True:
    
  •       continue
    
  •   newKeyList=list(keyList) if keyList is not None else []
    
  •   newKeyList.append(k)
    
  •   if isinstance(v,dict):
    
  •       errorStrings.extend(validateConfig(configObj[k],validator,v,newKeyList))
    
  •   else:
    
  •       #If a key is invalid configObj does not record its default, thus we need to get and set the default manually
    
  •       defaultValue=validator.get_default_value(configObj.configspec[k])
    
  •       configObj[k]=defaultValue
    
  •       if k not in configObj.defaults:
    
  •           configObj.defaults.append(k)
    
  •       errorStrings.append("%s: %s, defaulting to %s"%(k,v,defaultValue))
    

- return errorStrings

-#: @deprecated: Use C{conf.validator} instead.
val = Validator()

You've removed the deprecation note here, but not the variable. We may
as well remove this variable too and instead make ConfigManager
instantiate Validator directly.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nvaccess/nvda/pull/5932/files/ad494d45126e9b22df7a0056f84aba9dfafdcef7#r66542894,
or mute the thread
https://github.com/notifications/unsubscribe/AFGivWQGa2KLS-F7ddaC3KKtp4Hhdp0bks5qKKlrgaJpZM4IY4RQ.


Derek Riemer
  • Department of computer science, third year undergraduate student.
  • Proud user of the NVDA screen reader.
  • Open source enthusiast.
  • Member of Bridge Cu
  • Avid skiier.

Websites:
Honors portfolio http://derekriemer.com
Awesome little hand built weather app!
http://django.derekriemer.com/weather/

email me at derek.riemer@colorado.edu mailto:derek.riemer@colorado.edu
Phone: (303) 906-2194

@derekriemer
Copy link
Collaborator Author

Hi,
I'm concerned removing val causes errors on line 262

@jcsteh
Copy link
Contributor

jcsteh commented Jun 10, 2016 via email

@jcsteh
Copy link
Contributor

jcsteh commented Aug 9, 2016

Friendly ping? See my last comment about how to proceed with this.

@josephsl
Copy link
Collaborator

josephsl commented Feb 5, 2017

Hi,

I'll take care of this in a separate issue/PR combo. Thanks.

@derekriemer
Copy link
Collaborator Author

Thanks @josephsl you finished this before I got to it again, closing.

@derekriemer derekriemer deleted the ConfigDepRemoval branch March 23, 2017 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants