Bug#934871: lmfit-py: Please drop python2 support
Steve Langasek
steve.langasek at canonical.com
Fri Aug 16 05:19:46 BST 2019
Package: lmfit-py
Version: 0.9.11+dfsg-2
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu eoan ubuntu-patch
Dear Frédéric-Emmanuel,
As you may know, we are in the process of deprecating python2 in Debian for
the next release. In Ubuntu, I've identified that it may be useful to
accelerate this deprecation for pandas and its reverse-dependencies, because
the pandas tests appear to have bit-rotted for python2 on one architecture,
and it would be better to remove the python2 bits rather than invest in
fixing them.
lmfit-py is a package that build-depends on python-pandas, so I've gone
ahead and uploaded the attached patch to Ubuntu which drops the python2
module. python-lmfit has many reverse-recommends, but no hard
reverse-dependencies, so I think this change can be uploaded at any point.
Thanks for considering,
--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer https://www.debian.org/
slangasek at ubuntu.com vorlon at debian.org
-------------- next part --------------
diff -Nru lmfit-py-0.9.11+dfsg/debian/control lmfit-py-0.9.11+dfsg/debian/control
--- lmfit-py-0.9.11+dfsg/debian/control 2019-02-18 02:50:01.000000000 -0800
+++ lmfit-py-0.9.11+dfsg/debian/control 2019-08-15 20:59:59.000000000 -0700
@@ -5,15 +5,7 @@
Priority: optional
Build-Depends: debhelper (>= 11~),
dh-python,
- python-all,
- python-nose,
- python-asteval,
- python-numpy,
- python-pandas,
- python-scipy,
- python-setuptools,
python3-sphinx,
- python-uncertainties (>= 3.0.2.github~),
python3-all,
python3-nose,
python3-asteval,
@@ -27,63 +19,6 @@
Vcs-Git: https://salsa.debian.org/science-team/lmfit-py.git
Homepage: http://lmfit.github.io/lmfit-py/
-Package: python-lmfit
-Architecture: all
-Section: python
-Depends: python-scipy,
- ${misc:Depends},
- ${python:Depends}
-Suggests: python-lmfit-doc
-Description: Least-Squares Minimization with Constraints (Python 2)
- The lmfit Python package provides a simple, flexible interface to
- non-linear optimization or curve fitting problems. The package
- extends the optimization capabilities of scipy.optimize by replacing
- floating pointing values for the variables to be optimized with
- Parameter objects. These Parameters can be fixed or varied, have
- upper and/or lower bounds placed on its value, or written as an
- algebraic expression of other Parameters.
- .
- The principal advantage of using Parameters instead of simple
- variables is that the objective function does not have to be
- rewritten to reflect every change of what is varied in the fit, or
- what relationships or constraints are placed on the Parameters. This
- means a scientific programmer can write a general model that
- encapsulates the phenomenon to be optimized, and then allow user of
- that model to change what is varied and fixed, what range of values
- is acceptable for Parameters, and what constraints are placed on the
- model. The ease with which the model can be changed also allows one
- to easily test the significance of certain Parameters in a fitting
- model.
- .
- The lmfit package allows a choice of several optimization methods
- available from scipy.optimize. The default, and by far best tested
- optimization method used is the Levenberg-Marquardt algorithm from
- MINPACK-1 as implemented in scipy.optimize.leastsq. This method
- is by far the most tested and best support method in lmfit, and much
- of this document assumes this algorithm is used unless explicitly
- stated. An important point for many scientific analysis is that this
- is only method that automatically estimates uncertainties and
- correlations between fitted variables from the covariance matrix
- calculated during the fit.
- .
- A few other optimization routines are also supported, including
- Nelder-Mead simplex downhill, Powell's method, COBYLA, Sequential
- Least Squares methods as implemented in scipy.optimize.fmin, and
- several others from scipy.optimize. In their native form, some of
- these methods setting allow upper or lower bounds on parameter
- variables, or adding constraints on fitted variables. By using
- Parameter objects, lmfit allows bounds and constraints for all of
- these methods, and makes it easy to swap between methods without
- hanging the objective function or set of Parameters.
- .
- Finally, because the approach derived from MINPACK-1 usin the
- covariance matrix to determine uncertainties is sometimes questioned
- (and sometimes rightly so), lmfit supports methods to do a brute
- force search of the confidence intervals and correlations for sets of
- parameters.
- .
- This is the Python 2 version of the package.
-
Package: python3-lmfit
Architecture: all
Section: python
diff -Nru lmfit-py-0.9.11+dfsg/debian/python-lmfit-doc.doc-base lmfit-py-0.9.11+dfsg/debian/python-lmfit-doc.doc-base
--- lmfit-py-0.9.11+dfsg/debian/python-lmfit-doc.doc-base 2019-02-18 02:50:01.000000000 -0800
+++ lmfit-py-0.9.11+dfsg/debian/python-lmfit-doc.doc-base 2019-08-15 20:59:59.000000000 -0700
@@ -5,5 +5,5 @@
Section: Text
Format: HTML
-Index: /usr/share/doc/python-lmfit/html/index.html
-Files: /usr/share/doc/python-lmfit/html/*
+Index: /usr/share/doc/python3-lmfit/html/index.html
+Files: /usr/share/doc/python3-lmfit/html/*
diff -Nru lmfit-py-0.9.11+dfsg/debian/rules lmfit-py-0.9.11+dfsg/debian/rules
--- lmfit-py-0.9.11+dfsg/debian/rules 2019-02-18 02:50:01.000000000 -0800
+++ lmfit-py-0.9.11+dfsg/debian/rules 2019-08-15 20:59:59.000000000 -0700
@@ -14,11 +14,10 @@
# copy the tests to the build dir to be able to pass nose
export PYBUILD_AFTER_BUILD=cp -r NIST_STRD {build_dir}
export PYBUILD_BEFORE_INSTALL=rm -fr {build_dir}/NIST_STRD
-export PYBUILD_AFTER_INSTALL_python2=dh_numpy
export PYBUILD_AFTER_INSTALL_python3=dh_numpy3
%:
- dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild
+ dh $@ --with python3,sphinxdoc --buildsystem=pybuild
override_dh_clean:
rm -rf doc/_static/conf_interval2.png
@@ -37,9 +36,10 @@
endif
override_dh_installdocs-indep:
- dh_installdocs -i
+ dh_installdocs -p python-$(PYBUILD_NAME)-doc --doc-main-package python3-$(PYBUILD_NAME)
+ dh_installdocs -p python3-$(PYBUILD_NAME)
find debian/python-$(PYBUILD_NAME)-doc/usr/share/doc -name "*.html" -type f | xargs sed -i 's;https://cdn[js]*\..*/MathJax.js;_static/MathJax.js;g'
- ln -s /usr/share/javascript/mathjax/MathJax.js debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python-$(PYBUILD_NAME)/html/_static
+ ln -s /usr/share/javascript/mathjax/MathJax.js debian/python-$(PYBUILD_NAME)-doc/usr/share/doc/python3-$(PYBUILD_NAME)/html/_static
override_dh_python3:
dh_python3
diff -Nru lmfit-py-0.9.11+dfsg/debian/tests/control lmfit-py-0.9.11+dfsg/debian/tests/control
--- lmfit-py-0.9.11+dfsg/debian/tests/control 2019-02-18 02:50:01.000000000 -0800
+++ lmfit-py-0.9.11+dfsg/debian/tests/control 2019-08-15 20:59:59.000000000 -0700
@@ -1,5 +1,2 @@
-Tests: python2
-Depends: python-lmfit, python-all, python-tk, python-nose, python-matplotlib, python-pandas, python-scipy
-
Tests: python3
Depends: python3-lmfit, python3-all, python3-tk, python3-nose, python3-matplotlib, python3-pandas, python3-scipy
diff -Nru lmfit-py-0.9.11+dfsg/debian/tests/python2 lmfit-py-0.9.11+dfsg/debian/tests/python2
--- lmfit-py-0.9.11+dfsg/debian/tests/python2 2019-02-18 02:50:01.000000000 -0800
+++ lmfit-py-0.9.11+dfsg/debian/tests/python2 1969-12-31 16:00:00.000000000 -0800
@@ -1,10 +0,0 @@
-#!/bin/sh
-set -e -u
-
-cp -a NIST_STRD/ "$ADTTMP"
-cd "$ADTTMP/NIST_STRD"
-
-for python in $(pyversions -i); do
- PYTHONWARNINGS=d $python /usr/bin/nosetests -v 2>&1
-done
-
More information about the debian-science-maintainers
mailing list