diff --git a/pika/adapters/twisted_connection.py b/pika/adapters/twisted_connection.py
index ab90699..10c0ab8 100644
--- a/pika/adapters/twisted_connection.py
+++ b/pika/adapters/twisted_connection.py
@@ -736,7 +736,7 @@ class TwistedChannel(object):
                 else:
                     d.callback(method_frame.method)
 
-    def _on_puback_message_returned(self, message):
+    def _on_puback_message_returned(self, channel, method, properties, body):
         """Called as the result of Basic.Return from broker in
         publisher-acknowledgements mode. Saves the info as a ReturnedMessage
         instance in self._puback_return.
@@ -747,19 +747,18 @@ class TwistedChannel(object):
         :param bytes body: returned message body; empty string if no body
 
         """
-        assert isinstance(message.method, spec.Basic.Return), message.method
-        assert isinstance(message.properties,
-                          spec.BasicProperties), (message.properties)
+        assert isinstance(method, spec.Basic.Return), method
+        assert isinstance(properties, spec.BasicProperties), properties
 
         LOGGER.warning(
             "Published message was returned: _delivery_confirmation=%s; "
             "channel=%s; method=%r; properties=%r; body_size=%d; "
             "body_prefix=%.255r", self._delivery_confirmation,
-            message.channel.channel_number, message.method, message.properties,
-            len(message.body) if message.body is not None else None,
-            message.body)
+            channel.channel_number, method, properties,
+            len(body) if body is not None else None, body)
 
-        self._puback_return = message
+        self._puback_return = ReceivedMessage(channel=self,
+                method=method, properties=properties, body=body)
 
     def exchange_bind(self, destination, source, routing_key='',
                       arguments=None):

twisted channel _on_puback_message_returned has wrong number of args
_on_puback_message_returned in twisted channel has only 1 parameter, bug it's called with 4, is it a bug?
diff --git a/tests/acceptance/twisted_adapter_tests.py b/tests/acceptance/twisted_adapter_tests.py
index 4b6777f..38c989c 100644
--- a/tests/acceptance/twisted_adapter_tests.py
+++ b/tests/acceptance/twisted_adapter_tests.py
@@ -519,7 +519,7 @@ class TwistedChannelTestCase(TestCase):
             return d
 
         def check_response(error):
-            self.assertTrue(isinstance(error.value, NackError))
+            self.assertIsInstance(error.value, NackError)
             self.assertEqual(len(error.value.messages), 0)
         d.addCallback(send_message)
         d.addCallbacks(self.fail, check_response)
@@ -539,19 +539,15 @@ class TwistedChannelTestCase(TestCase):
             # Send the Basic.Return frame
             method = spec.Basic.Return(
                 exchange="testexch", routing_key="testrk")
-            return_cb(ReceivedMessage(
-                channel=self.channel,
-                method=method,
-                properties=spec.BasicProperties(),
-                body="testbody",
-            ))
+            return_cb(self.channel, method,
+                    spec.BasicProperties(), "testbody")
             # Send the Basic.Ack frame
             frame = Method(1, spec.Basic.Ack(delivery_tag=1))
             self.channel._on_delivery_confirmation(frame)
             return d
 
         def check_response(error):
-            self.assertTrue(isinstance(error.value, UnroutableError))
+            self.assertIsInstance(error.value, UnroutableError)
             self.assertEqual(len(error.value.messages), 1)
             msg = error.value.messages[0]
             self.assertEqual(msg.body, "testbody")
@@ -574,12 +570,8 @@ class TwistedChannelTestCase(TestCase):
             # Send the Basic.Return frame
             method = spec.Basic.Return(
                 exchange="testexch", routing_key="testrk")
