Repository navigation
oletools/olevba.py: Fix deprecation warnings - #888
leon-anavi wants to merge 1 commit into
Conversation
Replace deprecated PyParsing APIs with their current equivalents: enablePackrat -> enable_packrat, setParseAction -> set_parse_action, escQuote -> esc_quote, initChars/bodyChars -> init_chars/body_chars, infixNotation -> infix_notation, scanString -> scan_string. Fixes: PyparsingDeprecationWarning: 'enablePackrat' deprecated - use 'enable_packrat' PyparsingDeprecationWarning: 'setParseAction' deprecated - use 'set_parse_action' PyparsingDeprecationWarning: 'escQuote' argument is deprecated, use 'esc_quote' PyparsingDeprecationWarning: 'initChars' argument is deprecated, use 'init_chars' PyparsingDeprecationWarning: 'infixNotation' deprecated - use 'infix_notation' PyparsingDeprecationWarning: 'scanString' deprecated - use 'scan_string' Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
|
This misses bumping the requirement in setup.py. With the older pyparsing versions this would no longer work. I've already filed a PR for this months ago, see #877 |
Sorry, I've missed your #877. Just to provide more context on my work, I ran into this while enabling tests for oletools in layer meta-openembedded which in a nutshell is used with the Yocto Project and OpenEmbedded for building custom embedded Linux distributions. I tested it on Raspberry Pi. Within this setup the dependencies are managed differently and we have there the required new pyparsing version. Here is my patch which has been merged in the upstream of meta-openembedded/meta-python: |
Replace deprecated PyParsing APIs with their current equivalents: enablePackrat -> enable_packrat, setParseAction -> set_parse_action, escQuote -> esc_quote, initChars/bodyChars -> init_chars/body_chars, infixNotation -> infix_notation, scanString -> scan_string.
Fixes:
PyparsingDeprecationWarning: 'enablePackrat' deprecated - use 'enable_packrat'
PyparsingDeprecationWarning: 'setParseAction' deprecated - use 'set_parse_action'
PyparsingDeprecationWarning: 'escQuote' argument is deprecated, use 'esc_quote'
PyparsingDeprecationWarning: 'initChars' argument is deprecated, use 'init_chars'
PyparsingDeprecationWarning: 'infixNotation' deprecated - use 'infix_notation'
PyparsingDeprecationWarning: 'scanString' deprecated - use 'scan_string'