Check requirements for python 3 support

后端 未结 1 517
终归单人心
终归单人心 2021-01-03 22:36

I have several python projects with different set of dependencies listed in pip requirements files. I\'ve started to think about porting the code to python 3, but I need to

相关标签:
1条回答
  • 2021-01-03 23:24

    With the help of @thefourtheye and py3readiness.org sources, I've found exactly what I needed.

    caniusepython3 module by Brett Cannon:

    Determine what projects are blocking you from porting to Python 3

    This script takes in a set of dependencies and then figures out which of them are holding you up from porting to Python 3.

    Example (for the requirements.txt from the question):

    $ caniusepython3 -r requirements.txt 
    Finding and checking dependencies ...
    
    You need 2 projects to transition to Python 3.
    Of those 2 projects, 2 have no direct dependencies blocking their transition:
    
      fabric
      mysql-python
    

    I should note that it still uses the same approach as python3wos - looking for Programming Language :: Python :: 3x classifiers on the package page.

    There is also a web-interface where you can type your dependencies or drop a requirements.txt file.

    0 讨论(0)
提交回复
热议问题