code: def update_version(self, version: Union[http.HttpVersion, str]) -> None:
          
          if isinstance(version, str):
              v = [l.strip() for l in version.split('.', 1)]
              try:
                  version = http.HttpVersion(int(v[0]), int(v[1]))
              except ValueError:
                  raise ValueError(
                      'Can not parse http version number: {}'
                      .format(version)) from None
          self.version = version
docs: Convert request version to two elements tuple.
  
          parser HTTP version '1.1' => (1, 1)