private function to patch this request. This function
        could be called before/after preparation.

        :param dict opt: options, used options would be popped. Refer to Request.opt_* for details.
323192
def _patch(self, opt={}):
        
        opt_netloc = opt.pop(Request.opt_url_netloc, None)
        opt_scheme = opt.pop(Request.opt_url_scheme, None)
        if opt_netloc or opt_scheme:
            scheme, netloc, path, params, query, fragment = six.moves.urllib.parse.urlparse(self.__url)
            self.__url = six.moves.urllib.parse.urlunparse((
                opt_scheme or scheme,
                opt_netloc or netloc,
                path,
                params,
                query,
                fragment
            ))

            logger.info('patching url: [{0}]'.format(self.__url))
367627
def _patched_method(self, method, *args, **kwargs):
        
        self._validate()
        result = method(*args, **kwargs)
        self._validate()
        return result
314349
function (opts) {
	this.env = opts.env;
	this.app = opts.app;
	this.jsonP = opts.jsonP;
	_(this).bindAll('errResponse', 'printError', 'productionLogging', 'devLogging', 'log');
}
21042
def get_patch_op(self, keypath, value, op='replace'):
        
        if isinstance(value, bool):
            value = str(value).lower()
        return {'op': op, 'path': '/*/*/{}'.format(keypath), 'value': value}
310774
def patch(callback=None, path=None, method=Method.PATCH, resource=None, tags=None, summary="Patch specified resource.",
          middleware=None):
    # type: (Callable, Path, Methods, Resource, Tags, str, List[Any]) -> Operation
    
    def inner(c):
        op = ResourceOperation(c, path or PathParam('{key_field}'), method, resource, tags, summary, middleware,
                               full_clean=False, default_to_not_supplied=True)
        op.responses.add(Response(HTTPStatus.OK, "{name} has been patched."))
        op.responses.add(Response(HTTPStatus.BAD_REQUEST, "Validation failed.", Error))
        op.responses.add(Response(HTTPStatus.NOT_FOUND, "Not found", Error))
        return op
    return inner(callback) if callback else inner
577055
def do_opt(self, *args, **kwargs):
        
        args = list(args)
        if not args:
            largest = 0
            keys = [key for key in self.conf if not key.startswith("_")]
            for key in keys:
                largest = max(largest, len(key))
            for key in keys:
                print("%s : %s" % (key.rjust(largest), self.conf[key]))
            return
        option = args.pop(0)
        if not args and not kwargs:
            method = getattr(self, "getopt_" + option, None)
            if method is None:
                self.getopt_default(option)
            else:
                method()
        else:
            method = getattr(self, "opt_" + option, None)
            if method is None:
                print("Unrecognized option %r" % option)
            else:
                method(*args, **kwargs)
                self.save_config()
643769
def prepare_request(self, **kwargs):
        

        if self.transport is None:
            self.setup_transport(self.transport_param)
        self.reset()
        self.request_counter = next(REQUEST_COUNTER)
        if kwargs:
            self.setup(**kwargs)
        if self.proxylist.size() and self.config['proxy_auto_change']:
            self.change_proxy()
        self.request_method = self.detect_request_method()
        self.transport.process_config(self)
540436
def patch(*args, **kwargs):
    
    from caliendo.patch import patch as p
    return p(*args, **kwargs)
1000915
def on_patch(resc, req, resp, rid):
    

    signals.pre_req.send(resc.model)
    signals.pre_req_update.send(resc.model)

    props = req.deserialize()
    model = find(resc.model, rid)

    from_rest(model, props)
    goldman.sess.store.update(model)

    props = to_rest_model(model, includes=req.includes)
    resp.last_modified = model.updated
    resp.serialize(props)

    signals.post_req.send(resc.model)
    signals.post_req_update.send(resc.model)
1257962
def patch_requests():
    
    config.create_config_directory()
    ca_certs_file = config.CERT_FILE
    ca_certs_contents = requests.__loader__.get_data('requests/cacert.pem')

    should_write_certs = True

    if os.path.isfile(ca_certs_file):
        with open(ca_certs_file, 'rb') as f:
            existing_certs = f.read()
            if existing_certs != ca_certs_contents:
                should_write_certs = True
                print("Updating local SSL certificates")
            else:
                should_write_certs = False

    if should_write_certs:
        with open(ca_certs_file, 'wb') as f:
            f.write(ca_certs_contents)

    os.environ['REQUESTS_CA_BUNDLE'] = ca_certs_file
262234
def update(opts)
      opts = opts.merge(:option_id => self.option_id)
      Twocheckout::API.request(:post, 'products/update_option', opts)
      response = Twocheckout::API.request(:get, 'products/detail_option', opts)
      Option.new(response['option'][0])
    end
576308
def handle_option(self, opt):
        """"""
        self.options.append(opt)
        log.debug('options: %s', self.options)
310731
function patch(obj, method, optionsArgIndex) {
    var orig = obj[method];
    if (!orig) return;
    obj[method] = function () {
      var opts = arguments[optionsArgIndex];
      var file = null;
      if (opts) {
        file = typeof opts == 'string' ? opts : opts.filename;
      }
      if (file) callback(file);
      return orig.apply(this, arguments);
    };
  }
608631
def start_with(self, request):
        

        HTTPRequestHelper.patch_with_options(request, self.__options)
        self.queue.add_request(request)

        self.__crawler_start()
1170985
def required(field):
    

    def wrap(f):
        def wrappedf(*args):
            result = f(*args)
            if result is None or result == "":
                raise Exception(
                    "Config option '%s' is required." % field)
            else:
                return result
        return wrappedf
    return wrap
537729
def patch(self, url, data=None, **kwargs):
        """"""
        return requests.patch(url, data=data, headers=self.add_headers(**kwargs))
917677
function replacerFactory(opt) {
    function replacer(key, value) {

        if (typeof value === 'function') {
            if (opt.functionDetail) {
                return value.toString()
            } else {
                return `function ${value.name}() {...}`
            }
        }
        return value
    }

    return replacer
}