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

env: refactor IsolatedEnv #361

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1ed2ab2
build: add `BuildSystemTableValidationError` to module exports
layday Oct 24, 2021
068d0b8
multi: use same `__all__` style and placement in all modules
layday Oct 24, 2021
36404b4
main: remove redundant re-export
layday Oct 29, 2021
2deb0b4
multi: refactor isolated env
layday Oct 29, 2021
1708515
env: cache min pip version
layday Nov 2, 2021
74c88e7
multi: use module names for loggers
layday Oct 29, 2021
e05bce2
build: reword docstrings for clarity and style
layday Oct 24, 2021
a44cec7
build: factor out parsing `pyproject.toml` and source dir
layday Oct 29, 2021
c0c6e61
tests: adapt tests for new env interface
layday Oct 24, 2021
f7d974b
build: convert runner callback to protocol for better typing
layday Oct 28, 2021
e21a372
multi: move type aliases and `check_dependency` to new module to avoi…
layday Oct 29, 2021
96e3abe
multi: add distribution types
layday Oct 29, 2021
4f64bbb
ci: fix typo
layday Oct 25, 2021
de01a9d
docs: don't evaluate parameter defaults
layday Oct 25, 2021
f86843c
docs: document `RunnerCallback`'s `__call__` method
layday Oct 25, 2021
7032c44
docs: remove API doc blurb
layday Oct 25, 2021
ad3bcc5
build: remove superfluous type aliases
layday Oct 29, 2021
011ea0b
build: make srcdir read-only
layday Oct 28, 2021
9ee527b
multi: allow using alternative runners in isolated env
layday Nov 6, 2021
c5b1f0e
util: mute subprocess output in isolated env
layday Oct 29, 2021
1035b5d
main: consistently print errors to stderr
layday Oct 29, 2021
1e450ab
tests: add `from_isolated_env` constructor test
layday Oct 29, 2021
8f0c75a
tests: placate flake8
layday Oct 29, 2021
b628b0a
util: specify `type: ignore` class
layday Oct 29, 2021
185fabb
docs: show items in the order they are defined
layday Oct 30, 2021
e91856c
env: use `cache` from stdlib in 3.9 and above
layday Oct 30, 2021
d5a755c
coverage: add `TYPE_CHECKING` to excludes
layday Nov 3, 2021
5819af2
env: make `prepare_environ` return type `None`-able
layday Nov 6, 2021
fc1b0e4
util: correct typos in docstring
layday Nov 6, 2021
c6d08d4
tests: combine implicitly concatenated strings on the same line
layday Nov 6, 2021
4387267
env: allow passing custom envs to `IsolatedEnvManager`
layday Nov 12, 2021
cdc72e0
tests: remove isolated env abstractness checks
layday Nov 12, 2021
318270e
tests: make linenos relative to function emitting warning
layday Nov 13, 2021
292ee5f
env: replace deprecated `abc.abstractproperty`
layday Nov 15, 2021
55a3c15
multi: separate compatibility helpers
layday Nov 15, 2021
b6a7994
compat: add `importlib-metadata`
layday Nov 15, 2021
134d271
main: lint
layday Nov 15, 2021
d51a1ea
env: convert `IsolatedEnv` to protocol
layday Nov 15, 2021
251fce7
multi: merge manager into isolated env, split up runner param
layday Nov 15, 2021
b8fabdc
changelog: add isolated env redesign entry
layday Nov 20, 2021
f83312a
docs: bump Python to 3.10
layday Nov 20, 2021
631a8d4
compat: make `typing-extensions` an optional dependency once more
layday Jan 7, 2022
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
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Expand Up @@ -29,5 +29,5 @@ jobs:
- name: Setup run environment
run: tox -vv --notest -e docs

- name: Run check for type
- name: Run check for docs
run: tox -e docs --skip-pkg-install
6 changes: 5 additions & 1 deletion .readthedocs.yml
@@ -1,7 +1,11 @@
version: 2

build:
os: ubuntu-20.04
tools:
python: '3.10'

python:
version: 3.8
install:
- method: pip
path: .
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.rst
Expand Up @@ -12,6 +12,19 @@ Unreleased
- Add schema validation for ``build-system`` table to check conformity
with PEP 517 and PEP 518 (`PR #365`_, Fixes `#364`_)

Breaking changes
----------------

- The isolated environment interface was redesigned (`PR #361`_)

- ``IsolatedEnvBuilder`` removed and its functionality taken over by
``DefaultIsolatedEnv.with_temp_dir``
- ``ProjectBuiler.from_isolated_env`` added to initialise a builder from
an isolated environment
- ``RunnerType`` callback signature changed to allow modifying the
``os.environ`` wholesale

.. _PR #361: https://github.com/pypa/build/pull/361
.. _PR #365: https://github.com/pypa/build/pull/365
.. _PR #392: https://github.com/pypa/build/pull/392
.. _#364: https://github.com/pypa/build/issues/364
Expand Down
3 changes: 1 addition & 2 deletions docs/api.rst
@@ -1,15 +1,14 @@
API Documentation
=================

This project exposes 2 modules:

``build`` module
----------------

.. automodule:: build
:members:
:undoc-members:
:show-inheritance:
:special-members: __call__

``build.env`` module
--------------------
Expand Down
2 changes: 2 additions & 0 deletions docs/conf.py
Expand Up @@ -65,3 +65,5 @@
# html_static_path = ['_static']

autoclass_content = 'both'
autodoc_member_order = 'bysource'
autodoc_preserve_defaults = True
2 changes: 2 additions & 0 deletions pyproject.toml
Expand Up @@ -12,6 +12,8 @@ source = [
exclude_lines = [
'\#\s*pragma: no cover',
'^\s*raise NotImplementedError\b',
"if TYPE_CHECKING:",
"@overload",
]

[tool.coverage.paths]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -64,7 +64,7 @@ test =
typing =
importlib-metadata>=4.6.4
mypy==0.910
typing-extensions>=3.7.4.3
typing-extensions>=3.8;python_version < "3.8"
virtualenv =
virtualenv>=20.0.35

Expand Down