From 68a4308c3dec3fe58ab07fb32ce2bff84a86845e Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Sun, 24 Aug 2014 01:25:02 +0100 Subject: [PATCH] Dropped PSYCOPG_NEW_BOOLEAN flag Introduced in 2.0 beta 8, 2006 A.D. Went absolutely untouched in 8 years of refactoring, when Python 2.5 and PostgreSQL 8.1 roamed the earth. I would say it has stood the test of the time. --- psycopg/adapter_pboolean.c | 9 --------- setup.cfg | 3 +-- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/psycopg/adapter_pboolean.c b/psycopg/adapter_pboolean.c index 8a5950d8..c7e3b807 100644 --- a/psycopg/adapter_pboolean.c +++ b/psycopg/adapter_pboolean.c @@ -37,21 +37,12 @@ static PyObject * pboolean_getquoted(pbooleanObject *self, PyObject *args) { -#ifdef PSYCOPG_NEW_BOOLEAN if (PyObject_IsTrue(self->wrapped)) { return Bytes_FromString("true"); } else { return Bytes_FromString("false"); } -#else - if (PyObject_IsTrue(self->wrapped)) { - return Bytes_FromString("'t'"); - } - else { - return Bytes_FromString("'f'"); - } -#endif } static PyObject * diff --git a/setup.cfg b/setup.cfg index 83962bfb..86fdd42b 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,10 +1,9 @@ [build_ext] -define=PSYCOPG_NEW_BOOLEAN,HAVE_PQFREEMEM +define=HAVE_PQFREEMEM # PSYCOPG_DISPLAY_SIZE enable display size calculation (a little slower) # HAVE_PQFREEMEM should be defined on PostgreSQL >= 7.4 # PSYCOPG_DEBUG can be added to enable verbose debug information -# PSYCOPG_NEW_BOOLEAN to format booleans as true/false vs 't'/'f' # "pg_config" is required to locate PostgreSQL headers and libraries needed to # build psycopg2. If pg_config is not in the path or is installed under a