Skip to content

chore: lower requires-python to >=3.12 for broader compatibility - #52

Merged
teeler merged 2 commits into
googlecolab:mainfrom
Nwokike:patch-python-312-support
Jun 10, 2026
Merged

teeler merged 2 commits into
googlecolab:mainfrom
Nwokike:patch-python-312-support

Conversation

@Nwokike

@Nwokike Nwokike commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The current requires-python = ">=3.13" constraint is overly restrictive. The codebase uses no Python 3.13-specific features — the highest actual requirement is Python 3.11 (hashlib.file_digest(), datetime.timezone.utc).

Lowering to >=3.12 enables:

  • Use on platforms where Python 3.13 isn't available (e.g., Android via Chaquopy, which supports up to 3.12)
  • Broader CI/CD compatibility
  • Earlier adoption in constrained environments

All existing tests should pass on 3.12. No code changes were needed — the requirement was purely a metadata version pin.

@google-cla

google-cla Bot commented Jun 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@teeler

teeler commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

All existing tests should pass on 3.12

I'd love for you to send me a screenshot or a text snippet that demonstrates this

Also please read this --> https://github.com/googlecolab/google-colab-cli/blob/main/CONTRIBUTING.md

I'm OK with this for the moment considering it's tiny, but if you could run the tests so we can be sure that would convince me.

@Nwokike

Nwokike commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @teeler,
Thank you for taking a look at this. I just read through CONTRIBUTING.md, so I really appreciate you being open to considering this change.
As requested, all tests pass successfully on Python 3.12. You can verify the full GitHub Actions run here:
https://github.com/Nwokike/google-colab-cli/actions/runs/27303211428/job/80654135060
This is the environment snippet from that run:

Run uv run --python 3.12 pytest
  uv run --python 3.12 pytest
  shell: /usr/bin/bash -e {0}
Using CPython 3.12.13 interpreter at: /opt/hostedtoolcache/Python/3.12.13/x64/bin/python3.12
Creating virtual environment at: .venv
   Building google-colab-cli @ file:///home/runner/work/google-colab-cli/google-colab-cli
Installed 57 packages in 33ms
============================= test session starts ==============================
platform linux -- Python 3.12.13, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/runner/work/google-colab-cli/google-colab-cli
configfile: pyproject.toml
plugins: mock-3.15.1, cov-7.0.0
collected 213 items

tests/test_auth.py .....                                                 [  2%]
tests/test_auth_adc.py ........                                          [  6%]
tests/test_automation.py ....                                            [  7%]
tests/test_cli.py ...............................                        [ 22%]
tests/test_cli_log.py ....                                               [ 24%]
tests/test_client.py ......                                              [ 27%]
tests/test_console.py ......                                             [ 30%]
tests/test_contents.py .....                                             [ 32%]
tests/test_exec.py ........                                              [ 36%]
tests/test_history.py ..                                                 [ 37%]
tests/test_ipynb_exec.py ...                                             [ 38%]
tests/test_keep_alive.py .................                               [ 46%]
tests/test_log_export.py .                                               [ 46%]
tests/test_pay.py .                                                      [ 47%]
tests/test_readme.py ....                                                [ 49%]
tests/test_repl.py ...............                                       [ 56%]
tests/test_resolution_logic.py .......                                   [ 59%]
tests/test_run.py ...............                                        [ 66%]
tests/test_runtime.py ........                                           [ 70%]
tests/test_state.py .......                                              [ 73%]
tests/test_streaming.py ..                                               [ 74%]
tests/test_update.py ................................                    [ 89%]
tests/test_url.py ............                                           [ 95%]
tests/test_utils.py ...                                                  [ 96%]
tests/test_version.py ...                                                [ 98%]
tests/test_whoami.py ....                                                [100%]
============================= 213 passed in 5.70s ==============================

@teeler

teeler commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Thanks - will merge after other checks run!

@teeler
teeler merged commit 3e93d1e into googlecolab:main Jun 10, 2026
6 checks passed
@Nwokike
Nwokike deleted the patch-python-312-support branch June 10, 2026 23:07
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.

2 participants