From 6175fec66a4929557152096a386b259f89844ffb Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Mon, 30 Sep 2024 18:02:19 -0400 Subject: [PATCH] docs: prepare for 0.9.0b6 Signed-off-by: Henry Schreiner --- docs/changelog.md | 36 ++++++++++++++++++++------------- pyproject_metadata/__init__.py | 3 +-- tests/test_standard_metadata.py | 12 ++++++----- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 78fdc88..4380d6b 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -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: @@ -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: @@ -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: @@ -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) diff --git a/pyproject_metadata/__init__.py b/pyproject_metadata/__init__.py index 6743bf8..9f5ff0b 100644 --- a/pyproject_metadata/__init__.py +++ b/pyproject_metadata/__init__.py @@ -42,11 +42,10 @@ import packaging.utils import packaging.version -__version__ = "0.9.0b5" +__version__ = "0.9.0b6" __all__ = [ "ConfigurationError", - "ConfigurationWarning", "License", "RFC822Message", "RFC822Policy", diff --git a/tests/test_standard_metadata.py b/tests/test_standard_metadata.py index 19786f0..bd8fedf 100644 --- a/tests/test_standard_metadata.py +++ b/tests/test_standard_metadata.py @@ -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( @@ -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( @@ -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 ) @@ -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( @@ -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." ),