Skip to content

Commit f8e886c

Browse files
authored
Update Python 3.11 support and release 1.6.9 (#510)
## Summary - Restore Python 3.11 support alongside Python 3.12 in package metadata, lockfile, and CI - Remove the hard `.python-version` pin so the project can be exercised against both supported runtimes - Bump the package version to `1.6.9` and record the change in the changelog ## Testing - `uv sync --locked --all-groups --python 3.11` - `uv sync --locked --all-groups --python 3.12` - `CI=true uv run --locked --no-sync pytest -q -m "not slow" test_unstructured_inference` - `uv build` - `ruff check .` and `ruff format --check .` <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Moderate risk because it expands the supported runtime to Python 3.11 and updates the `uv.lock` resolution, which can change dependency selection and CI behavior across environments. > > **Overview** > Restores Python 3.11 support alongside 3.12 by widening `requires-python` to `>=3.11, <3.13`, updating README messaging, and running `lint`/`test` jobs in CI against a Python 3.11/3.12 matrix. > > Removes the repo’s `.python-version` pin, makes the Docker base image Python version configurable via a `PYTHON_VERSION` build arg, and refreshes `uv.lock` to resolve dependencies for both runtimes (including adding conditional deps needed for 3.11). > > Bumps the package version to `1.6.9` and records the change in `CHANGELOG.md`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 6a422a1. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 7c3f869 commit f8e886c

8 files changed

Lines changed: 454 additions & 31 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ permissions:
1212
jobs:
1313
lint:
1414
runs-on: opensource-linux-8core
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: ["3.11", "3.12"]
1519
steps:
1620
- uses: actions/checkout@v4
1721
- name: Install uv
@@ -21,7 +25,7 @@ jobs:
2125
- name: Set up Python
2226
uses: actions/setup-python@v5
2327
with:
24-
python-version: "3.12"
28+
python-version: ${{ matrix.python-version }}
2529
- name: Install lint dependencies
2630
run: make install-lint
2731
- name: Lint
@@ -37,6 +41,10 @@ jobs:
3741
test:
3842
runs-on: opensource-linux-8core
3943
needs: lint
44+
strategy:
45+
fail-fast: false
46+
matrix:
47+
python-version: ["3.11", "3.12"]
4048
steps:
4149
- uses: actions/checkout@v4
4250
- name: Install uv
@@ -46,7 +54,7 @@ jobs:
4654
- name: Set up Python
4755
uses: actions/setup-python@v5
4856
with:
49-
python-version: "3.12"
57+
python-version: ${{ matrix.python-version }}
5058
- name: Install system dependencies
5159
run: |
5260
sudo apt-get update

.python-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.6.9
2+
3+
### Enhancement
4+
- Restore support for Python 3.11 alongside Python 3.12.
5+
16
## 1.6.8
27

38
### Fix

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# syntax=docker/dockerfile:experimental
2-
FROM python:3.12-slim AS base
2+
ARG PYTHON_VERSION=3.12
3+
FROM python:${PYTHON_VERSION}-slim AS base
34

45
# Set up environment
56
ENV HOME=/home/
@@ -12,7 +13,7 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
1213

1314
FROM base AS deps
1415
# Copy project files needed for dependency resolution
15-
COPY pyproject.toml uv.lock .python-version ./
16+
COPY pyproject.toml uv.lock ./
1617
COPY unstructured_inference/__version__.py unstructured_inference/__version__.py
1718

1819
RUN uv sync --locked --all-groups --no-install-project

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
The `unstructured-inference` repo contains hosted model inference code for layout parsing models.
1414
These models are invoked via API as part of the partitioning bricks in the `unstructured` package.
1515

16-
**Requires Python 3.12+.**
16+
**Requires Python >=3.11, <3.13.**
1717

1818
## Installation
1919

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[project]
22
name = "unstructured_inference"
33
description = "A library for performing inference using trained models."
4-
requires-python = ">=3.12, <3.13"
4+
requires-python = ">=3.11, <3.13"
55
authors = [{name = "Unstructured Technologies", email = "devops@unstructuredai.io"}]
66
classifiers = [
77
"Development Status :: 4 - Beta",
@@ -11,6 +11,7 @@ classifiers = [
1111
"License :: OSI Approved :: Apache Software License",
1212
"Operating System :: OS Independent",
1313
"Programming Language :: Python :: 3",
14+
"Programming Language :: Python :: 3.11",
1415
"Programming Language :: Python :: 3.12",
1516
"Topic :: Scientific/Engineering :: Artificial Intelligence",
1617
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.6.8" # pragma: no cover
1+
__version__ = "1.6.9" # pragma: no cover

uv.lock

Lines changed: 432 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)