ned14 / pcpp

A C99 preprocessor written in pure Python
Other
220 stars 41 forks source link

Drop Python 2.7 compatibility? #87

Open mrolle45 opened 10 months ago

mrolle45 commented 10 months ago

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:

  1. Do you think anyone would be using pcpp with Python 2.7 anymore?
  2. 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.
  3. 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 m@rolle.name, 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.

ned14 commented 10 months ago

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.