docs: def rename_session(self, new_name):
          """
          Rename session and return new :class:`Session` object.
  
          Parameters
          ----------
          new_name : str
              new session name
  
          Returns
          -------
          :class:`Session`
  
          Raises
          ------
          :exc:`exc.BadSessionName`
          """
          session_check_name(new_name)
  
          proc = self.cmd('rename-session', new_name)
  
          if proc.stderr:
              if has_version('2.7') and 'no current client' in proc.stderr:
                  """tmux 2.7 raises "no current client" warning on BSD systems.
  
                  Should be fixed next release:
  
                  - https://www.mail-archive.com/tech@openbsd.org/msg45186.html
                  - https://marc.info/?l=openbsd-cvs&m=152183263526828&w=2
                  """
                  pass
              else:
                  raise exc.LibTmuxException(proc.stderr)
  
          return self