docs: def new_zip(self, filename, deleted_files=None, new_files={}):
          """
              Create a new zip file
  
              :param filename: the output filename of the zip
              :param deleted_files: a regex pattern to remove specific file
              :param new_files: a dictionnary of new files
  
              :type filename: string
              :type deleted_files: None or a string
              :type new_files: a dictionnary (key:filename, value:content of the file)
          """
          if self.zipmodule == 2:
              from reston.patch import zipfile
              zout = zipfile.ZipFile(filename, 'w')
          else:
              import zipfile
              zout = zipfile.ZipFile(filename, 'w')
  
          for item in self.zip.infolist():
              if deleted_files is not None:
                  if re.match(deleted_files, item.filename) == None:
                      if item.filename in new_files:
                          zout.writestr(item, new_files[item.filename])
                      else:
                          buffer = self.zip.read(item.filename)
                          zout.writestr(item, buffer)
          zout.close()