Skip to content

feat(dependencies): require Python 3.12+ as minimum version#3023

Merged
imstevenpmwork merged 13 commits intomainfrom
feat/py12
Mar 6, 2026
Merged

feat(dependencies): require Python 3.12+ as minimum version#3023
imstevenpmwork merged 13 commits intomainfrom
feat/py12

Conversation

@imstevenpmwork
Copy link
Copy Markdown
Collaborator

@imstevenpmwork imstevenpmwork commented Feb 25, 2026

Type / Scope

  • Type: Dependencies
  • Scope: Several

Summary / Motivation

  • Bumps the minimum Python version from 3.10 to 3.12, enabling use of modern language features and aligning the project with actively supported Python releases.
  • Python 3.10 reaches end-of-life in October 2026 and considering lerobot is a moderately recent project: Adopting 3.12 guarantees the project to be future-proof.
  • In addition, while doing this migration some issues were discovered related to our dependency tree & testing which were solved right away.

Related issues

  • Fixes / Closes: N/A
  • Related: N/A

What changed

  • We use python 3.12 everywhere, which means accommodating for recent PEPs (the big bulk of the src code changes)
  • The dependency tag changes (reorganization, scipy resolver hint, matplotlib-dep extra, libero linux guard) are functional — they resolve pip/uv solver issues that surfaced when dropping Python 3.10 from the constraint matrix.
  • Tests: updated device detection for tests (to avoid failing in mps)
  • 🚨Breaking change: Python < 3.12 is no longer supported. Users must upgrade their Python environment.

How was this tested (or how to run locally)

⚠️The PR testing relied only on CI. No hardware tests were performed, but given the nature of the src code changes, I don't expect any major surprise from a functional perspective.

Checklist (required before merge)

  • Linting/formatting run (pre-commit run -a)
  • All tests pass locally (pytest)
  • Documentation updated
  • CI is green

Reviewer notes

  • N/A

@imstevenpmwork imstevenpmwork self-assigned this Feb 25, 2026
@github-actions github-actions Bot added documentation Improvements or fixes to the project’s docs policies Items related to robot policies dataset Issues regarding data inputs, processing, or datasets CI Issues related to the continuous integration pipeline robots Issues concerning robots HW interfaces processor Issue related to processor github_actions labels Feb 25, 2026
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@imstevenpmwork imstevenpmwork marked this pull request as ready for review March 5, 2026 16:50
@imstevenpmwork imstevenpmwork changed the title feat(dependencies): upgrade to python3.12 feat(dependencies): require Python 3.12+ as minimum version Mar 5, 2026
Comment thread pyproject.toml
Comment thread pyproject.toml
Comment thread pyproject.toml
Comment thread pyproject.toml
Comment thread pyproject.toml
Comment thread src/lerobot/processor/core.py
Comment thread src/lerobot/processor/pipeline.py
@github-actions github-actions Bot added the tests Problems with test coverage, failures, or improvements to testing label Mar 5, 2026
@traversaro
Copy link
Copy Markdown
Contributor

Could it make sense to add the inline comments in the pyproject.toml?

I am a bit on a niche of users that needs to fit tight boundary constraints in existing codebases with a lot of dependencies, and knowing which upper boundary is "true" and which one is due to simplify the life of the pip solver is super-useful info for us.

@imstevenpmwork
Copy link
Copy Markdown
Collaborator Author

@traversaro Thanks for the feedback, I will open another PR for the comments to not block this one for now, but those are really good points, thanks again

@traversaro
Copy link
Copy Markdown
Contributor

@traversaro Thanks for the feedback, I will open another PR for the comments to not block this one for now, but those are really good points, thanks again

Sure, thanks!

@imstevenpmwork imstevenpmwork merged commit e489ba2 into main Mar 6, 2026
21 checks passed
@imstevenpmwork imstevenpmwork deleted the feat/py12 branch March 6, 2026 09:15
LePao1 pushed a commit to LePao1/lerobot that referenced this pull request Mar 7, 2026
…ace#3023)

* feat(dependecies): upgrade to python3.12

* fix(test): processor regex message

* fix(test): processor regex message

* fix(dependecies): resolve all tags in python 3.12

* fix(dependecies): add more hints to faster resolve

* chore(dependecies): remove cli tag huggingface-hub dep

* refactor(policy): update eagle for python3.12

* chore(docs): update policy creation for python 3.12

* chore(test): skip failing tests in macos
@LaurentBerger
Copy link
Copy Markdown

With Linux raspberrypi 6.12.34+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.12.34-1+rpt1~bookworm (2025-06-26) aarch64
python version is Python 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0] on linux
and end support is 2027-10

@imstevenpmwork
Copy link
Copy Markdown
Collaborator Author

@LaurentBerger you can use conda or uv (:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Issues related to the continuous integration pipeline dataset Issues regarding data inputs, processing, or datasets documentation Improvements or fixes to the project’s docs github_actions policies Items related to robot policies processor Issue related to processor robots Issues concerning robots HW interfaces tests Problems with test coverage, failures, or improvements to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants