flav-io / flavio

A Python package for flavour physics phenomenology in the Standard model and beyond
http://flav-io.github.io/
MIT License
71 stars 62 forks source link

Flavio with python 3.7: YAMLLoadWarnings #85

Closed klieret closed 5 years ago

klieret commented 5 years ago

Hi David,

I just ran flavio in a python3.7 and got the following YAMLLoadWarnings, thought I'd let you know (this is just a warning, but fixing it is trivial by just replacing yaml.load(f) with yaml.load(f, loader=yaml.FullLoader))

/srv/conda/lib/python3.7/site-packages/flavio/config.py:5: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  config = yaml.load(f)
/srv/conda/lib/python3.7/site-packages/flavio/measurements.py:14: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  measurements = yaml.load(obj)
/srv/conda/lib/python3.7/site-packages/flavio/parameters.py:15: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  parameters = yaml.load(obj)
/srv/conda/lib/python3.7/site-packages/flavio/parameters.py:29: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  parameters = yaml.load(obj)
/srv/conda/lib/python3.7/site-packages/flavio/parameters.py:42: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
  list_ = yaml.load(obj)

Or are there other issues with python3.7 (seeing that it's not tested on travis)?

Cheers, Kilian

DavidMStraub commented 5 years ago

Thanks, good to know! PyYAML is a mess...

The reason Python 3.7 is not tested on Travis is that pypmc failed to compile, but probably it's time to deprecate it (unless it is fixed). Indeed assuring 3.7 compatibility is quite important.

klieret commented 5 years ago

@MarkusPrim might have been working (or planning to work) on a PR for the Yaml warnings ;) I might also do it if I find some time in the next weeks (it's super trivial after all).

DavidMStraub commented 5 years ago

Fixed by #87 and 8e1d05a8ed2e72bb51ab18efff7fa558f20c4ddf.