Skip to content

Commit 103aa13

Browse files
committed
chore: remove reference count checks
Signed-off-by: JP-Ellis <[email protected]>
1 parent 89c3c45 commit 103aa13

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

pact-python-ffi/src/pact_ffi/__init__.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686

8787
from __future__ import annotations
8888

89-
import gc
9089
import inspect
9190
import json
9291
import logging
@@ -6199,13 +6198,6 @@ def with_binary_body(
61996198
RuntimeError:
62006199
If the body could not be modified.
62016200
"""
6202-
if len(gc.get_referrers(body)) == 0:
6203-
warnings.warn(
6204-
"Make sure to assign the body to a variable to avoid having the byte array"
6205-
" modified.",
6206-
UserWarning,
6207-
stacklevel=3,
6208-
)
62096201
success: bool = lib.pactffi_with_binary_body(
62106202
interaction._ref,
62116203
part.value,
@@ -6266,13 +6258,6 @@ def with_binary_file(
62666258
RuntimeError:
62676259
If the body could not be set.
62686260
"""
6269-
if len(gc.get_referrers(body)) == 0:
6270-
warnings.warn(
6271-
"Make sure to assign the body to a variable to avoid having the byte array"
6272-
" modified.",
6273-
UserWarning,
6274-
stacklevel=3,
6275-
)
62766261
success: bool = lib.pactffi_with_binary_file(
62776262
interaction._ref,
62786263
part.value,

0 commit comments

Comments
 (0)