-            return_cb(ReceivedMessage(
-                channel=self.channel,
-                method=method,
-                properties=spec.BasicProperties(),
-                body="testbody",
-            ))
+            return_cb(self.channel, method,
+                    spec.BasicProperties(), "testbody")
             # Send the Basic.Nack frame
             frame = Method(1, spec.Basic.Nack(delivery_tag=1))
             self.channel._on_delivery_confirmation(frame)

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest numpy>=1.16.0 pandas>=1.0.0
apt-get update apt-get install -y gcc
3.9
test-requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==25.3.0
Automat==24.8.1
certifi==2025.1.31
charset-normalizer==3.4.1
codecov==2.1.13
constantly==23.10.4
coverage==7.8.0
exceptiongroup==1.2.2
hyperlink==21.0.0
idna==3.10
incremental==24.7.2
iniconfig==2.1.0
mock==5.2.0
nose==1.3.7
numpy==2.0.2
packaging==24.2
pandas==2.2.3
-e git+https://github.com/pika/pika.git@83047f39c134f6dc2e6f8354c6680b02bafb0f0e#egg=pika
pluggy==1.5.0
pytest==8.3.5
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.32.3
six==1.17.0
tomli==2.2.1
tornado==6.4.2
Twisted==24.11.0
typing_extensions==4.13.0
tzdata==2025.2
urllib3==2.3.0
zope.interface==7.2

name: pika
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=3.0.16=h5eee18b_0
  - pip=25.0=py39h06a4308_0
  - python=3.9.21=he870216_1
  - readline=8.2=h5eee18b_0
  - setuptools=75.8.0=py39h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.45.1=py39h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==25.3.0
      - automat==24.8.1
      - certifi==2025.1.31
      - charset-normalizer==3.4.1
      - codecov==2.1.13
      - constantly==23.10.4
      - coverage==7.8.0
      - exceptiongroup==1.2.2
      - hyperlink==21.0.0
      - idna==3.10
      - incremental==24.7.2
      - iniconfig==2.1.0
      - mock==5.2.0
      - nose==1.3.7
      - numpy==2.0.2
      - packaging==24.2
      - pandas==2.2.3
      - pluggy==1.5.0
      - pytest==8.3.5
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.32.3
      - six==1.17.0
      - tomli==2.2.1
      - tornado==6.4.2
      - twisted==24.11.0
      - typing-extensions==4.13.0
      - tzdata==2025.2
      - urllib3==2.3.0
      - zope-interface==7.2
prefix: /opt/conda/envs/pika

tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_confirm_delivery_returned tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_confirm_delivery_returned_nacked
tests/acceptance/twisted_adapter_tests.py::ClosableDeferredQueueTestCase::test_close tests/acceptance/twisted_adapter_tests.py::ClosableDeferredQueueTestCase::test_close_twice tests/acceptance/twisted_adapter_tests.py::ClosableDeferredQueueTestCase::test_close_waiting tests/acceptance/twisted_adapter_tests.py::ClosableDeferredQueueTestCase::test_get_closed tests/acceptance/twisted_adapter_tests.py::ClosableDeferredQueueTestCase::test_put_closed tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_add_on_return_callback tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_cancel tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_cancel_no_consumer tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_consume tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_consume_errback_on_close tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_consume_failure tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_consume_while_closed tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_get tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_get_empty tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_get_twice tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_nack tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_publish tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_publish_closed tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_qos tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_recover tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_basic_reject tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_callback_deferred tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_close tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_confirm_delivery tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_confirm_delivery_multiple tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_confirm_delivery_nacked tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_consumer_cancelled_by_broker tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_method_not_wrapped tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_on_close tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_passthrough tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_queue_delete tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_repr tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_wrapped_method tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_wrapped_method_failure tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_wrapped_method_multiple_args tests/acceptance/twisted_adapter_tests.py::TwistedChannelTestCase::test_wrapped_method_while_closed tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_channel tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_close tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_close_twice tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_connection tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_connectionLost tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_connectionLost_twice tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_dataReceived tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_closed tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_closed_Failure tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_closed_twice tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_failed tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_failed_twice tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_ready tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_ready_method tests/acceptance/twisted_adapter_tests.py::TwistedProtocolConnectionTestCase::test_on_connection_ready_twice tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_adapter_disconnect_stream tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_adapter_emit_data tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_call_threadsafe tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_connection_lost tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_connection_lost_connectiondone tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_connection_made tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_data_received tests/acceptance/twisted_adapter_tests.py::TwistedConnectionAdapterTestCase::test_timeout tests/acceptance/twisted_adapter_tests.py::TimerHandleTestCase::test_cancel tests/acceptance/twisted_adapter_tests.py::TimerHandleTestCase::test_cancel_already_called tests/acceptance/twisted_adapter_tests.py::TimerHandleTestCase::test_cancel_already_cancelled tests/acceptance/twisted_adapter_tests.py::TimerHandleTestCase::test_cancel_twice
pika/adapters/twisted_connection.py
pika/adapters/twisted_connection.py