swaroopch / edn_format

EDN reader and writer implementation in Python, using PLY (lex, yacc)
https://swaroopch.com/2012/12/24/edn-format-python/
Other
131 stars 31 forks source link

Allow to override PLY's debug/write_tables flags #66

Closed bfontaine closed 4 years ago

bfontaine commented 4 years ago

This adds a way to remove the warnings in #65.

This is a draft PR because this works appear to work when I try it but I don’t know why my tests don’t pass. It’s midnight here so I’ll look into it tomorrow.

This PR adds two keyword arguments to the parse and parse_all functions:

bfontaine commented 4 years ago

I mistakenly clicked on “New PR” instead of “New Draft PR” 🤦‍♂

PlumpMath commented 4 years ago

Thanks bfontaine

bfontaine commented 4 years ago

I ended up removing the tests: since this is just passing options down to PLY, testing this would mean testing PLY’s internals.

PLY It doesn’t close its debug file (https://github.com/dabeaz/ply/issues/200) so we have no way to guarantee that os.path.isfile("…path to the debug file…") is True at any point before the end of the program.