Unidata / MetPy

MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.
https://unidata.github.io/MetPy/
BSD 3-Clause "New" or "Revised" License
1.24k stars 413 forks source link

Should we migrate to attrs? #667

Open dopplershift opened 6 years ago

dopplershift commented 6 years ago

So Python 3.7 is going to gain Data Classes. TLDR; it's a shorthand to write classes that are essentially groups of attributes, but:

The attrs library provides a lot of this today, though with not quite as nice a syntax. It'd be nice to update our namedtuples to something better, and it'd be good to not use more of them.

So I guess what I'm looking for is: are there arguments against starting to use attrs before we can just rely on Python >= 3.7? (this case is probably 5 years away.) We'd have to do a minor conversion from attrs to just use Python 3.7; probably not much work, and I guess if we find we really love attrs that much, we wouldn't have to move.

jrleeman commented 6 years ago

I can't see a strong argument against it - maybe we give it a shot and then make a hit list of things to convert?