Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop python 3.7 support #5773

Merged
merged 2 commits into from Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions azure-pipelines.yml
Expand Up @@ -80,10 +80,10 @@ stages:
brew:
- openjpeg
envs:
- macos: py37
- macos: py38
- windows: py310
- linux: py37-oldestdeps
- linux: py38-conda
- linux: py38-oldestdeps
- linux: py39-conda
libraries: {}

- stage: SecondPhaseTestsAllowedFail
Expand Down Expand Up @@ -151,8 +151,8 @@ stages:
test_command: 'pytest -p no:warnings --doctest-rst -m "not mpl_image_compare" --pyargs sunpy'
submodules: false
targets:
- wheels_cp3[789]-manylinux*x86_64
- wheels_cp3[789]-macosx*
- wheels_cp3[89]-manylinux*x86_64
- wheels_cp3[89]-macosx*
- wheels_cp310-manylinux*x86_64
- wheels_cp310-macosx*
- sdist
Expand Down
1 change: 1 addition & 0 deletions changelog/5773.feature.rst
@@ -0,0 +1 @@
Removed support for Python 3.7.
2 changes: 1 addition & 1 deletion docs/guide/installation.rst
Expand Up @@ -7,7 +7,7 @@ Installation
Requirements
============

sunpy requires Python 3.7 or higher.
sunpy requires Python 3.8 or higher.

Installing Scientific Python and sunpy
======================================
Expand Down
35 changes: 35 additions & 0 deletions docs/whatsnew/4.0.rst
@@ -0,0 +1,35 @@
.. doctest-skip-all

.. _whatsnew-4.0:

************************
What's New in SunPy 4.0?
************************
The SunPy project is pleased to announce the 4.0 release of the sunpy core package.

On this page, you can read about some of the big changes in this release.

.. contents::
:local:
:depth: 1

SunPy 4.0 also includes a large number of smaller improvements and bug fixes, which are described in the :ref:`changelog`.

By the numbers:

TODO: fill this in at release time.

Increase in required package versions
=====================================
We have bumped the minimum version of several packages we depend on; these are the new minimum versions:

- python >= 3.8

Contributors to this Release
============================

The people who have contributed to the code for this release are:

TODO: fill this in at release time.

Where a * indicates that this release contains their first contribution to SunPy.
4 changes: 2 additions & 2 deletions setup.cfg
Expand Up @@ -21,14 +21,14 @@ classifiers =
Operating System :: OS Independent
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Topic :: Scientific/Engineering :: Physics

[options]
zip_safe = False
python_requires = >=3.7
python_requires = >=3.8
packages = find:
include_package_data = True
setup_requires =
Expand Down
8 changes: 1 addition & 7 deletions sunpy/data/data_manager/cache.py
Expand Up @@ -6,7 +6,6 @@
import astropy.units as u
from astropy.time import TimeDelta

from sunpy.time import parse_time
from sunpy.util.exceptions import warn_user
from sunpy.util.net import get_filename
from sunpy.util.util import hash_file
Expand Down Expand Up @@ -107,12 +106,7 @@ def _has_expired(self, details):
Whether the url has expired or not.
"""
time = details.get("time", datetime.now().isoformat())

# TODO: Remove this once we depend on Python >=3.7
if hasattr(datetime, "fromisoformat"):
time = datetime.fromisoformat(time)
else:
time = parse_time(time).datetime
time = datetime.fromisoformat(time)
return self._expiry and datetime.now() - time > self._expiry

def get_by_hash(self, sha_hash):
Expand Down