Rename a pipeline component.

        old_name (unicode): Name of the component to rename.
        new_name (unicode): New name of the component.

        DOCS: https://spacy.io/api/language#rename_pipe
493725
def rename_pipe(self, old_name, new_name):
        
        if old_name not in self.pipe_names:
            raise ValueError(Errors.E001.format(name=old_name, opts=self.pipe_names))
        if new_name in self.pipe_names:
            raise ValueError(Errors.E007.format(name=new_name, opts=self.pipe_names))
        i = self.pipe_names.index(old_name)
        self.pipeline[i] = (new_name, self.pipeline[i][1])
689052
def rename(self, old_name, new_name):
        """"""
        try:
            self.api.rename(mkey(old_name), mkey(new_name))
        except ResponseError, exc:
            if "no such key" in exc.args:
                raise KeyError(old_name)
            raise
251130
def rename(name, kwargs, call=None):
    '''
    
    '''
    if call != 'action':
        raise SaltCloudSystemExit(
            'The rename action must be called with -a or --action.'
        )

    log.info('Renaming %s to %s', name, kwargs['newname'])

    set_tags(name, {'Name': kwargs['newname']}, call='action')

    salt.utils.cloud.rename_key(
        __opts__['pki_dir'], name, kwargs['newname']
    )
315462
def rename(dn, new_rdn, delete_old, *args)
      log_dispatch(:rename, dn, new_rdn, delete_old, *args)
      adapter.rename(dn, new_rdn.to_str, delete_old, *args)
    end
591536
def rename(self, new_name):
        """"""
        old_name = self.name
        self.name = new_name
        pypath = self.relative_pythonpath  # ??
        self.root_path = self.root_path[:-len(old_name)]+new_name
        self.relative_pythonpath = pypath  # ??
        self.save()
530177
def component(self, **kwargs):
        
        kwargs_copy = self.base_dict.copy()
        kwargs_copy.update(**kwargs)
        self._replace_none(kwargs_copy)        
        try:
            return NameFactory.component_format.format(**kwargs_copy)
        except KeyError:
            return None
157169
def rename(self):
        
        src = self.get_current_path()
        pardir, name = os.path.split(src)
        new_name, status = QtWidgets.QInputDialog.getText(
            self.tree_view, _('Rename '), _('New name:'),
            QtWidgets.QLineEdit.Normal, name)
        if status:
            dest = os.path.join(pardir, new_name)
            old_files = []
            if os.path.isdir(src):
                old_files = self._get_files(src)
            else:
                old_files = [src]
            try:
                os.rename(src, dest)
            except OSError as e:
                QtWidgets.QMessageBox.warning(
                    self.tree_view, _('Rename failed'),
                    _('Failed to rename "%s" into "%s".\n\n%s') % (src, dest, str(e)))
            else:
                if os.path.isdir(dest):
                    new_files = self._get_files(dest)
                else:
                    new_files = [dest]
                self.tree_view.file_renamed.emit(os.path.normpath(src),
                                                 os.path.normpath(dest))
                renamed_files = []
                for old_f, new_f in zip(old_files, new_files):
                    self.tree_view.file_renamed.emit(old_f, new_f)
                    renamed_files.append((old_f, new_f))
                # emit all changes in one go
                self.tree_view.files_renamed.emit(renamed_files)
240411
def new_name(self, template=u"xxx_todo_changeme"):
        
        name = template
        while name in self.used_names:
            name = template + unicode(self.numbers.next())
        self.used_names.add(name)
        return name
1307259
def rename(new_name)
      json_body = { :name => new_name }.to_json
      HTTParty.put(base_request_uri, :body => json_body)
      @name = new_name
    end
1356301
def change_object_name(self, old_name, new_name):
        
        h = self._get_object_handle(old_name)
        if old_name in self._object_handles:
            self._object_handles.pop(old_name)
        lua_code = "simSetObjectName({}, '{}')".format(h, new_name)
        self._inject_lua_code(lua_code)
665334
def rename(self, old_key, new_key):
        
        return lib.zhashx_rename(self._as_parameter_, old_key, new_key)
