yt 4.0.2
Summary
This is the second bugfix release in the 4.0.x series.
Most notably, this release fixes a number of compatibility issues with recent versions of Matplotlib (3.4 and 3.5). It is also the first release to officially support Python 3.10.
This release contains no new deprecation or removal and should be fully backward compatible, we recommend all users to upgrade.
How to upgrade
To upgrade via PyPI, run
python -m pip install --upgrade yt
or via conda-forge
conda update --channel conda-forge yt
Most impactful changes are categorised below. See the 4.0.2 milestone for a an comprehensive view of the release's content.
Matplotlib compatibility
typesetting issues
- BUG: Set the display name for new fields #3282 by @chummels (issue #3269)
- BUG: fix default math font in yt plots against matplotlib >= 3.4 #3520 by @neutrinoceros (issue #3514)
- BUG: fix LaTeX typesetting for fractional ylabels in LinePlot #3637 by @neutrinoceros (issue #3636)
colorbar layout in plots using (sym)log norms
- BUG: fix two bugs with symlog colorbar ticks for matplotlib 3.5 #3556 by @neutrinoceros (issues #3554 and #3560)
- BUG: fix for matplotlib 3.5 + symlog + linthresh value outside data range #3565 by @neutrinoceros (issue #3564)
- MNT: matplotlib 3.5 compat #3670 by @neutrinoceros (issue #3558)
2D Plotting
- BUG: Checking if extrema are all None in PhasePlot #3432 by @chummels (issue #3431)
- BUG: fix a bug where 2D plots in spherical geometries would always use code-units in plot axes #3618 by @neutrinoceros (issue #2913 by @n-claes)
- BUG: fixes for Hammer-Aitoff projection (r-normal) 2D viz in spherical geometries #3628 by @neutrinoceros (issue #3610)
- BUG: fix figure layout in case the long axis is vertical #3633 by @neutrinoceros
- BUG: fix a bug where PlotContainer.save would wrongfully ignore specified field extension #3687 by @neutrinoceros (issue #3632)
Documentation
- DOC: add an exhaustive list of deprecations to the yt4differences page #3665 by @neutrinoceros (issue #3451)
- DOC: fix an error in AMRVAC specific documentation #3716 by @neutrinoceros
Frontend specific patches
Gadget
- Make sure we add the Parameters group to hvals if it's present #3455 by @jzuhone
- BUG: Take into account endianness when reading Gadget binary files #3688 by @cphyc (issue #3676 by @olebole)
Athena
These changes should actually not affect Athena users, they are only meant to open the design space for new frontends supporting vtk files (issue #3001)
- BUG: implement AthenaDataset._is_valid #3424 by @neutrinoceros
- ENH: loosen header matching for Athena vtk files to allow compatibility with single variable 'vtk outputs' #3490 by @neutrinoceros
GDF
- dimensionality doesn't imply which dimension is reduced #3630 by @Xarthisius (issue #3629)
Misc
- BUG: add support for setting up derived fields from lambdas #3440 by @neutrinoceros (issue #3434 by @forrestglines)
- BUG: fix combining FITS images #3456 by @jzuhone
- BUG: fix two bugs in yt.visualization.eps_writer #3496 by @neutrinoceros
Python 3.10 support
yt 4.0.2 is the first release for which we provide wheels for Python 3.10
We note that part of our test suite has yet to be ported from nosetest to pytest. Because nosetest isn't compatible with Python 3.10 (and has been unmaintained for years), this means that we currently run only a (large) subset of our tests with Python 3.10
In the unlikely event of a regression, please fill in a bug report
Requirements
For posterity, it may be worth noting that some of yt's minimal requirements were adjusted for this release:
- IPython 2.0 or newer is now required (previously 1.0)
- Matplotlib 2.1 or newer is now required (previously 2.0.2)
- cmyt (ColorMaps from yt) is a new small dependency that was extracted from yt's main code base, this should have no impact on yt users.
Python 3.6 is still supported for this release. The next feature release, yt 4.1, will require Python 3.7 or newer.