Skip to content

Require Python 3.12+#18

Merged
janhoy merged 9 commits into
apache:mainfrom
janhoy:require-python-3.12
May 23, 2026
Merged

Require Python 3.12+#18
janhoy merged 9 commits into
apache:mainfrom
janhoy:require-python-3.12

Conversation

@janhoy
Copy link
Copy Markdown
Contributor

@janhoy janhoy commented May 23, 2026

Summary

  • Bumps minimum supported Python from 3.10 to 3.12 in setup.py, check_python_version(), and tox.ini

Closes #17

Background

Python 3.10/3.11 hang indefinitely (~200% CPU) during corpus downloads on macOS 15 (Darwin 25.4.0). Root cause is a CPython bug where os.stat() on files with high-precision nanosecond timestamps triggers infinite recursion:

os.stat() → fill_time() → PyNumber_Multiply → k_mul → _PyErr_CheckSignalsTstate
          → (signal handler) → os.stat() → ...

Python 3.12 does not have this issue. Discovered by profiling the hung benchmark process with sample.

Test plan

  • Install Python 3.12 via pyenv and confirm pip install -e .[develop] succeeds
  • Run python3 -m pytest tests/ — all tests pass
  • Run a benchmark with docker pipeline + test-mode on a fresh data directory — completes without hanging

janhoy added 2 commits May 24, 2026 00:34
Python 3.10 and 3.11 have a bug on macOS 15+ where os.stat() on files
with high-precision nanosecond timestamps triggers infinite recursion:
fill_time() → PyNumber_Multiply → k_mul → _PyErr_CheckSignalsTstate
→ signal handler → os_stat() again. This causes corpus downloads to
hang indefinitely at ~200% CPU.

- Bump minimum supported version from 3.10 to 3.12 in setup.py
- Update runtime check in check_python_version()
- Drop py310 and py311 from tox envlist
- Document the macOS 15 incompatibility in DEVELOPER_GUIDE.md

This comment was marked as resolved.

janhoy and others added 4 commits May 24, 2026 00:41
- Remove PY310/PY311 from .ci/variables.json and bump MIN_PY_VER to 3.12.11
- Rename pyinst310/VERSION310 → pyinst312/VERSION312 in Makefile
- Drop it310/it311 make targets; update develop target to use pyinst312
Update Python version references in quickstart.md, installing.md, and
AGENTS.md to consistently state 3.12+ instead of 3.10+.

This comment was marked as resolved.

janhoy and others added 3 commits May 24, 2026 00:54
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
pylint==2.9.0 uses inspect.formatargspec which was removed in Python
3.11+, causing ImportError on Python 3.12. Upgrade to pylint==3.3.9.

pylint-quotes==0.2.1 uses removed IAstroidChecker/ITokenChecker interfaces
from pylint and is incompatible with pylint 3.x; drop it along with the
--load-plugins flag and the pylint-quotes section in .pylintrc.

Disable new pylint 3.x checks (too-many-positional-arguments, cyclic-import,
possibly-used-before-assignment, consider-using-min/max-builtin, use-yield-from)
to avoid failing on pre-existing code patterns not covered by the old linter.

Also fix overgeneral-exceptions config to use fully-qualified builtins names
as required by pylint 3.x, and update PYTHON_SUPPORT_GUIDE.md examples to
reference pyinst312/VERSION312 instead of the old pyinst310/VERSION310.
The docker-compose.yml.j2 template uses /solr/admin/info/system but the
test expectations still referenced /solr/admin/ping, causing 2 CI failures.
@janhoy janhoy merged commit 63e1eb5 into apache:main May 23, 2026
3 checks passed
@janhoy janhoy deleted the require-python-3.12 branch May 23, 2026 23:38
janhoy added a commit to janhoy/solr-orbit that referenced this pull request May 23, 2026
PR apache#18 bumped the minimum Python version to >=3.12 but the Dockerfile
was still using python:3.11.2-slim, causing the Docker build to fail.
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.

Require Python 3.12+ (Python 3.10/3.11 hang on macOS 15 during corpus download)

2 participants