Open gatl opened 4 years ago
but wasnt code written this way, so most of python2-exclusive code is about few imports?
There is the python2-exclusive code that won't run on python3, and there is python3-exclusive code that won't run on python2. That is not limited to a few imports. Keeping all those conditions interrupt the flow of the code but is only part of the story.
Python 3 has added a great deal of goodies (like the Async IO I mentioned) that do not exist on python2. If we take advantage of them (and we should, if they bring significant advantages), what should we do to keep compatibility with Python 2? Implement an inferior version of them in the code? That seems like a waste of effort for (1 or 2?) persons that can't run Python 3 on their systems (if there are any). It would be better to create a new Python2 version of the tool, reusing and adapting it as needed if they feel the current version of gogrepoc is not enough for them.
I'm of the opinion that focusing only on the new version of Python makes more sense, is more future-aware and is more efficient effort-wise.
Personally, I would consider dropping support for Python 2 (people who need it can continue to use the current version of gogrepo) to get a much cleaner, simpler and more modern codebase.
Then the option of using Async IO could be put on the table. There would be no need to adjust the number of concurrent workers and the system would scale better with the bandwidth that is available. But that is just my opinion.