Detach the source from its customer.
499988
def detach(self):
		

		# First, wipe default source on all customers that use this.
		Customer.objects.filter(default_source=self.id).update(default_source=None)

		try:
			# TODO - we could use the return value of sync_from_stripe_data
			#  or call its internals - self._sync/_attach_objects_hook etc here
			#  to update `self` at this point?
			self.sync_from_stripe_data(self.api_retrieve().detach())
			return True
		except (InvalidRequestError, NotImplementedError):
			# The source was already detached. Resyncing.
			# NotImplementedError is an artifact of stripe-python<2.0
			# https://github.com/stripe/stripe-python/issues/376
			self.sync_from_stripe_data(self.api_retrieve())
			return False
1121258
def detach(self, filt, view=None):
        
        if view is None:
            self._vshare.filters.remove(filt)
            for view in self._vshare.views.keys():
                filt._detach(view)
        else:
            view._filters.remove(filt)
            filt._detach(view)
1174146
def disconnect(self, cback, subscribers=None, instance=None):
        
        if subscribers is None:
            subscribers = self.subscribers
        # wrapper
        if self._fdisconnect is not None:
            def _disconnect(cback):
                self._disconnect(subscribers, cback)

            notify = partial(self._notify_one, instance)
            if instance is not None:
                result = self._fdisconnect(instance, cback, subscribers,
                                           _disconnect, notify)
            else:
                result = self._fdisconnect(cback, subscribers, _disconnect,
                                           notify)
            if inspect.isawaitable(result):
                result = pull_result(result)
        else:
            self._disconnect(subscribers, cback)
            result = None
        return result
985493
def stopProducing(self):
        
        _legacy_twisted_log.msg("Disconnecting from the AMQP broker")
        yield self.pauseProducing()
        yield self.close()
        self._consumers = {}
        self._channel = None
68769
def remove_connection(self, connection):
        """"""
        if not self._closing:
            self.connections.remove(connection)
            logger.debug("removed connection")
443067
def release(self, conn):
        """"""
        self._pool_lock.acquire()
        self._pool.put(ConnectionWrapper(self._pool, conn))
        self._current_acquired -= 1
        self._pool_lock.release()
611823
public void detach() {
        if (listener != null) {
            contextFactory.removeListener(listener);
            contextFactory = null;
            listener = null;
        }
    }
367522
def release(self, connection):
        ""
        self._checkpid()
        if connection.pid != self.pid:
            return
        self._in_use_connections.remove(connection)
        # discard connection with unread response
        if connection.awaiting_response:
            connection.disconnect()
            self._created_connections -= 1
        else:
            self._available_connections.append(connection)
584658
def detach(options = {})
      options = Aws::Util.deep_merge(options,
        auto_scaling_group_name: @group_name,
        load_balancer_names: [@name]
      )
      resp = @client.detach_load_balancers(options)
      resp.data
    end
1328495
def cli(env, account_id, origin_id):
    """"""

    manager = SoftLayer.CDNManager(env.client)
    manager.remove_origin(account_id, origin_id)
803914
def disconnect(self, receipt=None, headers=None, **keyword_headers):
        
        Protocol12.disconnect(self, receipt, headers, **keyword_headers)
        self.transport.stop()
616277
def detach(self):
        
        if not self._closed:
            del self._as_parameter_
            self._closed = True
            self._ptr = None
580880
def detach(self):
        
        self._client.post('{}/detach'.format(Volume.api_endpoint), model=self)

        return True
1253528
@RequestMapping(path = "/{customerId}", method = RequestMethod.DELETE)
    public ResponseEntity removeCustomer(@PathVariable("customerId") Long customerId){
        boolean succeed = customerService.removeCustomer(customerId);
        if(succeed){
            return new ResponseEntity(HttpStatus.OK);
        }else{
            return new ResponseEntity(HttpStatus.NOT_FOUND);
        }
    }
1277658
def pop_source(self):
        ""
        self.instream.close()
        (self.infile, self.instream, self.lineno) = self.filestack.popleft()
        self.state = ' '
518703
def unstore(self, key, pk, value):
        

        self.connection.zrem(key, pk)
1073739
def release(self):
        """"""
        with self._lock:
            if not self._locked:
                raise RuntimeError('lock not currently held')
            elif self._reentrant and self._owner is not fibers.current():
                raise RuntimeError('lock not owned by this fiber')
            self._release()