1Metadata-Version: 1.1
2Name: psycopg2cffi
3Version: 2.9.0
4Summary: .. image:: https://travis-ci.org/chtd/psycopg2cffi.svg?branch=master
5Home-page: http://github.com/chtd/psycopg2cffi
6Author: Konstantin Lopuhin
7Author-email: konstantin.lopuhin@chtd.ru
8License: LGPL
9Description: .. image:: https://travis-ci.org/chtd/psycopg2cffi.svg?branch=master
10            :target: https://travis-ci.org/chtd/psycopg2cffi
11
12        .. contents::
13
14        An implementation of the psycopg2 module using cffi.
15        The module is currently compatible with Psycopg 2.5.
16
17        Installation
18        ------------
19
20        You can  install ``psycopg2cffi`` from PyPI::
21
22            pip install psycopg2cffi
23
24        Or from source::
25
26            python setup.py install
27
28        Installation requirements are the same as for ``psycopg2`` - you must
29        have ``libpq`` headers, ``pg_config`` somewhere on your ``$PATH``,
30        Python development headers (``python-dev`` or similar), and ``ffi-dev``
31        for ``cffi``.
32        Installation was tested on Ubuntu 12.04, Ubuntu 14.04, CentOS (RHEL 5.0),
33        OS X 10.8 - 10.10.
34        It should be possible to make it work on Windows, but I did not test it.
35
36        This module works under CPython 2.7+, CPython 3.5+, PyPy 2 and PyPy 3
37        (PyPy version should be at least 2.0, which is ancient history now).
38
39        To use this package with Django or SQLAlchemy invoke a compatibility
40        hook (for example, from ``settings.py`` in case of Django, or
41        from a ``psycopg2.py`` file in site-packages of your virtual env)::
42
43            from psycopg2cffi import compat
44            compat.register()
45
46        This will map ``psycopg2cffi`` to ``psycopg2``, so now any code that
47        does ``import psycopg2`` will use ``psycopg2cffi``.
48
49        Submit issues to https://github.com/chtd/psycopg2cffi/issues
50
51        If you notice that ``psycopg2cffi`` under PyPy is noticeably slower than
52        ``psycopg2`` under CPython, submit this to the issues too - it should
53        not be the case.
54
55        This is a port of (Michael van Tellingen port
56        https://github.com/mvantellingen/psycopg2-ctypes
57        of Alex Gaynor's RPython port
58        (https://bitbucket.org/alex_gaynor/pypy-postgresql/overview) of psycopg2 to
59        Python + ctypes) to cffi.
60
61        The main motivation for a port was speed - the writeup with benchmarks
62        is here: http://chtd.ru/blog/bystraya-rabota-s-postgres-pod-pypy/?lang=en
63
64        Development
65        -----------
66
67        To run tests, install ``pytest`` and run them with::
68
69            py.test psycopg2cffi
70
71        Note that for ``cffi>=1.0`` you need to run ``python setup.py develop``
72        to rebuild ``_libpq.so`` (if you changed bindings).
73        And for ``cffi<1.0`` (only PyPy 2.5 and below) you need to run
74        ``python setup.py install`` once to generate ``psycopg2cffi/_config.py``,
75        otherwise each import will run config and notify tests will fail.
76
77        You can also run Django tests. You need to checkout Django source, add
78        psycopg2 compat as described above, and, from the root of the Django checkout::
79
80            PYTHONPATH=`pwd` ./tests/runtests.py \
81                --settings=psycopg2cffi.tests.psycopg2_tests.testconfig
82
83        In case of problems with Django tests, see official Django docs
84        https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#running-the-unit-tests
85
86        Release notes
87        -------------
88
89        2.9.0 (27 Jan 2021)
90        +++++++++++++++++++
91
92        New features:
93
94        - Add execute_batch and execute_values to psycopg2cffi.extras by @fake-name in #98
95        - psycopg2cffi.extras: add fetch argument to execute_values() by @intelfx in #119
96
97        Bug fixes:
98
99        - Fix for async keyword argument when creating a connection by @donalm in #104
100        - Allow adapters to be passed as arguments of cursor's execute() by @amigrave in #107
101        - Fix installation with old cffi by dand-oss in #116
102
103        Test changes:
104
105        - Dropped support for python 2.6, 3.3, 3.4 by @thedrow in #109
106        - Added support for python 3.8 by @thedrow in #108
107
108        2.8.1 (31 July 2018)
109        ++++++++++++++++++++
110
111        Release date added
112
113        2.8.0 (31 July 2018)
114        ++++++++++++++++++++
115
116        Python 3.7 support by unimariJo (#92) and farrokhi (#101).
117        ``async_`` should be used instead of ``async`` in public APIs
118        (but the change is backwards compatible,
119        ``async`` is still supported as an alias).
120
121
122        2.7.7 (13 November 2017)
123        ++++++++++++++++++++++++
124
125        Bugfixes:
126
127        - Support installation under Postgres 10 by jimbattin (#90)
128
129
130        2.7.6 (11 August 2017)
131        ++++++++++++++++++++++
132
133        Bugfixes:
134
135        - Named cursors fix (affects newer Django) by danchr (#81)
136        - Python 3 fixes in extras by avanov (#83)
137        - Null check added in fast parser utils by malthe (#79)
138
139
140        2.7.5 (31 October 2016)
141        +++++++++++++++++++++++
142
143        Windows wheels support added by ryoyoko (#69).
144
145        Bugfixes:
146
147        - Non-ascii notice messages fixed by asterite3 (#72)
148        - AsIs with non-text/bytes fixed by jinty (#64)
149        - Silent failures in copy_from and copy_to fixed by gobbledygook88 (#62)
150        - Infinite recursion error fixed in errorcodes.lookup (#68)
151        - Typos in README fixed by PavloKapyshin (#66)
152
153
154        2.7.4 (01 April 2016)
155        +++++++++++++++++++++
156
157        Fix a regression with error handling when establishing the connection (#61)
158
159
160        2.7.3 (29 February 2016)
161        ++++++++++++++++++++++++
162
163        Fix a bug with non-ascii error messages (#56)
164
165
166        2.7.2 (06 August 2015)
167        ++++++++++++++++++++++
168
169        Fixes for FreeBSD support by Andrew Coleman
170
171
172        2.7.1 (20 June 2015)
173        ++++++++++++++++++++
174
175        JSONB support
176
177
178        2.7.0 (21 May 2015)
179        +++++++++++++++++++
180
181        Use cffi 1.0, which makes installation more robust, and import is faster.
182        cffi<1.0 is used now only for PyPy 2.5 or below.
183
184
185        2.6.1 (08 Feb 2015)
186        +++++++++++++++++++
187
188        Fixing things that were broken in 2.6.0:
189
190        - Fix issue #31 - bigint on 32-bit
191        - Fix issue #32 - register_type and unicode
192
193
194        2.6.0 (24 Jan 2015)
195        +++++++++++++++++++
196
197        - Python 3 support
198        - A bit faster reading of int, long, float, double fields
199
200        2.5.1 (14 May 2014)
201        +++++++++++++++++++
202
203        - Small bugfixes
204
205        2.5.0 (3 Sep 2013)
206        ++++++++++++++++++
207
208        - Bugfixes and a lot of compatibility work by Daniele Varrazzo
209
210
211        Older releases lack release notes, first release of psycopg2cffi around Nov 2012.
212
213Platform: any
214Classifier: Development Status :: 3 - Alpha
215Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)
216Classifier: Intended Audience :: Developers
217Classifier: Programming Language :: Python :: 2.7
218Classifier: Programming Language :: Python :: 3.5
219Classifier: Programming Language :: Python :: 3.6
220Classifier: Programming Language :: Python :: 3.7
221Classifier: Programming Language :: Python :: 3.8
222Classifier: Programming Language :: Python :: Implementation :: CPython
223Classifier: Programming Language :: Python :: Implementation :: PyPy
224Classifier: Programming Language :: SQL
225Classifier: Topic :: Database
226Classifier: Topic :: Database :: Front-Ends
227