Return copy

		:return: WHTTPCookie
190368
def copy(self):
		
		copy_cookie = WHTTPCookie(self.__name, self.__value)
		copy_cookie.__attrs = self.__attrs.copy()
		return copy_cookie
607829
def copy(self):
        """"""
        if self._pre_computed_hash is None:
            temp = ssdeep(buf="")
        else:
            temp = ssdeep(hash=hash)
        libssdeep_wrapper.fuzzy_free(temp._state)
        temp._state = libssdeep_wrapper.fuzzy_clone(self._state)
        temp._updatable = self._updatable
        temp._pre_computed_hash = self._pre_computed_hash
        return temp
1066668
def copy(self):
        
        kb = KeyBundle()
        kb._keys = self._keys[:]

        kb.cache_time = self.cache_time
        kb.verify_ssl = self.verify_ssl
        if self.source:
            kb.source = self.source
            kb.fileformat = self.fileformat
            kb.keytype = self.keytype
            kb.keyusage = self.keyusage
            kb.remote = self.remote

        return kb
1347955
def copy(self):
        
        c = copy.deepcopy(self)
        # Python 3 doesn't copy custom attributes of the threadlocal subclass
        c.host = copy.copy(self.host)
        c.port = copy.copy(self.port)
        c.timeout = copy.copy(self.timeout)
        c._sock = None
        return c
738959
def copy(self, target, timeout=500):
        """"""

        if self.metadata and 'encoding' in self.metadata:
            with io.open(target,'w', encoding=self.metadata['encoding']) as f:
                for line in self:
                    f.write(line)
        else:
            with io.open(target,'wb') as f:
                for line in self:
                    if sys.version < '3' and isinstance(line,unicode): #pylint: disable=undefined-variable
                        f.write(line.encode('utf-8'))
                    elif sys.version >= '3' and isinstance(line,str):
                        f.write(line.encode('utf-8'))
                    else:
                        f.write(line)
805508
def copy(self):
        
        return self.__class__(self.tag, self.data.copy(), self.context.copy())
399589
def wsgiheader(self):
        '''  '''
        for c in list(self.COOKIES.values()):
            if c.OutputString() not in self.headers.getall('Set-Cookie'):
                self.headers.append('Set-Cookie', c.OutputString())
        return list(self.headers.iterallitems())
684794
def dump_config(self):
        

        conf = copy_config(self.config, self.mutable_config_keys)
        conf['state'] = {
            'cookiejar_cookies': list(self.cookies.cookiejar),
        }
        return conf
988610
def get_site(self, url, cookies={}, page_format='html', return_on_error=[], retry_enabled=True,
                 num_tries=0, num_apikey_tries=0, headers={}, api=False, track_stat=True, timeout=30,
                 force_requests=False, driver_args=(), driver_kwargs={}, parser='beautifulsoup',
                 custom_source_checks=[]):
        
        self._reset_response()

        num_tries += 1
        # Save args and kwargs so they can be used for trying the function again
        tmp_args = locals().copy()
        get_site_args = [tmp_args['url']]
        # Remove keys that dont belong to the keywords passed in
        del tmp_args['url']
        del tmp_args['self']
        get_site_kwargs = tmp_args

        # Check driver_kwargs for anything that we already set
        kwargs_cannot_be = ['headers', 'cookies', 'timeout']
        for key_name in kwargs_cannot_be:
            if driver_kwargs.get(key_name) is not None:
                del driver_kwargs[key_name]
                logger.warning("Cannot pass `{key}` in driver_kwargs to get_site(). `{key}` is already set by default"
                               .format(key=key_name))

        # Check if a url is being passed in
        if url is None:
            logger.error("Url cannot be None")
            return None

        ##
        # url must start with http....
        ##
        prepend = ''
        if url.startswith('//'):
            prepend = 'http:'

        elif not url.startswith('http'):
            prepend = 'http://'

        url = prepend + url

        ##
        # Try and get the page
        ##
        rdata = None
        try:
            source_text = self._get_site(url, headers, cookies, timeout, driver_args, driver_kwargs)
            if custom_source_checks:
                # Check if there are any custom check to run
                for re_text, status_code in custom_source_checks:
                    if re.search(re_text, source_text):
                        if self.response is None:
                            # This is needed when using selenium and we still need to pass in the 'response'
                            self.response = type('', (), {})()
                        self.response.status_code = status_code
                        self.status_code = status_code
                        raise requests.exceptions.HTTPError("Custom matched status code", response=self.response)

            rdata = self.parse_source(source_text, page_format, parser)

        ##
        # Exceptions from Selenium
        ##
        # Nothing yet

        ##
        # Exceptions from Requests
        ##
        except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
            """
            Try again with a new profile (do not get new apikey)
            Wait n seconds before trying again
            """
            e_name = type(e).__name__
            if num_tries < self._num_retries and retry_enabled is True:
                logger.info("{} [get_site]: try #{} on {} Error {}".format(e_name, num_tries, url, e))
                time.sleep(2)
                self.new_profile()
                return self.get_site(*get_site_args, **get_site_kwargs)

            else:
                logger.error("{} [get_site]: try #{} on{}".format(e_name, num_tries, url))

        except requests.exceptions.TooManyRedirects as e:
            logger.exception("TooManyRedirects [get_site]: {}".format(url))

        ##
        # Exceptions shared by Selenium and Requests
        ##
        except (requests.exceptions.HTTPError, SeleniumHTTPError) as e:
            """
            Check the status code returned to see what should be done
            """
            status_code = str(e.response.status_code)
            # If the client wants to handle the error send it to them
            if int(status_code) in return_on_error:
                raise e.with_traceback(sys.exc_info()[2])

            try_again = self._get_site_status_code(url, status_code, api, num_tries, num_apikey_tries)
            if try_again is True and retry_enabled is True:
                # If True then try request again
                return self.get_site(*get_site_args, **get_site_kwargs)

        # Every other exceptions that were not caught
        except Exception:
            logger.exception("Unknown Exception [get_site]: {url}".format(url=url))

        return rdata
837938
def copy(self, destination):

		'''
		
		'''

		# set move headers
		destination_uri = self.repo.parse_uri(destination)

		# http request
		response = self.repo.api.http_request('COPY', self.uri, data=None, headers={'Destination':destination_uri.toPython()})

		# handle response
		if response.status_code == 201:
			return destination_uri
		else:
			raise Exception('HTTP %s, could not move resource %s to %s' % (response.status_code, self.uri, destination_uri))
1043748
def copy(self):
        """"""
        return self.__class__(key=self._key, load=self._load, _set=set(self._set))
504452
def copy(self):
        """"""
        cpy = self.__class__()
        cpy._autostep = self._autostep
        cpy.padding = self.padding
        cpy.update(self)
        return cpy
1254611
def COOKIES(self):
        
        raw_dict = SimpleCookie(self.headers.get('Cookie',''))
        cookies = {}
        for cookie in six.itervalues(raw_dict):
            cookies[cookie.key] = cookie.value
        return cookies
812271
def from_httplib(cls, message, duplicates=('set-cookie',)): # Python 2
        """"""
        ret = cls(message.items())
        # ret now contains only the last header line for each duplicate.
        # Importing with all duplicates would be nice, but this would
        # mean to repeat most of the raw parsing already done, when the
        # message object was created. Extracting only the headers of interest 
        # separately, the cookies, should be faster and requires less
        # extra code.
        for key in duplicates:
            ret.discard(key)
            for val in message.getheaders(key):
                ret.add(key, val)
            return ret
234547
def copy(self):
        """"""
        new_cj = RequestsCookieJar()
        new_cj.set_policy(self.get_policy())
        new_cj.update(self)
        return new_cj
548550
def copy(self):
        
        kj = KeyJar()
        for issuer in self.owners():
            kj[issuer] = [kb.copy() for kb in self[issuer]]

        kj.verify_ssl = self.verify_ssl
        return kj
817776
def copy(self):
        
        return self.__class__(self.x, self.y, *self._args, **self._kwargs)