navdeep-G/setup.py

FileNotFoundError not available in python2

remyleone opened this issue · 6 comments

FileNotFoundError is not defined in python2

$ python setup.py publish
running publish
Removing previous builds…
Traceback (most recent call last):
File "setup.py", line 101, in
'publish': PublishCommand,
File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "setup.py", line 60, in run
except FileNotFoundError:
NameError: global name 'FileNotFoundError' is not defined

let's get this fixed

What does FileNotFoundError inherit from? We can use it's base exception.

It inherits from OSError in Python2 and Python3

This problem is reintroduced nine months later in commit 81a9a65