New issue 196: Warning "PRICE() is deprecated; use GETPRICE() instead" even if
I'm using the correct function
https://bitbucket.org/blais/beancount/issues/196/warning-price-is-deprecated-use-getprice
mariosangiorgio:
I noticed this while looking at the logs of a dev version of fava.
I find it confusing that the warning is reported even if I'm using the new
function. I also spent a bit of time looking for usages of the deprecated
function before I realised what is going on.
This is happening because both in `query_env.py` `getprice` and `price` map to
the same object, which prints the warning.
```
#!python
# Note: Remove PRICE() at some point, GETPRICE() is less confusing.
('price', str, str) : Price,
('price', str, str, datetime.date) : PriceWithDate,
('getprice', str, str) : Price,
('getprice', str, str, datetime.date) : PriceWithDate,
```
How long is `price` going to stay around for? If it is for long I think we
should stop `getprice` from printing the warning.
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/beancount/20170930140847.17098.66326%40celery-worker-105.ash1.bb-inf.net.
For more options, visit https://groups.google.com/d/optout.