Skip to content

Require Python 3.12#1417

Open
pjonsson wants to merge 1 commit intoopendatacube:developfrom
pjonsson:require-py312
Open

Require Python 3.12#1417
pjonsson wants to merge 1 commit intoopendatacube:developfrom
pjonsson:require-py312

Conversation

@pjonsson
Copy link
Copy Markdown
Contributor

@pjonsson pjonsson commented Dec 29, 2025

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/

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.
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 29, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.79%. Comparing base (f001374) to head (11d4ed8).

Files with missing lines Patch % Lines
datacube_ows/time_utils.py 60.00% 2 Missing ⚠️
datacube_ows/index/postgres/mv_index.py 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1417      +/-   ##
===========================================
- Coverage    92.81%   92.79%   -0.02%     
===========================================
  Files           53       53              
  Lines         7233     7221      -12     
===========================================
- Hits          6713     6701      -12     
  Misses         520      520              
Files with missing lines Coverage Δ
datacube_ows/config_utils.py 96.73% <100.00%> (-0.01%) ⬇️
datacube_ows/index/postgis/api.py 87.12% <100.00%> (-0.10%) ⬇️
datacube_ows/index/postgis/product_ranges.py 86.48% <100.00%> (ø)
datacube_ows/index/postgres/api.py 93.00% <100.00%> (-0.07%) ⬇️
datacube_ows/index/postgres/product_ranges.py 90.10% <100.00%> (ø)
datacube_ows/loading.py 80.97% <100.00%> (-0.08%) ⬇️
datacube_ows/ogc_exceptions.py 98.59% <100.00%> (ø)
datacube_ows/ows_configuration.py 93.53% <100.00%> (-0.01%) ⬇️
datacube_ows/styles/base.py 96.00% <100.00%> (-0.02%) ⬇️
datacube_ows/styles/colormap.py 98.44% <100.00%> (-0.01%) ⬇️
... and 9 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.

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