# Dependency version support

SpacePy will occasionally drop support for old versions of dependencies. Failures with older versions will not be treated as SpacePy bugs. Dependency support is based on these principles:

> 1. SpacePy supports released versions of a dependency that meet a minimum version requirement; there is no maximum supported version.

> 2. Support for old versions of dependencies will be dropped only for reason, e.g. if a new version is required to support a new feature or fix a bug. Maintenance of convoluted workarounds is included in this category.

> 3. Support will be maintained for versions included in the second-most-recent Ubuntu Long Term Support (LTS) release, e.g. upon release of Ubuntu 20.04 LTS, support will be maintained for at least the versions in 18.04 LTS

> 4. Support will also be maintained for Python and NumPy versions in the spirit of NEP 29.

>    1. A SpacePy release will support at least all minor versions of Python released in the prior 42 months, and at least the two latest minor versions.

>    2. SpacePy will support all minor versions of NumPy and, where possible, other Python dependencies released in the prior 24 months, and at least the three latest minor versions.

>    3. Non-Python dependencies that use a similar versioning system will be supported similarly where possible.

>    4. This support is based on minor releases (x.y.0), not subsequent subminor releases (x.y.z for the same x.y). Where x.y.0 is supported, so is x.y.z for all z.

>    5. All versions of all dependencies and all combinations thereof will not necessarily be tested in continuous integration.

> 5. No support will be provided for conflicting versions of dependencies. E.g. SciPy 1.4 requires NumPy 1.13. Although SpacePy supports SciPy 1.4 and Numpy 1.6, it contains no workarounds for using them in that combination.

> 6. Support for a particular version of a dependency does not imply a commitment to work around bugs in that version.

> 7. Support for even earlier versions will be maintained as necessary for Python 2 compatibility as long as Python 2 support is maintained.

> 8. A release of SpacePy that requires new dependency versions will always have a subminor version of 0, e.g. if the release that follows 0.5.2 requires updated dependencies, it will be numbered 0.6.0.

> 9. The commit that requires a newer version of a dependency must also update the `requirements.txt`, SpacePy Dependencies, and the table below. The commit message must include the reason for the dependency requirement.

Regardless of minimum requirements, using the latest stable version of a package is generally preferred. The minimum supported version for SpacePy may not be recommended for other reasons (e.g. bug fixes or improved features elsewhere in the package.)

This table summarizes the versions to be supported according to the above policy, as well as the minimum version currently supported by SpacePy. Where available, the dependency name links to its version history. The oldest version supported according to this policy is in bold.

SpacePy dependency versions (2021/9/16)
Dependency | Current Release | Ubuntu 18.04LTS | Ubuntu 20.04LTS | NEP 29 (42/24 mo.) | NEP 29 (2/3 minor versions) | SpacePy current minimum
--- | --- | --- | --- | --- | --- | ---
CPython | 3.9.7 (2021/8/30) | 3.6.5 (2018/2/5) | 3.8.2 (2020/2/24) | 3.7.0 (2018/6/27) | 3.8.0 (2019/10/14) | 3.2.0 (2011/2/20) or 2.7.0 (2010/7/3)
AstroPy | 4.3.1 (2021/8/11) | 2.0.4 (2018/2/6) | 4.0 (2019/2/16) | 3.2 (2019/6/14) | 4.1 (2020/10/21) | 1.0 (2015/2/18)
CDF | 3.8.0.1 (2020/7/7) | N/A | N/A | 3.8.0 (2019/10/27) | 3.6.0 (2015/2/5) | 2.7.0 (1999/9/27)
dateutil | 2.8.2 (2021/7/8) | 2.6.1 (2017/7/10) | 2.7.3 (2018/5/9) | 2.8.0 (2019/2/5) | 2.6.0 (2016/11/8) | tested from 1.4 (2008/2/27)
h5py | 3.4.0 (2021/8/3) | 2.7.1 (2017/9/1) | 2.10.0 (2019/9/6) | 3.0.0 (2020/10/30) | 3.2.0 (2021/3/3) | tested from 2.6 (2017/3/18)
matplotlib | 3.4.3 (2021/8/12) | 2.1.1 (2017/12/9) | 3.1.2 (2019/12/4) | 3.2.0 (2020/3/3) | 3.2.0 (2020/3/3) | 1.5.0 (2015/10/29)
numpy | 1.21.2 (2021/8/15) | 1.13.3 (2017/7/6) | 1.16.5 (2019/8/27) | 1.18.0 (2019/12/22) | 1.19.0 (2020/1/20) | 1.10.0 (2015/10/5)
scipy | 1.7.1 (2021/8/1) | 0.19.1 (2017/6/23) | 1.3.3 (2019/11/23) | 1.4.0 (2019/12/16) | 1.5.0 (2020/6/21) | 0.11.0 (2012/9/24)