c2pa-python 0.32.9__tar.gz → 0.32.11__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (22) hide show
  1. {c2pa_python-0.32.9/src/c2pa_python.egg-info → c2pa_python-0.32.11}/PKG-INFO +1 -1
  2. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/pyproject.toml +1 -1
  3. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa/c2pa.py +11 -3
  4. {c2pa_python-0.32.9 → c2pa_python-0.32.11/src/c2pa_python.egg-info}/PKG-INFO +1 -1
  5. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/tests/test_unit_tests.py +1 -1
  6. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/LICENSE-APACHE +0 -0
  7. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/LICENSE-MIT +0 -0
  8. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/MANIFEST.in +0 -0
  9. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/README.md +0 -0
  10. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/requirements.txt +0 -0
  11. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/scripts/download_artifacts.py +0 -0
  12. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/setup.cfg +0 -0
  13. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/setup.py +0 -0
  14. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa/__init__.py +0 -0
  15. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa/build.py +0 -0
  16. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa/lib.py +0 -0
  17. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa_python.egg-info/SOURCES.txt +0 -0
  18. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa_python.egg-info/dependency_links.txt +0 -0
  19. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa_python.egg-info/entry_points.txt +0 -0
  20. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa_python.egg-info/requires.txt +0 -0
  21. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/src/c2pa_python.egg-info/top_level.txt +0 -0
  22. {c2pa_python-0.32.9 → c2pa_python-0.32.11}/tests/test_unit_tests_threaded.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: c2pa-python
3
- Version: 0.32.9
3
+ Version: 0.32.11
4
4
  Summary: Python bindings for the C2PA Content Authenticity Initiative (CAI) library
5
5
  Author-email: Gavin Peacock <gvnpeacock@adobe.com>, Tania Mathern <mathern@adobe.com>
6
6
  Maintainer-email: Gavin Peacock <gpeacock@adobe.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "c2pa-python"
7
- version = "0.32.9"
7
+ version = "0.32.11"
8
8
  requires-python = ">=3.10"
9
9
  description = "Python bindings for the C2PA Content Authenticity Initiative (CAI) library"
10
10
  readme = { file = "README.md", content-type = "text/markdown" }
@@ -3486,6 +3486,8 @@ class Builder(ManagedResource):
3486
3486
  When `signer` is provided, calls `c2pa_builder_sign` (explicit
3487
3487
  signer). When `signer` is `None`, calls
3488
3488
  `c2pa_builder_sign_context` (context-based signer).
3489
+ Sign can only be called once on a Builder, as Builder objects
3490
+ are single-sign use. The Builder is closed after signing.
3489
3491
 
3490
3492
  Args:
3491
3493
  format: The MIME type or extension of the content
@@ -3529,10 +3531,12 @@ class Builder(ManagedResource):
3529
3531
  dest_stream._stream,
3530
3532
  ctypes.byref(manifest_bytes_ptr),
3531
3533
  )
3532
- # Builder pointer consumed by Rust FFI at this point
3533
- self._mark_consumed()
3534
+ # Sign borrows the Builder without taking ownership.
3535
+ # Closing here ensures resources clean up,
3536
+ # and single use/single sign done by a Builder.
3537
+ self.close()
3534
3538
  except Exception as e:
3535
- self._mark_consumed()
3539
+ self.close()
3536
3540
  raise C2paError(f"Error during signing: {e}")
3537
3541
 
3538
3542
  _check_ffi_operation_result(result,
@@ -3565,6 +3569,8 @@ class Builder(ManagedResource):
3565
3569
  dest: Any = None,
3566
3570
  ) -> bytes:
3567
3571
  """Shared signing logic for sign().
3572
+ Sign can only be called once on a Builder, as Builder objects
3573
+ are single-sign use. The Builder is closed after signing.
3568
3574
 
3569
3575
  Args:
3570
3576
  signer: The signer to use, or None for context signer.
@@ -3635,6 +3641,8 @@ class Builder(ManagedResource):
3635
3641
  If no signer is provided, the context's signer is
3636
3642
  used (builder must have been created with a Context
3637
3643
  that has a signer).
3644
+ Sign can only be called once on a Builder, as Builder objects
3645
+ are single-sign use. The Builder is closed after signing.
3638
3646
 
3639
3647
  Args:
3640
3648
  signer: The signer to use. If not provided, the
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: c2pa-python
3
- Version: 0.32.9
3
+ Version: 0.32.11
4
4
  Summary: Python bindings for the C2PA Content Authenticity Initiative (CAI) library
5
5
  Author-email: Gavin Peacock <gvnpeacock@adobe.com>, Tania Mathern <mathern@adobe.com>
6
6
  Maintainer-email: Gavin Peacock <gpeacock@adobe.com>
@@ -70,7 +70,7 @@ def load_test_settings_json():
70
70
  class TestC2paSdk(unittest.TestCase):
71
71
  def test_sdk_version(self):
72
72
  # This test verifies the native libraries used match the expected version.
73
- self.assertIn("0.85.0", sdk_version())
73
+ self.assertIn("0.85.1", sdk_version())
74
74
 
75
75
 
76
76
  class TestReader(unittest.TestCase):
File without changes
File without changes
File without changes
File without changes
File without changes