Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gH6Kx-00079W-3q for psycopg@arkaria.postgresql.org; Mon, 29 Oct 2018 12:08:03 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gH6Kv-00055W-0L for psycopg@arkaria.postgresql.org; Mon, 29 Oct 2018 12:08:01 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1gH6Ku-00055P-Q0 for psycopg@lists.postgresql.org; Mon, 29 Oct 2018 12:08:00 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gH6Kr-0004st-Tq for psycopg@lists.postgresql.org; Mon, 29 Oct 2018 12:08:00 +0000 Received: by mail-lf1-x12b.google.com with SMTP id n26-v6so5816998lfl.1 for ; Mon, 29 Oct 2018 05:07:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XtAbwXfwfh4n75+rQ4Wn5lwTLIgXCn/Q9Dz22z579NY=; b=d1LEFA4gDdSNJxI363sLD4ImymoKIr8SOT+9QfrYpBQlBMlESQQN0V1gJBdsI4mtml iofzwfN+Qkyx+jehTcijX/sVZNaFSA5pZOGSX9xbu7w3K6vRsOPwxtwOp7EWU5Cjnr7t ECAL/mhJEs5Zf8rktrvDiBiWwfwvxUtSdsylwiFfRbt9tFrd7zcpfry/3z3H+K3wqRyJ AAFs8vc5WT9rlE/BEq+8RK7q2F8rIdP4RIvLYKKi+2wo4CkZdoqNBaf+PD2OrtBkEi/s QlhsxRIYfqSoSYeSTHGVHg6NMhMR5wPGFAVeLFx0676ilWwyNu6f6MltTbtDI4lhteGD 7zDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XtAbwXfwfh4n75+rQ4Wn5lwTLIgXCn/Q9Dz22z579NY=; b=Z1Xexg15AX7v4ojJKWKIU6ES+X4b0CL5guOpZta4xG+Xq7F8/tXBcuCznfQ75oXbOK 9tNiwxonozRNdT9mzUnDthrzS9T+M/Oetc2nOOZi618qCeVikS2maq3CVP0oxDrH3m7s Ad9YdsC0qRz0LYzlsiwqiyag/w/3uFoD1Jhgc68EALfQ9I0EBqZfHZphghZB/O2QHB65 S49rohyEmKmk+CqYX1U8WKhkm/KK8ZKT9ACY0KBAFahR4Mo4fyswGjRkzzJioM6/WbHS uw8yBaoZmh4OqrIzsV4trVuWVj3xa+SZf+JTY3vIW3MPL9y41TY0MrRfLpxWOxvSg3rL Hjjg== X-Gm-Message-State: AGRZ1gKVijYRNIluix9YBQXeC1T/lgbQiySVxS2XAvOxdVnP+EbuWCKf jhUo2t60Z8nMUcOHsMceDbMDC6BGD7bikdQ3wlk= X-Google-Smtp-Source: AJdET5fj6ozAuxR6V/KK2YQCyoD0DzxPf9LqYY/BRlOlax+yhnlqZjfPMtfKntL+oRiDrTwazM7FOccSZAdnJICaUu8= X-Received: by 2002:a19:4d8d:: with SMTP id a135mr8576071lfb.80.1540814876500; Mon, 29 Oct 2018 05:07:56 -0700 (PDT) MIME-Version: 1.0 References: <1878453370.14916776.1539604797985@mail.yahoo.com> <62b46b76-ce7f-6b89-b5ad-d0f2c2533432@dndg.it> <1820701010.20861820.1540152265403@mail.yahoo.com> <1390677301.27162879.1540762541620@mail.yahoo.com> In-Reply-To: From: Daniele Varrazzo Date: Mon, 29 Oct 2018 12:07:44 +0000 Message-ID: Subject: Re: Feature branches merged to master for 2.8 release To: Federico Di Gregorio Cc: psycopg@lists.postgresql.org Content-Type: text/plain; charset="UTF-8" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, Oct 29, 2018 at 11:47 AM Federico Di Gregorio wrote: > I agree with > Daniele here but the fact that the *content* of the capsule, i.e., the > PGconn* can change depending of the libpq version you're loading is > pretty scary. I'd like to warn the client code (Python warnings to be > suppressed? mm..) but just prepending an underscore to the method name > doesn't mean much. If we add `get_native_connection()` then it becomes > an official and supported psycopg extensions and doesn't make sense to > mark it as private API. The PGconn is an opaque structure: its correct usage is through the libpq functions. See also the note in : "libpq application programmers should be careful to maintain the PGconn abstraction. Use the accessor functions described below to get at the contents of PGconn. Reference to internal PGconn fields using libpq-int.h is not recommended because they are subject to change in the future." If the structure changes and someone gets bitten by it it's not really related to how much private the method is. -- Daniele