Drop Python 2.7 compatibility?
I'd like to contribute some modest enhancements to pcpp. But I find that code that is Python 2 compatible is a nuisance to work with. I'd like to be able to use Python 3.7 (at least) features.
Questions for you, Ned:
- Do you think anyone would be using pcpp with Python 2.7 anymore?
- How would you publish 3.7-only code on PyPI and still make the current code available? I'm not familiar with using PyPI to publish code. I suppose there's a way to make the code version dependent so that "pip install pcpp" would magically pull in the right version to match the Python version running pip.
- How would you distinguish the two versions on GitHub. My idea is that you would create a "Python 2.7" branch off the current "main" and then merge my stuff onto the main branch. Also update README page to say that it is now requiring 3.7, and have a link to the 2.7 branch for those who want it.
Please let me know right away at [email protected], so I can know whether I could use 3.7 features or not. Thanks.
FYI, the enhancements I have in mind are just to make pcpp easier to use, and not to alter the result.
- New switch,
-v. Used for the level of verbosity in the debug log only. Repeatable for higher levels. - An optional file name for the
--debugswitch, to replace the defaultpccp_debug.log. - Easier to read debug log, especially when no verbosity.
- Indentation in the debug log, introduced by | characters. These will frame
#include-ed files, code sections controlled by#ifand friends, and details pertaining to various shown items. - Macro expansions, including #, ##, and rescanning.
I hope to make the next major release of pcpp around this time next year i.e. start of 2025 if that's any use. Until then, I simply do not have enough free time outside of work for this project (I am building a house).
I was intending to drop Python 2.7 support at that time. If you don't mind your PR waiting until 2025, feel free to use Python 3 features. Nothing newer than Python 3.7 however please.