mirumee / django-prices

Django fields for the prices module
158 stars 53 forks source link

Django 2.0 compat fix #49

Closed tungd closed 6 years ago

tungd commented 6 years ago

_format_value is now format_value. It actually is deprecated since 1.10. I still keep the _format_value for backward compatible, since I'm not sure about your policy regarding support older Django version. Please let me know if it is ok to remove I will update the PR.

patrys commented 6 years ago

I think we should do what we do with most of our software stack: support the latest version (2.0) and the last LTS (1.11).

codecov-io commented 6 years ago

Codecov Report

Merging #49 into master will increase coverage by 5.28%. The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #49      +/-   ##
=======================================
+ Coverage   88.71%   94%   +5.28%     
=======================================
  Files           5     3       -2     
  Lines         195   100      -95     
  Branches       24     9      -15     
=======================================
- Hits          173    94      -79     
+ Misses         12     4       -8     
+ Partials       10     2       -8
Impacted Files Coverage Δ
django_prices/widgets.py 88.88% <100%> (ø) :arrow_up:
django_prices/forms.py
django_prices/models.py

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 07e91db...750a577. Read the comment docs.

tungd commented 6 years ago

If that's the case then keeping only format_value is fine, it's there since 1.11 (https://docs.djangoproject.com/en/1.11/releases/1.10/#id3). I've update the PR to reflect that.

Btw the test fail running Django 2.0 on Python 2.7, which is not supported.

patrys commented 6 years ago

@elwoodxblues @tungd I've fixed the tox config so it uses the correct Django versions.

patrys commented 6 years ago

Thank you! I'll release this with a minor version bump (as it affects the list of supported platforms).

patrys commented 6 years ago

Actually we already required 1.11+ so it'll be out as 0.7.1.