Skip to content

Commit

Permalink
Merge pull request #1958 from larrybradley/drop-py310
Browse files Browse the repository at this point in the history
Drop Support for Python 3.10
  • Loading branch information
larrybradley authored Nov 23, 2024
2 parents 8db3f19 + 3e20768 commit 3faec07
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
matrix:
include:
- os: ubuntu-latest
python: '3.10'
tox_env: 'py310-test-alldeps'
python: '3.11'
tox_env: 'py311-test-oldestdeps'
allow_failure: false
prefix: ''

Expand Down Expand Up @@ -93,8 +93,8 @@ jobs:
prefix: ''

- os: ubuntu-latest
python: '3.10'
tox_env: 'py310-test-oldestdeps'
python: '3.13'
tox_env: 'py313-test-alldeps'
allow_failure: false
prefix: ''

Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,20 @@ jobs:
test_command: pytest -p no:warnings --pyargs photutils
targets: |
# Linux wheels
- cp310-manylinux_x86_64
- cp311-manylinux_x86_64
- cp312-manylinux_x86_64
- cp313-manylinux_x86_64
# MacOS X wheels
- cp310*macosx_x86_64
- cp311*macosx_x86_64
- cp312*macosx_x86_64
- cp313*macosx_x86_64
- cp310*macosx_arm64
- cp311*macosx_arm64
- cp312*macosx_arm64
- cp313*macosx_arm64
# Windows wheels
- cp310*win_amd64
- cp311*win_amd64
- cp312*win_amd64
- cp313*win_amd64
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ build:
apt_packages:
- graphviz
tools:
python: "3.11"
python: "3.12"
jobs:
post_checkout:
- git fetch --shallow-since=2023-05-01 || true
Expand Down
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
General
^^^^^^^

- The minimum required Python is now 3.11. [#1958]

New Features
^^^^^^^^^^^^

Expand Down
10 changes: 3 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,13 @@

import os
import sys
from datetime import datetime, timezone
import tomllib
from datetime import UTC, datetime
from importlib import metadata
from pathlib import Path

from sphinx.util import logging

if sys.version_info < (3, 11):
import tomli as tomllib
else:
import tomllib

logger = logging.getLogger(__name__)

try:
Expand Down Expand Up @@ -89,7 +85,7 @@
# -- Project information ------------------------------------------------------
project = project_meta['name']
author = project_meta['authors'][0]['name']
project_copyright = f'2011-{datetime.now(tz=timezone.utc).year}, {author}'
project_copyright = f'2011-{datetime.now(tz=UTC).year}, {author}'
github_project = 'astropy/photutils'

# The version info for the project you're documenting, acts as
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Requirements

Photutils has the following strict requirements:

* `Python <https://www.python.org/>`_ 3.10 or later
* `Python <https://www.python.org/>`_ 3.11 or later

* `NumPy <https://numpy.org/>`_ 1.24 or later

Expand Down
8 changes: 2 additions & 6 deletions photutils/utils/_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

import sys
from datetime import datetime, timezone
from datetime import UTC, datetime


def _get_version_info():
Expand Down Expand Up @@ -49,11 +49,7 @@ def _get_date(utc=False):
result : str
The current date/time.
"""
if not utc:
now = datetime.now().astimezone()
else:
now = datetime.now(timezone.utc)

now = datetime.now().astimezone() if not utc else datetime.now(UTC)
return now.strftime('%Y-%m-%d %H:%M:%S %Z')


Expand Down
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ classifiers = [
'Topic :: Scientific/Engineering :: Astronomy',
]
dynamic = ['version']
requires-python = '>=3.10'
requires-python = '>=3.11'
dependencies = [
'numpy>=1.24',
'astropy>=5.3',
Expand Down Expand Up @@ -62,7 +62,6 @@ docs = [
'sphinx',
'sphinx_design',
'sphinx-astropy[confv2]>=1.9.1',
'tomli; python_version < "3.11"',
]

[build-system]
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py{310,311,312,313}-test{,-alldeps,-devdeps,-oldestdeps,-devinfra}{,-cov}
py{310,311,312,313}-test-numpy{126,200,210}
py{311,312,313}-test{,-alldeps,-devdeps,-oldestdeps,-devinfra}{,-cov}
py{311,312,313}-test-numpy{126,200,210}
build_docs
linkcheck
codestyle
Expand Down

0 comments on commit 3faec07

Please sign in to comment.