Repository navigation
chore: Prepare the 0.7.0 release - #197
Merged
Merged
Conversation
- Set `version` to 0.7.0: `[Unreleased]` has Added, Changed and Removed, so it's a minor version. - Relock with the latest uv; only clientx's own version changes. - Date the changelog's `[Unreleased]` section as `[0.7.0] - 2026-12-02` and add its compare link.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prepares the 0.7.0 release, opened by
make release-pr:[Unreleased]has Added, Changed and Removed, so it's a minor version.Changes
versioninpyproject.tomlgoes from0.6.1to0.7.0.uv.lockchanges only clientx's own version. It was locked with the latest uv, so its revision stays the same.## [Unreleased]inCHANGELOG.mdbecomes## [0.7.0] - 2026-12-02, with a new, empty## [Unreleased]above it, and the link references comparev0.7.0. If you merge on a later day, change the date to match.What's in 0.7.0
Added
Annotated[Point, PlainSerializer(str, return_type=str), Query()]. ClientX checks what a type dumps to, from pydantic's serialization schema, so a type of your own that dumps to text or a number can go in the query string, a header or a form. It used to raiseDefinitionError. A type whose dumped form pydantic can't tell, such as a class of your own without a serializer, still raises.default_factoryworks, with= Noneafter it so type checkers see the argument as optional:tags: Annotated[list[str] | None, Json(default_factory=list)] = Nonesends[]when the caller leaves it out. Adefaultinside a helper still raises: put it after=.exclude_ifon a helper leaves a value out of the request, as inJson(exclude_if=lambda value: value is None).Changed
Query(ge=1), apply to every call, and an argument that doesn't fit raisesArgumentError, with pydantic'sValidationErroras its cause, before anything is sent. A helper'sstrict=True, as inQuery(strict=True), makes one parameter strict. Defaults aren't validated. Breaking:ArgumentError. For example, astrfor aSequence[str]parameter fails, as pydantic doesn't take a string as a sequence: annotate itstr | Sequence[str]to take both.3for afloatparameter is sent as3.0.SerializeAsAny[Model]to send them.dictpassed for a model is validated into the model, as the model reads one: by alias, and keys the model doesn't have are dropped. It used to be sent as it was. Setvalidate_by_name=Trueorextra="allow"in the model'smodel_configto take field names or keep other keys.File()orBody()parameter whose type holds a binary file, a stream orAny, such asBinaryIO,tuple[str, BinaryIO]orIterator[bytes], needs pydantic'sSkipValidationin its annotation, as inAnnotated[BinaryIO, File(), SkipValidation]: pydantic can't validate a file or stream, so its value is passed on as it is, and the annotation says so.str,bytes, and file tuples and lists of them, such astuple[str, bytes, str], are validated and need none. Breaking: one without it raisesDefinitionErrorwhen the class is defined. AddSkipValidation.model_config, a name starting with_, or the name of a pydanticBaseModelattribute, such asjson, as each call's arguments are validated with a pydantic model of them. Breaking: one of those names raisesDefinitionErrorwhen the class is defined. Rename the parameter, and give its helperalias=to send the old name.SecretStr,SecretBytesorSecret[...], raisesDefinitionErrorwhen the class is defined. Pydantic dumps one as**********, so the API got the stars: aJson()secret used to be sent that way without a word. Breaking: pass credentials with the client'sauth=, or annotate the parameterstrto send the value.Sendoption on a helper it doesn't apply to, such asembedon aQuery(), is ignored, as pydantic ignores metadata it doesn't use. It used to raiseDefinitionError.@toolmethod's with one of its own. An argument the method doesn't have is reported asExtra inputs are not permitted, rather thanUnexpected keyword argument. Breaking: a@toolmethod's parameter can't be namedmodel_config, start with_, or have the name of aBaseModelattribute, such asjson, as for an endpoint: one raisesDefinitionErrorwhen the method is decorated. Rename it.Removed
validate_arguments=TrueonClientXandAsyncClientX: every call is validated now. Breaking: passing it raises aTypeError. Leave it out.Send'sexclude_unset,exclude_noneandexclude_defaults.Sendkeepsembedandjson_part. Breaking: an endpoint that sets one raises aTypeErrorwhen its module is imported. A model's own fields are dumped as the model defines them, and pydantic'sexclude_ifon the helper leaves out a value, as inJson(exclude_if=lambda value: value is None). A parameter with a default ofNoneis still left out when the caller doesn't pass it.After merging
Publish the draft release
v0.7.0, on GitHub or withgh release edit v0.7.0 --draft=false, right after merging: it tagsv0.7.0onmainline. The Release workflow checks that the tag matches the project version, builds and smoke-tests the package, publishes it to TestPyPI, and waits for your approval on thepypienvironment before it publishes to PyPI.If you change the changelog here, update the draft's notes before publishing:
uv run python scripts/release.py notes 0.7.0 | gh release edit v0.7.0 --notes-file -.