fix ResourceWarning in setup.py

Found running Python with "-Wd" or having the environment variable
PYTHONWARNINGS="default".