Skip to content

Require Python 3.12#1417

Merged
SpacemanPaul merged 1 commit into
opendatacube:developfrom
pjonsson:require-py312
Jun 10, 2026
Merged

Require Python 3.12#1417
SpacemanPaul merged 1 commit into
opendatacube:developfrom
pjonsson:require-py312

Conversation

@pjonsson

@pjonsson pjonsson commented Dec 29, 2025

Copy link
Copy Markdown
Contributor

Sphinx and various other packages
have started dropping support
for Python 3.10, so require
Python 3.12 and upgrade the source
code to use Python 3.12 features
where possible.

The most noticeable change for OWS
is that the override decorator is
part of typing, and the UTC alias
declared in datetime.


📚 Documentation preview 📚: https://datacube-ows--1417.org.readthedocs.build/en/1417/

@pjonsson pjonsson force-pushed the require-py312 branch 2 times, most recently from ee9fe26 to 11d4ed8 Compare December 29, 2025 12:01
@codecov

codecov Bot commented Dec 29, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.30%. Comparing base (69c9d8d) to head (97e7bc4).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1417      +/-   ##
===========================================
- Coverage    92.31%   92.30%   -0.02%     
===========================================
  Files           56       56              
  Lines         7263     7252      -11     
===========================================
- Hits          6705     6694      -11     
  Misses         558      558              
Files with missing lines Coverage Δ
datacube_ows/config_utils.py 96.55% <100.00%> (-0.01%) ⬇️
datacube_ows/index/postgis/api.py 87.02% <100.00%> (-0.10%) ⬇️
datacube_ows/index/postgres/api.py 92.78% <100.00%> (-0.08%) ⬇️
datacube_ows/loading.py 80.95% <100.00%> (-0.09%) ⬇️
datacube_ows/ogc_exceptions.py 98.63% <100.00%> (ø)
datacube_ows/ows_configuration.py 92.59% <100.00%> (-0.01%) ⬇️
datacube_ows/startup_utils/__init__.py 87.76% <100.00%> (-0.09%) ⬇️
datacube_ows/styles/base.py 96.02% <100.00%> (-0.02%) ⬇️
datacube_ows/styles/colormap.py 98.44% <100.00%> (-0.01%) ⬇️
datacube_ows/styles/component.py 94.68% <100.00%> (-0.06%) ⬇️
... and 5 more
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SpacemanPaul

Copy link
Copy Markdown
Contributor

Our experience has been that installations into quite old Python environments are fairly common, and we have generally tried to support the oldest officially supported version of Python at any given time (currently 3.10, with scheduled end-of-life October 2026).

I think there is a strong case to be made that "production service" repos like OWS and Explorer can live a bit closer to the bleeding edge, but I think it needs broader discussion - in the technical subcommittee if not the Steering Council. I'll open a thread on Discord.

@alexgleith

Copy link
Copy Markdown
Contributor

I'm not sure about making code not work on older versions that are supported (currently 3.10 and 3.11), but I think adding features and deprecating these older versions is ok.

Personally, I'm on 3.11, and happy there for now...

According to this, 3.10 is support through to the end of 2026 and 2.11 through 2027.

Can you clarify if this is a hard requirement, or a recommended requirement?

@SpacemanPaul

Copy link
Copy Markdown
Contributor

As discussed on Discord, it appears the upcoming 1.5 release of rasterio may require Python >=3.12.

If this is the case (and especially if rasterio 1.5 finally fixes the rio_slurp bug with GDAL 3.12) then we will probably need to required Python 3.12 for ALL repos, at least from core upwards.

I propose we stick with Python 3.10 until rasterio 1.5 is released and the status of the rio_slurp bug is clear.

Sphinx and various other packages
have started dropping support
for Python 3.10, so require
Python 3.12 and upgrade the source
code to use Python 3.12 features
where possible.

The most noticeable change for OWS
is that the override decorator is
part of typing, and the UTC alias
declared in datetime.
@SpacemanPaul SpacemanPaul merged commit bebc7fe into opendatacube:develop Jun 10, 2026
12 checks passed
@pjonsson pjonsson deleted the require-py312 branch June 10, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants