-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Summary
edtf 5.0.0 uses deprecated pyparsing method names, causing DeprecationWarnings with pyparsing 3.2+:
DeprecationWarning: 'parseString' deprecated - use 'parse_string'
File ".../edtf/parser/grammar.py", line 352
The Issue
pyparsing 3.1+ deprecated camelCase method names in favor of PEP8 snake_case:
parseString()→parse_string()parseAllparam →parse_all
These will be removed in pyparsing 4.0.
Suggested Fix
pyparsing 3.2.2 includes a migration tool:
python -m pyparsing.tools.cvt_pep8_names -u edtf/parser/grammar.pyOr manually update line 352 in edtf/parser/grammar.py:
# Before
p = edtfParser.parseString(input_string.strip(), parseAll)
# After
p = edtfParser.parse_string(input_string.strip(), parse_all=parseAll)Environment
- Python 3.12
- edtf 5.0.0
- pyparsing 3.2.x
Metadata
Metadata
Assignees
Labels
No labels