cdgriffith / puremagic

Pure python implementation of identifying files based off their magic numbers
MIT License
161 stars 34 forks source link

RuntimeWarning when running package #11

Closed victordomingos closed 6 years ago

victordomingos commented 6 years ago

I am getting this warning in Python 3.6 and 3.7 beta when running `python3 -m puremagic":

/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py:125: 
RuntimeWarning: 'puremagic.__main__' found in sys.modules after import of package 
'puremagic', but prior to execution of 'puremagic.__main__'; this may result in 
unpredictable behaviour
  warn(RuntimeWarning(msg))
cdgriffith commented 6 years ago

Thanks for the heads up, will get this fixed shortly.

cdgriffith commented 6 years ago

Fixed in 1.4 https://github.com/cdgriffith/puremagic/commit/6d9de9a5e0ffb16a2a76911fbc58ad2aca3b8642 Uploaded to Pypi and should be good to go. Let me know if you encounter any more issues or have more good ideas!

Thanks again!