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.12 in pipelines #7803

Merged
merged 2 commits into from
Sep 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Python 3.12 in pipelines
  • Loading branch information
dimbleby authored and radoering committed Sep 17, 2023
commit 95dd8d31314a5a123a0cc906c0125030b0500df2
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
strategy:
matrix:
os: [Ubuntu, macOS, Windows]
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12-dev"]
include:
- os: Ubuntu
image: ubuntu-22.04
Expand Down Expand Up @@ -117,7 +117,8 @@ jobs:
ref: refs/tags/${{ steps.poetry-plugin-export-version.outputs.version }}

- name: Run pytest (poetry-plugin-export)
run: poetry run pytest -v poetry-plugin-export/tests/
working-directory: ./poetry-plugin-export
run: poetry run -C .. pytest -v

- name: Check for clean working tree
run: |
Expand Down
6 changes: 6 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,12 @@ If set to `true` the `--no-setuptools` parameter is passed to `virtualenv` on cr
means when a new virtual environment is created, `setuptools` will not be installed in the environment. Poetry, for its
internal operations, does not require `setuptools` and this can safely be set to `true`.

For environments using python 3.12 or later, `virtualenv` defaults to not
installing `setuptools` when creating a virtual environment.
In such environments this poetry configuration option therefore has no effect:
`setuptools` is not installed either way.
If your project relies on `setuptools`, you should declare it as a dependency.

{{% warning %}}
Some development tools like IDEs, make an assumption that `setuptools` (and other) packages are always present and
available within a virtual environment. This can cause some features in these tools to not work as expected.
Expand Down
2 changes: 1 addition & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ tomli = { version = "^2.0.1", python = "<3.11" }
tomlkit = ">=0.11.4,<1.0.0"
# trove-classifiers uses calver, so version is unclamped
trove-classifiers = ">=2022.5.19"
virtualenv = "^20.22.0"
virtualenv = "^20.23.0"
xattr = { version = "^0.10.0", markers = "sys_platform == 'darwin'" }

[tool.poetry.group.dev.dependencies]
Expand Down
8 changes: 8 additions & 0 deletions tests/utils/test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -1513,6 +1513,14 @@ def test_env_no_pip(
if package.name != "sqlite3"
}

# For python >= 3.12, virtualenv defaults to "--no-setuptools" and "--no-wheel"
# behaviour, so setting these values to False becomes meaningless.
if sys.version_info >= (3, 12):
if not flags.get("no-setuptools", True):
packages.discard("setuptools")
if not flags.get("no-wheel", True):
packages.discard("wheel")

assert installed_packages == packages


Expand Down