Menu

Python 3 incompatibility

2013-10-01
2013-10-02
  • Bryan Karpowicz

    Bryan Karpowicz - 2013-10-01

    Hi Thomas,
    Thanks much for your continued work on spectral python. I use it quite a
    bit. I was wondering what makes SPy incompatible with python3, and do you
    have any plans to add support in the near future? With matplolib adding
    support for Python3, I was considering making the jump.

    Many Thanks,
    Bryan

     
    • Thomas Boggs

      Thomas Boggs - 2013-10-02

      Hi Bryan,

      I'm glad you find the spectral module useful. The user guide states that it is not compatible with python 3.x simply because it has not been tested there. I am sure there are - at a minimum - some obvious incompatibilities (e.g., print statements without parenthesis). There may be some bigger issues (perhaps some integer division issues) but I simply have not tested that yet. Since you have brought it up, I will see if I can make it compatible with python 3 before the next release, although that probably won't be for a couple months.

      If you are feeling ambitious, you can run 2to3 on the module and see if it passes the unit tests. To run the current suite of unit tests for the spectral module with python3, type

      python3 -m spectral.tests.run
      

      If it does not report an error, then all of the tests passed. Note that testing will stop after the first test failure so if you would like to see if additional tests fail, you can append a -c (for "continue") argument to the end of the command above.

      If you do try the conversion and encounter any errors, feel free to let me know and I will take a look. Otherwise, I will try to include python3 compatibility for the next release.

      Regards,
      Thomas

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.