kynan/nbstripout

0.3.8 version is not compatible with Python 2 but installed by pip

Closed this issue · 2 comments

I installed nbstripout (thanks!) with pip on python2.7 on ubuntu 18.04.

I got the following error due to different signature of the open function with python 2 and 3.

The problem I'm reporting is with the pip package that does not realise that the latest version 0.3.8 is incompatible with python2.

default: Traceback (most recent call last):
    default:   File "/home/sirfuser/.local/bin/nbstripout", line 8, in <module>
    default:
    default: sys.exit(main())
    default:   File "/home/sirfuser/.local/lib/python2.7/site-packages/nbstripout/_nbstripout.py", line 295, in main
    default:
    default: sys.exit(install(git_config, user=args._global, attrfile=args.attributes))
    default:   File "/home/sirfuser/.local/lib/python2.7/site-packages/nbstripout/_nbstripout.py", line 173, in install
    default:
    default: with open(attrfile, 'a', newline='') as f:
    default: TypeError
    default: :
    default: 'newline' is an invalid keyword argument for this function

To be honest, given that Python2 has been dropped this isn't quite an issue. But it's worth mentioning it in your readme.

kynan commented

Thanks, will add a note that Python 2 is no longer supported.