Skip to content

Commit

Permalink
docs: prepare for 0.9.0b6 (#184)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Oct 1, 2024
1 parent c26b406 commit b80be05
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 21 deletions.
36 changes: 22 additions & 14 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
# Changelog

## 0.9.0 (beta 5: 27-09-2024)
## 0.9.0 (beta 6: 30-09-2024)

Features:
Refactoring:

- Add TypedDict's in new module for typing pyproject.toml dicts
- `all_errors=True` causes `ExceptionGroup`'s to be emitted
- Support METADATA 2.1+ JSON format with new `.as_json()` method
- Move `validate_*` functions into `extras_*` instead
- Use `Dynamic` for the type of `.dynamic`
- Reformat single quotes to double quotes to match packaging
- Produce standard Python repr style in error messages

Internal and CI:
Fixes:

- Require 100% coverage
- Improve locking for just metadata fields

Refactoring:
Docs:

- Spit up over multiple files
- Remove data fetcher, use static types wherever possible
- Include extra badge in readme
- Rework docs, include README and more classes
- Changelog is now in markdown

## 0.9.0 (WIP)

This release adds PEP 639 support (METADATA 2.4), refactors the RFC messages,
and adds a lot of validation (including warnings and opt-in errors). The beta
releases are intended for backend authors to try out the changes before a final
release.
and adds a lot of validation (including warnings and opt-in errors), a way to
produce all validation errors at once, and more. The beta releases are intended
for backend authors to try out the changes before a final release.

Features:

Expand All @@ -31,6 +33,9 @@ Features:
- Validate project name
- Validate entrypoint group names
- Setting a non-dynamic field is an error
- Add TypedDict's in new module for typing pyproject.toml dicts
- `all_errors=True` causes `ExceptionGroup`'s to be emitted
- Support METADATA 2.1+ JSON format with new `.as_json()` method

Fixes:

Expand All @@ -48,7 +53,9 @@ Refactoring:
- Remove indirection accessing `metadata_version`, add `auto_metadata_version`
- Rework how dynamic works, add `dynamic_metadata`
- Use dataclass instead of named tuple
- chore: use named arguments instead of positional
- Use named arguments instead of positional
- Spit up over multiple files
- Remove `DataFetcher`, use static types wherever possible

Internal and CI:

Expand All @@ -62,6 +69,7 @@ Internal and CI:
- Refactor and cleanup tests
- Add human readable IDs to tests
- Fix coverage context
- Require 100% coverage

## 0.8.0 (17-04-2024)

Expand Down
3 changes: 1 addition & 2 deletions pyproject_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@
import packaging.utils
import packaging.version

__version__ = "0.9.0b5"
__version__ = "0.9.0b6"

__all__ = [
"ConfigurationError",
"ConfigurationWarning",
"License",
"RFC822Message",
"RFC822Policy",
Expand Down
12 changes: 7 additions & 5 deletions tests/test_standard_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def test_load(
else:
with warnings.catch_warnings():
warnings.simplefilter(
action="ignore", category=pyproject_metadata.ConfigurationWarning
action="ignore", category=pyproject_metadata.errors.ConfigurationWarning
)
with pytest.raises(pyproject_metadata.errors.ExceptionGroup) as execinfo:
pyproject_metadata.StandardMetadata.from_pyproject(
Expand Down Expand Up @@ -845,7 +845,7 @@ def test_load_multierror(
else:
with warnings.catch_warnings():
warnings.simplefilter(
action="ignore", category=pyproject_metadata.ConfigurationWarning
action="ignore", category=pyproject_metadata.errors.ConfigurationWarning
)
with pytest.raises(pyproject_metadata.errors.ExceptionGroup) as execinfo:
pyproject_metadata.StandardMetadata.from_pyproject(
Expand Down Expand Up @@ -928,7 +928,9 @@ def test_load_with_metadata_version_warnings(
data: str, error: str, metadata_version: str, monkeypatch: pytest.MonkeyPatch
) -> None:
monkeypatch.chdir(DIR / "packages/full-metadata")
with pytest.warns(pyproject_metadata.ConfigurationWarning, match=re.escape(error)):
with pytest.warns(
pyproject_metadata.errors.ConfigurationWarning, match=re.escape(error)
):
pyproject_metadata.StandardMetadata.from_pyproject(
tomllib.loads(textwrap.dedent(data)), metadata_version=metadata_version
)
Expand Down Expand Up @@ -1412,7 +1414,7 @@ def test_modify_dynamic() -> None:

def test_missing_keys_warns() -> None:
with pytest.warns(
pyproject_metadata.ConfigurationWarning,
pyproject_metadata.errors.ConfigurationWarning,
match=re.escape("Extra keys present in 'project': 'not-real-key'"),
):
pyproject_metadata.StandardMetadata.from_pyproject(
Expand Down Expand Up @@ -1473,7 +1475,7 @@ def test_extra_build_system() -> None:

def test_multiline_description_warns() -> None:
with pytest.warns(
pyproject_metadata.ConfigurationWarning,
pyproject_metadata.errors.ConfigurationWarning,
match=re.escape(
"The one-line summary 'project.description' should not contain more than one line. Readers might merge or truncate newlines."
),
Expand Down

0 comments on commit b80be05

Please sign in to comment.