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

Python 3.11 #12256

Merged
merged 14 commits into from
Apr 17, 2023
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
fail-fast: false
matrix:
default-channel: ['defaults', 'conda-forge']
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11']
conda-subdir: ['win-64']
test-type: ['unit', 'integration']
test-group: ['1', '2', '3']
Expand All @@ -73,7 +73,7 @@ jobs:
- default-channel: 'conda-forge'
python-version: '3.8'
- default-channel: 'conda-forge'
python-version: '3.10'
python-version: '3.11'
env:
OS: Windows
PYTHON: ${{ matrix.python-version }}
Expand Down Expand Up @@ -173,7 +173,7 @@ jobs:
fail-fast: false
matrix:
default-channel: ['defaults', 'conda-forge']
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.8', '3.9', '3.10', '3.11']
test-type: ['unit', 'integration']
test-group: ['1', '2', '3']
exclude:
Expand Down Expand Up @@ -235,7 +235,7 @@ jobs:
fail-fast: false
matrix:
default-channel: ['defaults', 'conda-forge']
python-version: ['3.10']
python-version: ['3.11']
platform: ['arm64', 'ppc64le']
env:
OS: linux-${{ matrix.platform }}
Expand Down
2 changes: 1 addition & 1 deletion conda/cli/conda_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ def configure_parser_install(sub_parsers):

Install a specific version of 'python' into an environment, myenv::

conda install -p path/to/myenv python=3.10
conda install -p path/to/myenv python=3.11

"""
)
Expand Down
12 changes: 6 additions & 6 deletions docs/source/dev-guide/development-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@
By default, it will use Miniconda-based, Python 3.9 installation configured for
the `defaults` channel. You can customize this with two environment variables:

- `CONDA_DOCKER_PYTHON`: `major.minor` value; e.g. `3.10`.
- `CONDA_DOCKER_PYTHON`: `major.minor` value; e.g. `3.11`.
- `CONDA_DOCKER_DEFAULT_CHANNEL`: either `defaults` or `conda-forge`

For example, if you need a conda-forge based 3.10 image:
For example, if you need a conda-forge based 3.11 image:

**Bash (macOS, Linux, Windows)**

```bash
$ CONDA_DOCKER_PYTHON=3.10 CONDA_DOCKER_DEFAULT_CHANNEL=conda-forge docker compose build --no-cache
$ CONDA_DOCKER_PYTHON=3.11 CONDA_DOCKER_DEFAULT_CHANNEL=conda-forge docker compose build --no-cache
# --- in some systems you might also need to re-supply the same values as CLI flags:
# CONDA_DOCKER_PYTHON=3.10 CONDA_DOCKER_DEFAULT_CHANNEL=conda-forge docker compose build --no-cache --build-arg python_version=3.10 --build-arg default_channel=conda-forge
$ CONDA_DOCKER_PYTHON=3.10 CONDA_DOCKER_DEFAULT_CHANNEL=conda-forge docker compose run interactive
# CONDA_DOCKER_PYTHON=3.11 CONDA_DOCKER_DEFAULT_CHANNEL=conda-forge docker compose build --no-cache --build-arg python_version=3.11 --build-arg default_channel=conda-forge
$ CONDA_DOCKER_PYTHON=3.11 CONDA_DOCKER_DEFAULT_CHANNEL=conda-forge docker compose run interactive
```

**cmd.exe (Windows)**

```batch
> set CONDA_DOCKER_PYTHON=3.10
> set CONDA_DOCKER_PYTHON=3.11
> set CONDA_DOCKER_DEFAULT_CHANNEL=conda-forge
> docker compose build --no-cache
> docker compose run interactive
Expand Down
3 changes: 1 addition & 2 deletions docs/source/user-guide/tasks/manage-python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ Managing Python
Conda treats Python the same as any other package, so it is easy
to manage and update multiple installations.

Anaconda supports Python 3.7, 3.8, 3.9 and 3.10. The current default is
Python 3.9.
Conda supports Python 3.8, 3.9, 3.10, and 3.11.

Viewing a list of available Python versions
===========================================
Expand Down
3 changes: 2 additions & 1 deletion docs/source/user-guide/tasks/use-conda-with-travis-ci.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The .travis.yml file

The following code sample shows how to modify the ``.travis.yml``
file to use `Miniconda <https://conda.io/miniconda.html>`_ for a
project that supports Python 3.7, 3.8, 3.9 and 3.10:
project that supports Python 3.7, 3.8, 3.9, 3.10, and 3.11:
Copy link
Contributor

@beeankha beeankha Apr 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we wanna remove 3.7 from this list, or do we indeed include 3.7 with Travis CI?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if we should just remove this page instead since we no longer use Travis CI: #12602

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good callout @beeankha! We should just remove the file, as we don't support Travis CI anymore and shouldn't advertise it either. This can happen in the other PR though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way let's resolve this particular concern in #12602


.. code-block:: yaml

Expand All @@ -37,6 +37,7 @@ project that supports Python 3.7, 3.8, 3.9 and 3.10:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
install:
# We do this conditionally because it saves us some downloading if the
# version is the same.
Expand Down
19 changes: 19 additions & 0 deletions news/12256-python-3.11
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Enhancements

* Add Python 3.11 support. (#12256)

### Bug fixes

* <news item>

### Deprecations

* <news item>

### Docs

* <news item>

### Other

* <news item>
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ classifiers = [
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy"
]
Expand Down Expand Up @@ -64,7 +65,7 @@ include = ["conda", "conda_env"]
version-file = "conda/__version__.py"

[tool.black]
target-version = ['py38', 'py39', 'py310']
target-version = ['py38', 'py39', 'py310', 'py311']

[tool.isort]
profile = "black"
Expand Down
1 change: 1 addition & 0 deletions recipe/conda_build_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ python:
- 3.8
- 3.9
- 3.10
- 3.11
4 changes: 1 addition & 3 deletions tests/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,9 +1036,7 @@ def test_create_no_deps_flag(self):
assert not package_is_installed(prefix, "itsdangerous")

def test_create_only_deps_flag(self):
with make_temp_env(
"python=2", "flask", "--only-deps", no_capture=True
) as prefix:
with make_temp_env("python", "flask", "--only-deps", no_capture=True) as prefix:
assert not package_is_installed(prefix, "flask")
assert package_is_installed(prefix, "python")
if not on_win:
Expand Down