Skip to content

Latest commit

 

History

History
140 lines (90 loc) · 5.99 KB

HISTORY.rst

File metadata and controls

140 lines (90 loc) · 5.99 KB

History

py-cid v0.6.0 (2026-11-22)

Breaking Changes

  • Change CIDv1.encode() default encoding from base58btc to base32 to conform with the CID specification.

    This also changes str(cid) for CIDv1 objects (which uses encode()), and therefore IPLD JSON serialization via to_json_dict() / CIDJSONEncoder, which emit the string form. Callers that require base58btc must pass encode("base58btc") explicitly. (#66)

Bugfixes

  • Validate multihash correctness in CIDv0 constructor. (#63)
  • Support all standard hash types from multihash library in Prefix.sum(). (#64)
  • Delegate multihash type mappings in Prefix to the multihash library. (#65)
  • Fix from_reader() to properly parse multi-byte varints for codec and multihash length. (#67)
  • Update CIDSet.for_each() to stop iteration and return the error if the callback function raises an exception or returns an exception. (#69)

Improved Documentation

  • Document Undef in the API reference and type stubs. (#68)

Features

  • Add Undef sentinel for representing undefined/nil CIDs, matching go-cid Undef. (#68)
  • Add pytest-benchmark based performance benchmarking tests to evaluate Cid.prefix, Cid.encode, and Prefix.sum execution speeds. (#71)
  • Add property-based fuzz testing using hypothesis to ensure CID parsing and encoding are robust against arbitrary input and do not crash. (#72)

Internal Changes - for py-cid Contributors

  • Add version.json for consistency with go-cid and the multiformats ecosystem; bump-my-version keeps it in sync on release. (#73)

Miscellaneous Changes

  • Raise lower bounds to py-multihash>=4.0.0, py-multibase>=2.1.0, and py-multicodec>=1.1.0. (#89)

Performance Improvements

  • Cache CIDv1.buffer after the first access so repeated serialization does not recompute the byte representation. (#70)

py-cid v0.5.0 (2026-02-13)

Features

  • Add comprehensive feature parity with go-cid implementation.

    This includes 13 major features organized by priority:

    Critical Features (P0): - JSON Marshaling (IPLD Format): BaseCID.to_json_dict(), BaseCID.from_json_dict(), and CIDJSONEncoder for full JSON integration - Prefix Operations: Prefix class for CID metadata management, Prefix.sum() for creating CIDs from data, and BaseCID.prefix() for extracting prefix

    High Priority Features (P1): - /ipfs/ Path Parsing: parse_ipfs_path() and automatic extraction in from_string() - Extract Encoding: extract_encoding() to get multibase encoding without full parsing - Trailing Bytes Validation: from_bytes_strict() for strict CID parsing

    Medium Priority Features (P2): - Builder Pattern: V0Builder and V1Builder for fluent CID construction - Set Operations: CIDSet class for managing collections of unique CIDs with full Python set interface - Defined Check: BaseCID.defined() to check if CID is valid - Stream Parsing: from_reader() for parsing CIDs from streams

    Low Priority Features (P3): - MustParse: must_parse() convenience function for strict parsing - Binary/Text Marshaling: BaseCID.to_bytes(), BaseCID.to_text(), and BaseCID.from_text() - KeyString: BaseCID.key_string() for binary representation as string - Loggable: BaseCID.loggable() for logging purposes

    All features include comprehensive tests (168 total, 81% coverage) and complete documentation with working code examples. (#60)

py-cid v0.4.0 (2025-12-19)

Features

  • Add Python 3.14 to the supported and tested interpreter list across tox and CI. (#45)
  • Migrate from pymultihash to py-multihash >= 2.0.0 for better maintenance and modern API support. (#47)

Internal Changes - for py-cid Contributors

  • Update license format in pyproject.toml from deprecated TOML table to SPDX string format to comply with setuptools>=77.0.0 requirements. (#46)
  • Copied base58 code directly into py-cid to avoid future dependency issues. (#52)

py-cid v0.3.1 (2025-09-12)

Miscellaneous Changes

  • Complete build system modernization with pyproject.toml Added comprehensive development tooling (ruff, mypy, pre-commit, tox) Updated dependencies to use pymultihash instead of py-multihash Added GitHub Actions CI/CD pipeline Added type stubs for mypy support Updated Python version support to 3.10+ Enhanced testing with pytest, hypothesis, and coverage Added towncrier for changelog management Improved documentation and contributing guidelines (#40)

0.2.1 (2018-10-20)

  • Fix edge cases with multibase and multihash decoding
  • Added hypothesis tests while verifying CIDs

0.1.5 (2018-10-12)

  • Handle the case where an incorrect base58 encoded value is provided to make_cid

0.1.0 (2017-09-05)

  • First release on PyPI.