Pip gets disruptive in 20.3 release, while SymPy looks for enhanced usability

Hailed as an “important and disruptive release”, version 20.3 of the package installer for the Python programming language pip is finally here and it’s the first to use the project’s new dependency resolver by default. 

According to the Python Software Foundation, switching to the new resolver was necessary to fix many dependency issues and installation problems for all sorts of important projects such as conda, certbot, and WebSocket. To get there, the Python team had to address “massive technical debt”, and was aided by funding from external sources including Mozilla and Chan Zuckerberg. 

In the last couple of months the new dependency resolver then went through some final stabilisation efforts, leaving the latest version with improved performance, output and error messages, and ways of handling constraint files and avoiding infinity loops. 

The more strict and consistent design will almost certainly lead to some workflows and established workarounds breaking so studying the migration guide is recommended for anyone who depends on pip.

Other new features are support for MacOS Big Sur compatibility tags as well as new ‘manylinux’ wheel tags for portable Linux built distributions.

Developers still on Python 2.7 can rest easy for now as pip 20.3 still supports that version. However, the pip team is currently planning for its next major release to hit in January 2021, which includes the cessation of support for Python 2, so don’t wait too long to make the jump.

Once you’re done updating pip, it might be time to also get SymPy up to date too. The team behind the symbolic mathematics library has just rolled out version 1.7 of its project.

As matrix computation and the solving of differential equations is likely high on many users lists, the corresponding components are amongst the most worked ones in this release. In addition to some substantial bug fixes, the matrices module now consistently gives a TypeError when adding an array and a matrix, infinite recursion with rmul is prevented, and a new MatrixSet class can be used to represent sets of matrices when needed. 

Creating dense or symbolic companion matrices has become easier through the addition of Matrix.companion and CompanionMatrix. Solvers, meanwhile, received some additional helpers to better work through systems of ordinary differential equations.

Parsing was another focal point of the SymPy community, leaving the C parser with support for loops, more data types, and shorthand operators such as += and %=. The LaTeX support can now handle not equal, the \left and \right parenthesis notation, \exp, and expression with amsmath spacing.

SymPy 1.7 also includes some still experimental features in the form of extensible add, mul, and power functions. Those can be used to customise the behaviour of core routines, though they do not work across the core yet and the SymPy team is still pondering whether or not those will stick around. So if this is something you’re interested in, giving feedback can only  help to move the functions forward. 

Users should be aware that SymPy 1.7 won’t work on Python 2.7. Developers who still can’t make the switch to Python 3 should therefore stick to version 1.5.1, as that’s the last release that supports old Python. More information about backwards compatibility breaks and deprecations, as well as additional features can be found in the release notes of the project.