jorisvandenbossche commented on code in PR #14343:
URL: https://github.com/apache/arrow/pull/14343#discussion_r993157951


##########
python/pyarrow/tests/test_plasma.py:
##########
@@ -30,6 +30,10 @@
 import pyarrow as pa
 
 
+# ignore all Plasma deprecation warnings in this file, we test that the
+# warnings are actually raised in test_plasma_deprecated.py
+pytestmark = pytest.mark.filterwarnings("ignore::DeprecationWarning")

Review Comment:
   ```suggestion
   pytestmark = pytest.mark.filterwarnings("ignore:'Plasma:DeprecationWarning")
   ```
   
   To make the filter more explicit for only the plasma related warnings, and 
not any other that we might need to see (although in the case of the plasma 
tests, we probably don't care too much since we are going to remove those 
anyway ..)



##########
python/pyarrow/_plasma.pyx:
##########
@@ -169,6 +172,10 @@ cdef class ObjectID(_Weakrefable):
                              " is " + str(object_id))
         self.data = CUniqueID.from_binary(object_id)
 
+        warnings.warn(
+            "Plasma is deprecated since Arrow 10.0.0. It will be removed in 
12.0.0 or so.",
+            DeprecationWarning)

Review Comment:
   ```suggestion
               DeprecationWarning, stacklevel=2)
   ```



##########
python/pyarrow/_plasma.pyx:
##########
@@ -295,11 +305,14 @@ def get_socket_from_fd(fileno, family, type):
 
 cdef class PlasmaClient(_Weakrefable):
     """
-    The PlasmaClient is used to interface with a plasma store and manager.
+    DEPRECATED: The PlasmaClient is used to interface with a plasma store and 
manager.
 
     The PlasmaClient can ask the PlasmaStore to allocate a new buffer, seal a
     buffer, and get a buffer. Buffers are referred to by object IDs, which are
     strings.
+
+    .. deprecated:: 10.0.0
+       Plasma is deprecated since Arrow 10.0.0. It will be removed in 12.0.0 
or so.

Review Comment:
   Can you add such a deprecated notice also to the `connect()` docstring 
(since that is what users will typically use to get a PlasmaClient, I think)



##########
python/pyarrow/_plasma.pyx:
##########
@@ -312,6 +325,10 @@ cdef class PlasmaClient(_Weakrefable):
         self.notification_fd = -1
         self.store_socket_name = b""
 
+        warnings.warn(
+            "Plasma is deprecated since Arrow 10.0.0. It will be removed in 
12.0.0 or so.",
+            DeprecationWarning)

Review Comment:
   ```suggestion
               DeprecationWarning, stacklevel=3)
   ```
   
   (taking one more so that it works better for `connect(..)`, alternative 
would be to move this warning to connect() itself)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to