Skip to content

Commit 5dbc6a7

Browse files
committed
fix: Remove debug code
1 parent 91d1b66 commit 5dbc6a7

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/c2pa/c2pa.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import json
44
import sys
55
import os
6+
import warnings
67
from pathlib import Path
78
from typing import Optional, Union, Callable, Any
89
import time
@@ -585,6 +586,10 @@ def sign_file(
585586
) -> str:
586587
"""Sign a file with a C2PA manifest.
587588
589+
.. deprecated:: 0.10.12
590+
This function is deprecated and will be removed in a future version.
591+
Please use the Builder class for signing and the Reader class for reading signed data instead.
592+
588593
Args:
589594
source_path: Path to the source file
590595
dest_path: Path to write the signed file to
@@ -600,6 +605,13 @@ def sign_file(
600605
C2paError.Encoding: If any of the string inputs contain invalid UTF-8 characters
601606
C2paError.NotSupported: If the file type cannot be determined
602607
"""
608+
warnings.warn(
609+
"The sign_file function is deprecated and will be removed in a future version. "
610+
"Please use the Builder class for signing and the Reader class for reading signed data instead.",
611+
DeprecationWarning,
612+
stacklevel=2
613+
)
614+
603615
try:
604616
# Create a signer from the signer info
605617
signer = Signer.from_info(signer_info)

tests/test_unit_tests.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -775,9 +775,6 @@ def test_sign_file(self):
775775
temp_data_dir
776776
)
777777

778-
print("Signed manifest:")
779-
print(result_json)
780-
781778
finally:
782779
# Clean up
783780
if os.path.exists(output_path):

0 commit comments

Comments
 (0)