Skip to content

Remove deprecated validation function.#5932

Closed
derekriemer wants to merge 1 commit into
nvaccess:masterfrom
derekriemer:ConfigDepRemoval
Closed

Remove deprecated validation function.#5932
derekriemer wants to merge 1 commit into
nvaccess:masterfrom
derekriemer:ConfigDepRemoval

Conversation

@derekriemer

Copy link
Copy Markdown
Collaborator

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

Comment thread source/config/__init__.py
return errorStrings

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator Author

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

@jcsteh

jcsteh commented Jun 10, 2016 via email

Copy link
Copy Markdown
Contributor

@jcsteh

jcsteh commented Aug 9, 2016

Copy link
Copy Markdown
Contributor

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

@josephsl

josephsl commented Feb 5, 2017

Copy link
Copy Markdown
Contributor

Hi,

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

@derekriemer

Copy link
Copy Markdown
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