Repository navigation
Add Apache 2.0 license headers and related scripts to the repository - #44
Merged
Merged
Conversation
plamen-neykov
approved these changes
Oct 11, 2026
…ap handler pydantic 2.12 made the SerializerFunctionWrapHandler strict about its call signature — it only accepts the value to serialize, not a trailing SerializationInfo. Calling serializer(self, info) now raises: PydanticSerializationError: 'index_key' is expected to be an integer or a string, got 'SerializationInfo(...)' Drop the info argument from the handler call; info remains available on the outer function for any callers that need it.
dschwartznyc
force-pushed
the
feat-add-licensing
branch
from
October 12, 2026 14:29
bd71074 to
c6e2847
Compare
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.
Summary
Copyright (c) 2023-2026 CLOUDRISK Limited and FT Advisory LLC / SPDX-License-Identifier: Apache-2.0header to every.py,.yml,.sh, and.tomlfile in the repository, and puts tooling in place to keep it enforced going forward.BaseDataClass._serialize_refsthat caused all model serialization to fail with aPydanticSerializationError.What changed
License headers
src/license/header.txt(the header template) andsrc/license/apply_headers.sh(applies headers across all directories and root files in one command).py,.yml,.sh,.toml).pre-commit-config.yamlwith twolicenseheadershooks (managed by pre-commit, no manual venv setup needed) — triggered on commit for all covered file types.github/workflows/check-license-headers.yml— CI backstop that fails the build if any file is missing a header on push/PR tomainordevelopdev_clean_setup.shto runpre-commit installautomatically, so hooks are active for any developer who follows the standard setupREADME.mdwith the header format and the fix commandpydantic 2.12 compatibility fix
BaseDataClass._serialize_refsis decorated with@model_serializer(mode='wrap'). The wrap handler callable (SerializerFunctionWrapHandler) only accepts the value to serialize —SerializationInfois passed to the outer function but must not be forwarded to the handler. In pydantic ≤ 2.11 the extra argument was silently tolerated; in 2.12 it raises:Fix:
serializer(self, info)→serializer(self)inbase_data_class.py.