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

ci: move to final release of 3.11 #527

Merged
merged 5 commits into from Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Expand Up @@ -36,7 +36,7 @@ jobs:
- "pypy-3.7"
- "pypy-3.8"
- "pypy-3.9"
- "3.11-dev"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
Expand All @@ -45,9 +45,6 @@ jobs:
tox-target:
- "tox"
- "min"
exclude:
- { py: "3.11-dev", os: macos }
- { py: "3.11-dev", os: windows }

steps:
- uses: actions/checkout@v3
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -6,10 +6,28 @@ Changelog
Unreleased
==========

- Hide a Python 3.11.0 unavoidable warning with venv (`PR #527`_)

- Fix infinite recursion error in ``check_dependency`` with circular
dependencies (`PR #512`_, Fixes `#511`_)

- Only import colorama on Windows (`PR #494`_, Fixes `#493`_)

- Flush output more often to reduce interleaved output (`PR #494`_)

- Small API cleanup, like better ``__all__`` and srcdir being read only. (`PR #477`_)

- Only use ``importlib_metadata`` when needed (`PR #401`_)

- Clarify in printout when build dependencies are being installed (`PR #514`_)

.. _PR #401: https://github.com/pypa/build/pull/401
.. _PR #477: https://github.com/pypa/build/pull/477
.. _PR #494: https://github.com/pypa/build/pull/494
.. _PR #512: https://github.com/pypa/build/pull/512
.. _PR #514: https://github.com/pypa/build/pull/514
.. _PR #527: https://github.com/pypa/build/pull/527
.. _#493: https://github.com/pypa/build/issues/493
.. _#511: https://github.com/pypa/build/issues/511


Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Expand Up @@ -39,6 +39,7 @@ markers = [
filterwarnings = [
"error",
"ignore:path is deprecated.:DeprecationWarning",
"ignore:The --rsyncdir command line argument and rsyncdirs config variable are deprecated.:DeprecationWarning",
]

[tool.mypy]
Expand Down
6 changes: 5 additions & 1 deletion src/build/env.py
Expand Up @@ -11,6 +11,7 @@
import sys
import sysconfig
import tempfile
import warnings

from types import TracebackType
from typing import Callable, Collection, List, Optional, Tuple, Type
Expand Down Expand Up @@ -262,7 +263,10 @@ def _create_isolated_env_venv(path: str) -> Tuple[str, str]:

symlinks = _fs_supports_symlink()
try:
venv.EnvBuilder(with_pip=True, symlinks=symlinks).create(path)
with warnings.catch_warnings():
if sys.version_info[:3] == (3, 11, 0):
warnings.filterwarnings('ignore', 'check_home argument is deprecated and ignored.', DeprecationWarning)
venv.EnvBuilder(with_pip=True, symlinks=symlinks).create(path)
except subprocess.CalledProcessError as exc:
raise build.FailedProcessError(exc, 'Failed to create venv. Maybe try installing virtualenv.') from None

Expand Down
4 changes: 2 additions & 2 deletions tests/test_env.py
Expand Up @@ -119,8 +119,8 @@ def test_isolated_env_log(mocker, caplog, package_test_flit):
if sys.version_info >= (3, 8): # stacklevel
assert [(record.lineno) for record in caplog.records] == [
frameinfo.lineno + 1,
frameinfo.lineno - 7,
frameinfo.lineno + 84,
frameinfo.lineno - 6,
frameinfo.lineno + 85,
]


Expand Down
3 changes: 2 additions & 1 deletion tests/test_projectbuilder.py
Expand Up @@ -576,6 +576,7 @@ def mock_tomli_not_available(mocker):
importlib.reload(build)


@pytest.mark.skipif(sys.version_info >= (3, 11), reason='No need to test old toml support on 3.11+')
def test_toml_instead_of_tomli(mocker, mock_tomli_not_available, tmp_dir, package_test_flit):
mocker.patch('pep517.wrappers.Pep517HookCaller', autospec=True)

Expand Down Expand Up @@ -609,7 +610,7 @@ def test_log(mocker, caplog, package_test_flit):
('INFO', 'something'),
]
if sys.version_info >= (3, 8): # stacklevel
assert caplog.records[-1].lineno == 601
assert caplog.records[-1].lineno == 602


@pytest.mark.parametrize(
Expand Down