Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Python 3.13 by default #2099

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
go-version-file: go.mod
- uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
- uses: hynek/setup-cached-uv@v2
- name: Prepare tox
run: uv pip install --system tox tox-uv
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
go-version-file: go.mod
- uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13
- uses: hynek/setup-cached-uv@v2
- name: Prepare tox
run: uv pip install --system tox tox-uv
Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
go-version-file: go.mod
- uses: goreleaser/goreleaser-action@v6
with:
version: '~> v2'
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions docs/yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ build:
python_version: "3.11.1"
```

Cog supports all active branches of Python: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. If you don't define a version, Cog will use the latest version of Python 3.12 or a version of Python that is compatible with the versions of PyTorch or TensorFlow you specify.
Cog supports all active branches of Python: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13. If you don't define a version, Cog will use the latest version of Python 3.13 or a version of Python that is compatible with the versions of PyTorch or TensorFlow you specify.

Note that these are the versions supported **in the Docker container**, not your host machine. You can run any version(s) of Python you wish on your host machine.

Expand Down Expand Up @@ -158,7 +158,7 @@ r8.im is Replicate's registry, but this can be any Docker registry.

If you don't set this, then a name will be generated from the directory name.

If you set this, then you can run `cog push` without specifying the model name.
If you set this, then you can run `cog push` without specifying the model name.

If you specify an image name argument when pushing (like `cog push your-username/custom-model-name`), the argument will be used and the value of `image` in cog.yaml will be ignored.

Expand Down
2 changes: 1 addition & 1 deletion pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func DefaultConfig() *Config {
return &Config{
Build: &Build{
GPU: false,
PythonVersion: "3.12",
PythonVersion: "3.13",
},
}
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestValidateModelPythonVersion(t *testing.T) {
}{
{
name: "ValidVersion",
pythonVersion: "3.12",
pythonVersion: "3.13",
},
{
name: "MinimumVersion",
Expand All @@ -39,7 +39,7 @@ func TestValidateModelPythonVersion(t *testing.T) {
},
{
name: "FullyQualifiedVersion",
pythonVersion: "3.12.1",
pythonVersion: "3.13.1",
},
{
name: "InvalidFormat",
Expand Down
2 changes: 1 addition & 1 deletion pkg/dockerfile/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestBaseImageConfigurationExists(t *testing.T) {
}

func TestBaseImageConfigurationExistsNoTorch(t *testing.T) {
exists, _, _, _ := BaseImageConfigurationExists("", "3.12", "")
exists, _, _, _ := BaseImageConfigurationExists("", "3.13", "")
require.True(t, exists)
}

Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ commands =
tests: pytest python/tests --cov={env_site_packages_dir}/cog --cov-report term-missing:skip-covered {posargs:-n auto -vv}

[testenv:lint]
base_python = python3.12
base_python = python3.13
skip_install = true
deps = ruff
commands =
ruff check python/cog
ruff format --check python

[testenv:typecheck-pydantic1]
base_python = python3.12
base_python = python3.13
deps =
pyright==1.1.375
pydantic>=1,<2
Expand All @@ -54,14 +54,14 @@ allowlist_externals =
sed

[testenv:typecheck-pydantic2]
base_python = python3.12
base_python = python3.13
deps =
pyright==1.1.375
pydantic>=2,<3
commands = pyright {posargs}

[testenv:integration]
base_python = python3.12
base_python = python3.13
changedir = test-integration
skip_install = true
deps =
Expand Down
Loading