Skip to content

Commit

Permalink
Fix data-url breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
titusz committed Nov 23, 2024
1 parent 319e707 commit dc9aead
Show file tree
Hide file tree
Showing 5 changed files with 360 additions and 350 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
- Added .env to .gitignore
- Added multiformats support for codec convenience functions
- Added `iscc_validate_mf` for validation of canonical and multiformat codes
- Updeted locked dependencies
- Fixed data-url api change
- Updated dependency lock file
- Removed EOL Python 3.8/3.9 support

## [1.0.9] - 2024-03-17
Expand Down
3 changes: 2 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
- Added .env to .gitignore
- Added multiformats support for codec convenience functions
- Added `iscc_validate_mf` for validation of canonical and multiformat codes
- Updeted locked dependencies
- Fixed data-url api change
- Updated dependency lock file
- Removed EOL Python 3.8/3.9 support

## [1.0.9] - 2024-03-17
Expand Down
2 changes: 1 addition & 1 deletion iscc_core/code_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def gen_meta_code_v0(name, description=None, meta=None, bits=ic.core_opts.meta_b
meta_code_digest = soft_hash_meta_v0(name, payload)
metahash = ic.multi_hash_blake3(payload)
media_type = "application/ld+json" if "@context" in meta else "application/json"
durl_obj = DataURL.from_data(media_type, base64_encode=True, data=payload)
durl_obj = DataURL.from_byte_data(media_type, data=payload)
metadata_value = durl_obj.url
else:
raise TypeError(f"metadata must be Data-URL string or dict not {type(meta)}")
Expand Down
Loading

0 comments on commit dc9aead

Please sign in to comment.