77461
def renameElement(self, oldname, newname, info):
        

        log.debug("Renaming %s into %s in %s" %
                        (oldname, newname, self.current_filename))
        start, end = info
        try:
            t = self.doc.binding[start]
        except:
            self.mainwin.showStatus("Unexpected error in renameElement")
            return

        # Determine type of the to-be-renamed element and Androguard internal objects
        type_ = None
        if t[0] == 'NAME_METHOD_PROTOTYPE':  # method definition in a class
            method_ = t[1]
            if method_ == self.title:
                method_ = 'init'

            proto_ = t[2].method.proto
            log.debug("Found: class=%s, method=%s, proto=%s" %
                            (self.current_class, method_, proto_))
            type_ = "METHOD"
        elif t[0] == 'NAME_METHOD_INVOKE':  # method call in a method
            class_, method_ = t[2].split(' -> ')
            class_ = classdot2class(class_)
            if class_ == 'this':
                class_ = self.path
            proto_ = proto2methodprotofunc("".join(t[3]) + t[4])
            log.debug("Found: class=%s, method=%s, proto=%s" %
                            (class_, method_, proto_))
            type_ = "METHOD"
        elif t[0] == 'NAME_PROTOTYPE':  # class definition on top of a class
            class_ = t[2] + '.' + t[1]
            package_ = t[2]
            log.debug("Found: package={}, class={}".format(package_, class_))
            type_ = "CLASS"
        elif t[0] == 'NAME_FIELD':
            field_item = t[3]
            type_ = "FIELD"
        else:
            self.mainwin.showStatus(
                "Rename not available. Info found: '%s' but object not supported."
                % t[0])
            return

        # Do the actual renaming
        if type_ == "METHOD":
            if self.method_name_exist(newname):
                self.mainwin.showStatus("Method name already exist")
                return

            method_class_name = self.current_class.get_name()
            method_name = method_
            method_proto = proto_
            current_analysis = self.session.get_analysis(self.current_class)

            method_item = current_analysis.get_method_by_name(
                method_class_name, method_name, method_proto)
            if not method_item:
                self.mainwin.showStatus("Impossible to find the method")
                return

            method_item.set_name(str(newname))  # unicode to ascii
        elif type_ == "CLASS":
            newname_class = classdot2class(package_ + '.' + newname)
            self.mainwin.showStatus("New name: %s" % newname_class)
            class_item = self.current_class  # getattr(self.mainwin.d, classdot2func(class_))
            class_item.set_name(str(newname_class))  # unicode to ascii
            self.mainwin.updateDockWithTree()
        elif type_ == 'FIELD':
            if self.field_name_exist(newname):
                self.mainwin.showStatus("Field name already exist")
                return
            field_item.set_name(str(newname))
        else:
            self.mainwin.showStatus("Unsupported type: %s" % str(type_))
            return
        self.reload_java_sources()
1098456
def rename(self, new_name):
        

        if _lxc.Container.rename(self, new_name):
            return Container(new_name)

        return False
1359941
def rename(self, old_key, new_key):
        
        assert new_key not in self
        assert old_key != new_key

        file_ = self[old_key]
        old_data = self.filesmap[old_key]

        # Create a new version with the new name
        obj = ObjectVersion.create(
            bucket=self.bucket, key=new_key,
            _file_id=file_.obj.file_id
        )

        # Delete old key
        self.filesmap[new_key] = self.file_cls(obj, old_data).dumps()
        del self[old_key]

        return obj
1318272
def rename_window(self, new_name):
        

        import shlex

        lex = shlex.shlex(new_name)
        lex.escape = ' '
        lex.whitespace_split = False

        try:
            self.cmd('rename-window', new_name)
            self['window_name'] = new_name
        except Exception as e:
            logger.error(e)

        self.server._update_windows()

        return self
794874
def rename_key(d: Dict[str, Any], old: str, new: str) -> None:
    
    d[new] = d.pop(old)
826485
def update_pipeline_field(self, pipeline_key, field):
		'''
		'''
		uri = '/'.join([
						self.api_uri,
						self.pipelines_suffix,
						pipeline_key,
						self.fields_suffix
						])
		return self._update_field(uri, field)