Repository: pypa/build
Pull request #411 (2021-12-06 18:29:13)

pre-commit: bump repositories
updates:
- [github.com/psf/black: 21.11b1 → 21.12b0](https://github.com/psf/black/compare/21.11b1...21.12b0)



Patch:
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index e367003..9f5883c 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -4,7 +4,7 @@ ci:
 
 repos:
 - repo: https://github.com/pre-commit/pre-commit-hooks
-  rev: v4.0.1
+  rev: v4.1.0
   hooks:
   - id: check-ast
   - id: check-builtin-literals
@@ -18,12 +18,12 @@ repos:
   - id: trailing-whitespace
   - id: double-quote-string-fixer
 - repo: https://github.com/asottile/pyupgrade
-  rev: v2.29.1
+  rev: v2.31.0
   hooks:
   - id: pyupgrade
     args: ["--py36-plus"]
 - repo: https://github.com/psf/black
-  rev: 21.11b1
+  rev: 21.12b0
   hooks:
   - id: black
 - repo: https://github.com/PyCQA/isort
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index df1b447..be92d0b 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -29,7 +29,7 @@ Unreleased
 0.6.0.post1 (05-08-2021)
 ========================
 
-- Fix compability with Python 3.6 and 3.7 (`PR #339`_, Fixes `#338`_)
+- Fix compatibility with Python 3.6 and 3.7 (`PR #339`_, Fixes `#338`_)
 
 .. _PR #339: https://github.com/pypa/build/pull/339
 .. _#338: https://github.com/pypa/build/issues/338
@@ -40,7 +40,7 @@ Unreleased
 ==================
 
 - Improved output (`PR #333`_, Fixes `#142`_)
-- The CLI now honnors `NO_COLOR`_ (`PR #333`_)
+- The CLI now honors `NO_COLOR`_ (`PR #333`_)
 - The CLI can now be forced to colorize the output by setting the ``FORCE_COLOR`` environment variable (`PR #335`_)
 - Added logging to ``build`` and ``build.env`` (`PR #333`_)
 - Switch to a TOML v1 compliant parser (`PR #336`_, Fixes `#308`_)
@@ -126,7 +126,7 @@ Breaking Changes
 ----------------
 
 - As a side-effect of `PR #260`_, projects not containing either a ``pyproject.toml`` or ``setup.py`` will be reported as invalid. This affects projects specifying only a ``setup.cfg``, such projects are recommended to add a ``pyproject.toml``. The new behavior is on par with what pip currently does, so if you are affected by this, your project should not be pip installable.
-- The ``--skip-depencencies`` option has been renamed to ``--skip-dependency-check`` (`PR #297`_)
+- The ``--skip-dependencies`` option has been renamed to ``--skip-dependency-check`` (`PR #297`_)
 - The ``skip_dependencies`` argument of ``build.__main__.build_package`` has been renamed to ``skip_dependency_check`` (`PR #297`_)
 - ``build.ConfigSettings`` has been renamed to ``build.ConfigSettingsType`` (`PR #298`_)
 - ``build.ProjectBuilder.build_dependencies`` to ``build.ProjectBuilder.build_system_requires`` (`PR #284`_, Fixes `#182`_)
@@ -229,7 +229,7 @@ Breaking changes
 - Added --version/-V option to the CLI
 - Added support for Python 3.9
 - Added py.typed marker
-- Various miscelaneous fixes in the virtual environment creation
+- Various miscellaneous fixes in the virtual environment creation
 - Many general improvements in the documentation
 - Documentation moved to the furo theme
 - Updated the CoC to the PSF CoC, which PyPA has adopted
diff --git a/docs/installation.rst b/docs/installation.rst
index 81ef2ac..e098c61 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -18,7 +18,7 @@ of the following keys:
 
 .. tip::
    If you prefer, or are already using virtualenv_ in your workflow, you can
-   install ``build`` with the optional ``virtualenv`` depedency:
+   install ``build`` with the optional ``virtualenv`` dependency:
 
    .. code-block:: sh
 
diff --git a/src/build/env.py b/src/build/env.py
index e6d22b5..80c42d8 100644
--- a/src/build/env.py
+++ b/src/build/env.py
@@ -92,7 +92,12 @@ class IsolatedEnvBuilder:
 
         :return: The isolated build environment
         """
-        self._path = tempfile.mkdtemp(prefix='build-env-')
+        # Call ``realpath`` to prevent spurious warning from being emitted
+        # that the venv location has changed on Windows. The username is
+        # DOS-encoded in the output of tempfile - the location is the same
+        # but the representation of it is different, which confuses venv.
+        # Ref: https://bugs.python.org/issue46171
+        self._path = os.path.realpath(tempfile.mkdtemp(prefix='build-env-'))
         try:
             # use virtualenv when available (as it's faster than venv)
             if _should_use_virtualenv():
diff --git a/src/build/util.py b/src/build/util.py
index f8231ca..be93eee 100644
--- a/src/build/util.py
+++ b/src/build/util.py
@@ -31,11 +31,11 @@ def project_wheel_metadata(
     """
     Return the wheel metadata for a project.
 
-    Uses the ``prepare_metadata_for_build_wheel`` hook if availablable,
+    Uses the ``prepare_metadata_for_build_wheel`` hook if available,
     otherwise ``build_wheel``.
 
     :param srcdir: Project source directory
-    :param isolated: Wether or not to run invoke the backend in the current
+    :param isolated: Whether or not to run invoke the backend in the current
                      environment or to create an isolated one and invoke it
                      there.
     """
diff --git a/tox.ini b/tox.ini
index c51c3bc..f5a11d2 100644
--- a/tox.ini
+++ b/tox.ini
@@ -28,9 +28,6 @@ setenv =
     wheel: TEST_MODE = wheel
 extras =
     test
-;TODO Remove once https://github.com/pytest-dev/py/issues/273 released.
-deps =
-     py@git+https://github.com/pytest-dev/py@master;python_version>="3.11"
 commands =
     pytest -rsx --cov --cov-config pyproject.toml \
       --cov-report=html:{envdir}/htmlcov --cov-context=test \
@@ -77,8 +74,6 @@ description = generate a DEV environment
 usedevelop = true
 deps =
     virtualenv>=20.0.34
-;TODO Remove once https://github.com/pytest-dev/py/issues/273 released.
-     py@git+https://github.com/pytest-dev/py@master;python_version>="3.11"
 
 extras =
     doc


Test patch:
diff --git a/tests/test_env.py b/tests/test_env.py
index 9b5506f..831d725 100644
--- a/tests/test_env.py
+++ b/tests/test_env.py
@@ -112,7 +112,7 @@ def test_isolated_env_log(mocker, caplog, package_test_flit):
         ('INFO', 'Installing packages in isolated environment... (something)'),
     ]
     if sys.version_info >= (3, 8):  # stacklevel
-        assert [(record.lineno) for record in caplog.records] == [105, 102, 193]
+        assert [(record.lineno) for record in caplog.records] == [105, 107, 198]
 
 
 @pytest.mark.isolated