Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog.d/20250723_161421_sirosen_rm_raw_text.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Removed
-------

- Removed ``GlobusAPIError.raw_text``. This attribute was deprecated in
``globus-sdk`` version 3. Users should use the ``text`` attribute instead.
(:pr:`NUMBER`)
12 changes: 0 additions & 12 deletions src/globus_sdk/exc/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from .base import GlobusError
from .err_info import ErrorInfoContainer
from .warnings import warn_deprecated

if t.TYPE_CHECKING:
import requests
Expand Down Expand Up @@ -151,17 +150,6 @@ def text(self) -> str:
"""
return self._underlying_response.text

@property
def raw_text(self) -> str:
"""
Deprecated alias of the ``text`` property.
"""
warn_deprecated(
"The 'raw_text' property of GlobusAPIError objects is deprecated. "
"Use the 'text' property instead."
)
return self.text

@property
def binary_content(self) -> bytes:
"""
Expand Down
15 changes: 1 addition & 14 deletions tests/unit/errors/test_common_functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
import requests

from globus_sdk import ErrorSubdocument, GlobusAPIError, RemovedInV4Warning, exc
from globus_sdk import ErrorSubdocument, GlobusAPIError, exc
from globus_sdk.testing import construct_error


Expand Down Expand Up @@ -52,19 +52,6 @@ def test_binary_content_property():
assert err.binary_content == body_text.encode("utf-8")


def test_raw_text_property_warns():
body_text = "some data"
err = construct_error(body=body_text, http_status=400)
with pytest.warns(
RemovedInV4Warning,
match=(
r"The 'raw_text' property of GlobusAPIError objects is deprecated\. "
r"Use the 'text' property instead\."
),
):
assert err.raw_text == body_text


@pytest.mark.parametrize(
"body, response_headers, http_status, expect_code, expect_message",
(
Expand Down
Loading