##### SUMMARY
connection contains call to Display.deprecated or AnsibleModule.deprecate and is scheduled for removal

```
lib/ansible/plugins/connection/__init__.py:238:8: ansible-deprecated-version: Deprecated version ('2.12') found in call to Display.deprecated or AnsibleModule.deprecate (0%)
lib/ansible/plugins/connection/__init__.py:245:8: ansible-deprecated-version: Deprecated version ('2.12') found in call to Display.deprecated or AnsibleModule.deprecate (0%)
lib/ansible/plugins/connection/__init__.py:252:8: ansible-deprecated-version: Deprecated version ('2.12') found in call to Display.deprecated or AnsibleModule.deprecate (0%)
lib/ansible/plugins/connection/__init__.py:259:8: ansible-deprecated-version: Deprecated version ('2.12') found in call to Display.deprecated or AnsibleModule.deprecate (0%)
```

##### ISSUE TYPE
 - Bug Report

##### COMPONENT NAME
```
lib/ansible/plugins/connection/__init__.py
```

##### ANSIBLE VERSION
```
2.12
```

##### CONFIGURATION
N/A

##### OS / ENVIRONMENT
N/A

##### STEPS TO REPRODUCE
N/A

##### EXPECTED RESULTS
N/A

##### ACTUAL RESULTS
N/A

class TestSSHConnectionRetries(object):
    def test_incorrect_password(self, monkeypatch):
        self.conn.set_option('host_key_checking', False)
        self.conn.set_option('retries', 5)
        monkeypatch.setattr('time.sleep', lambda x: None)
        self.mock_popen_res.stdout.read.side_effect = [b'']
        self.mock_popen_res.stderr.read.side_effect = [b'Permission denied, please try again.\r\n']
        type(self.mock_popen_res).returncode = PropertyMock(side_effect=[5] * 4)
        self.mock_selector.select.side_effect = [
            [(SelectorKey(self.mock_popen_res.stdout, 1001, [EVENT_READ], None), EVENT_READ)],
            [(SelectorKey(self.mock_popen_res.stderr, 1002, [EVENT_READ], None), EVENT_READ)],
            [],
        ]
        self.mock_selector.get_map.side_effect = lambda: True
        self.conn._build_command = MagicMock()
        self.conn._build_command.return_value = [b'sshpass', b'-d41', b'ssh', b'-C']
        exception_info = pytest.raises(AnsibleAuthenticationFailure, self.conn.exec_command, 'sshpass', 'some data')
        assert exception_info.value.message == ('Invalid/incorrect username/password. Skipping remaining 5 retries to prevent account lockout: '
                                                'Permission denied, please try again.')
        assert self.mock_popen.call_count == 1
    def test_retry_then_success(self, monkeypatch):
        self.conn.set_option('host_key_checking', False)
        self.conn.set_option('retries', 3)
        monkeypatch.setattr('time.sleep', lambda x: None)
        self.mock_popen_res.stdout.read.side_effect = [b"", b"my_stdout\n", b"second_line"]
        self.mock_popen_res.stderr.read.side_effect = [b"", b"my_stderr"]
        type(self.mock_popen_res).returncode = PropertyMock(side_effect=[255] * 3 + [0] * 4)
        self.mock_selector.select.side_effect = [
            [(SelectorKey(self.mock_popen_res.stdout, 1001, [EVENT_READ], None), EVENT_READ)],
            [(SelectorKey(self.mock_popen_res.stderr, 1002, [EVENT_READ], None), EVENT_READ)],