1"use strict";(globalThis.webpackChunkopensource_contentauth_org=globalThis.webpackChunkopensource_contentauth_org||[]).push([[9019],{13:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"sdk-repos/c2pa-python/docs/release-notes","title":"Release notes","description":"Version 0.33.0","source":"@site/docs/sdk-repos/c2pa-python/docs/release-notes.md","sourceDirName":"sdk-repos/c2pa-python/docs","slug":"/sdk-repos/c2pa-python/docs/release-notes","permalink":"/docs/sdk-repos/c2pa-python/docs/release-notes","draft":false,"unlisted":false,"editUrl":"https://github.com/contentauth/c2pa-python/edit/main/docs/release-notes.md","tags":[],"version":"current","frontMatter":{},"sidebar":"docs","previous":{"title":"Python example code","permalink":"/docs/sdk-repos/c2pa-python/docs/examples"},"next":{"title":"C2PA Python example","permalink":"/docs/sdk-repos/c2pa-python-example/"}}');var r=i(4848),d=i(8453);const o={},l="Release notes",c={},a=[{value:"Version 0.33.0",id:"version-0330",level:2},{value:"Breaking changes",id:"breaking-changes",level:3},{value:"Version 0.6.0",id:"version-060",level:2},{value:"Breaking changes",id:"breaking-changes-1",level:3},{value:"Version 0.5.2",id:"version-052",level:2},{value:"Version 0.5.0",id:"version-050",level:2},{value:"Version 0.4.0",id:"version-040",level:2},{value:"Version 0.3.0",id:"version-030",level:2}];function t(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"release-notes",children:"Release notes"})}),"\n",(0,r.jsx)(n.h2,{id:"version-0330",children:"Version 0.33.0"}),"\n",(0,r.jsx)(n.h3,{id:"breaking-changes",children:"Breaking changes"}),"\n",(0,r.jsxs)(n.p,{children:["Removed the deprecated file-based free functions ",(0,r.jsx)(n.code,{children:"read_file"}),",\n",(0,r.jsx)(n.code,{children:"read_ingredient_file"}),", and ",(0,r.jsx)(n.code,{children:"sign_file"}),", following the removal of the\nunderlying ",(0,r.jsx)(n.code,{children:"c2pa_read_file"}),", ",(0,r.jsx)(n.code,{children:"c2pa_read_ingredient_file"}),", and ",(0,r.jsx)(n.code,{children:"c2pa_sign_file"}),"\nfunctions from the c2pa-rs C FFI. The deprecated ",(0,r.jsx)(n.code,{children:"Builder.add_ingredient_from_file_path"}),"\nmethod was removed as well."]}),"\n",(0,r.jsx)(n.p,{children:"Migration:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Instead of ",(0,r.jsx)(n.code,{children:"read_file(path, data_dir)"}),", use ",(0,r.jsx)(n.code,{children:"Reader(path).json()"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Instead of ",(0,r.jsx)(n.code,{children:"read_ingredient_file(path, data_dir)"}),", use\n",(0,r.jsx)(n.code,{children:"Builder.add_ingredient(json, format, stream)"})," to add the ingredient directly."]}),"\n",(0,r.jsxs)(n.li,{children:["Instead of the ",(0,r.jsx)(n.code,{children:"sign_file(...)"})," free function, use the ",(0,r.jsx)(n.code,{children:"Builder.sign_file(source_path, dest_path, signer)"})," method (or ",(0,r.jsx)(n.code,{children:"Builder.sign(...)"})," for stream-based signing)."]}),"\n",(0,r.jsxs)(n.li,{children:["Instead of ",(0,r.jsx)(n.code,{children:"Builder.add_ingredient_from_file_path(json, format, filepath)"}),", open the\nfile and call ",(0,r.jsx)(n.code,{children:"Builder.add_ingredient_from_stream(json, format, stream)"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"Builder.sign_file"})," method and ",(0,r.jsx)(n.code,{children:"load_settings"})," are unaffected and remain available."]}),"\n",(0,r.jsx)(n.h2,{id:"version-060",children:"Version 0.6.0"}),"\n",(0,r.jsxs)(n.p,{children:["See ",(0,r.jsx)(n.a,{href:"https://github.com/contentauth/c2pa-python/releases/tag/v0.6.0",children:"Release tag 0.6.0"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"breaking-changes-1",children:"Breaking changes"}),"\n",(0,r.jsxs)(n.p,{children:["The signature of the ",(0,r.jsx)(n.code,{children:"c2pa.sign_ps256()"})," method changed. Previously, the argument was a file path, but now it's the PEM certificate string."]}),"\n",(0,r.jsx)(n.h2,{id:"version-052",children:"Version 0.5.2"}),"\n",(0,r.jsx)(n.p,{children:"New features:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Allow EC signatures in DER format from signers and verify signature format during validation."}),"\n",(0,r.jsx)(n.li,{children:"Fix bug in signing audio and video files in ISO Base Media File Format (BMFF)."}),"\n",(0,r.jsx)(n.li,{children:"Add the ability to verify PDF files (but not to sign them)."}),"\n",(0,r.jsxs)(n.li,{children:["Increase speed of ",(0,r.jsx)(n.code,{children:"sign_file"}
1)," by 2x or more, when using file paths (uses native Rust file I/O)."]}),"\n",(0,r.jsx)(n.li,{children:"Fixes for RIFF and GIF formats."}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"version-050",children:"Version 0.5.0"}),"\n",(0,r.jsx)(n.p,{children:"New features in this release:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Rewrites the API to be stream-based using a Builder / Reader model."}),"\n",(0,r.jsxs)(n.li,{children:["The functions now support throwing ",(0,r.jsx)(n.code,{children:"c2pa.Error"})," values, caught with ",(0,r.jsx)(n.code,{children:"try"}),"/",(0,r.jsx)(n.code,{children:"except"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Instead of ",(0,r.jsx)(n.code,{children:"c2pa.read_file"})," you now call ",(0,r.jsx)(n.code,{children:"c2pa_api.Reader.from_file"})," and ",(0,r.jsx)(n.code,{children:"reader.json"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Read thumbnails and other resources use ",(0,r.jsx)(n.code,{children:"reader.resource_to_stream"})," or ",(0,r.jsx)(n.code,{children:"reader.resource.to_file"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Instead of ",(0,r.jsx)(n.code,{children:"c2pa.sign_file"})," use ",(0,r.jsx)(n.code,{children:"c2pa_api.Builder.from_json"})," and ",(0,r.jsx)(n.code,{children:"builder.sign"})," or ",(0,r.jsx)(n.code,{children:"builder.sign_file"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Add thumbnails or other resources with ",(0,r.jsx)(n.code,{children:"builder.add_resource"})," or ",(0,r.jsx)(n.code,{children:"builder.add_resource_file"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Add Ingredients with ",(0,r.jsx)(n.code,{children:"builder.add_ingredient"})," or ",(0,r.jsx)(n.code,{children:"builder.add_ingredient_file"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["You can archive a ",(0,r.jsx)(n.code,{children:"Builder"})," using ",(0,r.jsx)(n.code,{children:"builder.to_archive"})," and reconstruct it with ",(0,r.jsx)(n.code,{children:"builder.from_archive"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Signers can be constructed with ",(0,r.jsx)(n.code,{children:"c2pa_api.create_signer"}),"."]}),"\n",(0,r.jsx)(n.li,{children:"The signer now requires a signing function to keep private keys private."}),"\n",(0,r.jsxs)(n.li,{children:["Example signing functions are provided in ",(0,r.jsx)(n.code,{children:"c2pa_api.py"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"version-040",children:"Version 0.4.0"}),"\n",(0,r.jsx)(n.p,{children:"This release:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Changes the name of the import from ",(0,r.jsx)(n.code,{children:"c2pa-python"})," to ",(0,r.jsx)(n.code,{children:"c2pa"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Supports pre-built platform wheels for macOS, Windows, and ",(0,r.jsx)(n.a,{href:"https://github.com/pypa/manylinux",children:"manylinux"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"version-030",children:"Version 0.3.0"}),"\n",(0,r.jsx)(n.p,{children:"This release includes some breaking changes to align with future APIs:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"C2paSignerInfo"})," moves the ",(0,r.jsx)(n.code,{children:"alg"})," to the first parameter from the third."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"c2pa.verify_from_file_json"})," is now ",(0,r.jsx)(n.code,{children:"c2pa.read_file"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"c2pa.ingredient_from_file_json"})," is now ",(0,r.jsx)(n.code,{children:"c2pa.read_ingredient_file"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"c2pa.add_manifest_to_file_json"})," is now ",(0,r.jsx)(n.code,{children:"c2pa.sign_file"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["There are many more specific error types now, and error messages always start with the name of the error, i.e., ",(0,r.jsx)(n.code,{children:'str(err.value).startswith("ManifestNotFound")'}),"."]}),"\n",(0,r.jsx)(n.li,{children:"The ingredient thumbnail identifier may be a JUMBF URI reference if a valid thumb already exists in the active manifest."}),"\n",(0,r.jsxs)(n.li,{children:["Extracted file paths for ",(0,r.jsx)(n.code,{children:"read_file"})," now use a folder structure and different naming conventions."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(t,{...e})}):t(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>l});var s=i(6540);const r={},d=s.createContext(r);function o(e){const n=s.useContext(d);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(d.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.