Closed fabiocerqueira closed 4 years ago
@tilboerner would you do us the honors of this review?
@anapaulagomes I'll be happy to review, but I won't be able to until next week when I'm back from vacation. :)
Take your time (and enjoy your vacation). 🍸 @tilboerner
@anapaulagomes depx still requires Python 3.4+ to run but you can inspect/parser Python 2 code with it, too. So, there is no need to add py27 to the tox.ini
@tilboerner I'll have a look in your comments, but I'll answer or apply the change only next week. Thanks for the review :D
@fabiocerqueira @anapaulagomes I've been thinking about this some more, and now I believe it would be best to have a command-line switch to force --py2
parsing, and use the builtin ast
otherwise. Here are my reasons:
People already have a Python 3 interpreter to run their code with; it's natural to use it for parsing.
Adding more parsing options complicates the system with little gain beyond Python 2.
Not using the same interpreter (and virtualenv) that is going to run the code closes off some easy options to find out more about the imported dependencies, like finding and categorizing them. We never made an explicit decision about this, and I'd rather not cement a decision as a side-effect of helping Python 2 live a little longer. :)
We can explicitly make the --py2
mode a temporary helper, that might not provide full functionality, and that will get dropped at some point in the future, allowing us more flexibility.
What do you guys think?
Stale PR, closing.
Python 2.7 won't be officially supported next year(2020), but it will still alive in thousands of companies. This PR allows depx parser python2.7 and python3 code