Make gmxapi.version.has_feature warning more useful.
commit46d02dcd05e99dabd1d4e9a81dc1cb81cd899958
authorM. Eric Irrgang <ericirrgang@gmail.com>
Thu, 12 Dec 2019 17:14:45 +0000 (12 20:14 +0300)
committerPaul Bauer <paul.bauer.q@gmail.com>
Mon, 24 Feb 2020 12:20:10 +0000 (24 13:20 +0100)
tree9c903a1bf39abd71b136fa97c9b25d68ba0d8164
parentd80618cbfde25b1e345f36173bad038c734ce1ba
Make gmxapi.version.has_feature warning more useful.

When issuing a warning about misuse of a utility, use `stacklevel=2`
instead of the default (stacklevel=1) to report the context of the call
to the utility, rather than that of the call to `warnings.warn()`,
so that the warning can actually direct a developer to the source of the
problem.

Change-Id: I86cedaf8863e589fed385199b573bb1a420655e2
python_packaging/src/gmxapi/version.py