(self, host_endpoint, previous_version)
| 1656 | return kwargs_dict |
| 1657 | |
| 1658 | def protocol_downgrade(self, host_endpoint, previous_version): |
| 1659 | if self._protocol_version_explicit: |
| 1660 | raise DriverException("ProtocolError returned from server while using explicitly set client protocol_version %d" % (previous_version,)) |
| 1661 | new_version = ProtocolVersion.get_lower_supported(previous_version) |
| 1662 | if new_version < ProtocolVersion.MIN_SUPPORTED: |
| 1663 | raise DriverException( |
| 1664 | "Cannot downgrade protocol version below minimum supported version: %d" % (ProtocolVersion.MIN_SUPPORTED,)) |
| 1665 | |
| 1666 | log.warning("Downgrading core protocol version from %d to %d for %s. " |
| 1667 | "To avoid this, it is best practice to explicitly set Cluster(protocol_version) to the version supported by your cluster. " |
| 1668 | "https://docs.datastax.com/en/developer/python-driver/latest/api/cassandra/cluster.html#cassandra.cluster.Cluster.protocol_version", self.protocol_version, new_version, host_endpoint) |
| 1669 | self.protocol_version = new_version |
| 1670 | |
| 1671 | def connect(self, keyspace=None, wait_for_all_pools=False): |
| 1672 | """ |
no test coverage detected