Commit Graph

1769 Commits

Author SHA1 Message Date
Daniele Varrazzo
c796bc2cbd Added test to verify copysize handling in copy_expert
Not an original psycopg2 bug but present in pure python implementation,
e.g. ctypes issue #25 and cffi issue #5.

https://github.com/mvantellingen/psycopg2-ctypes/issues/25
https://github.com/chtd/psycopg2cffi/pull/5
2013-05-06 10:48:10 +01:00
Daniele Varrazzo
a44db81d9b Skip tests on python implementations without getrefcount()
PyPy is one of these.
2013-05-06 10:39:24 +01:00
Daniele Varrazzo
bbe0bf955c A few docs fixes to the usage page 2013-05-01 22:40:19 +01:00
Daniele Varrazzo
1ff3ea0745 Dropped a lot of words from the front matter
Replaced with links to the types adaptation table and the extension docs.
2013-04-26 10:06:26 +01:00
Piotr Kasprzyk
31b6ec63f8 Fix multiple misspellings 2013-04-26 09:59:40 +01:00
Daniele Varrazzo
2eba97de70 Merge branch 'classifiers' 2013-04-21 21:44:57 +01:00
Daniele Varrazzo
4547753df0 Added explicit Python 2 and Python 3 classifiers
Not sure, but I suspect the "python3" page on PyPy in only based
on the Language :: Python :: 3 classifier, not the more specific ones
2013-04-21 21:43:55 +01:00
Saul Shanabrook
4de8b9577e Explicit Python Version Support
Used supported versions from http://initd.org/psycopg/docs/install.html
2013-04-21 21:35:58 +01:00
Daniele Varrazzo
fc2ca0d2e9 Make sure to return a bytes string from numeric range adapter 2013-04-21 20:30:50 +01:00
Daniele Varrazzo
d159dfea9d Merge branch 'solaris-round' 2013-04-21 18:39:30 +01:00
Daniele Varrazzo
fdc5dc750c Mention Solaris round fix in NEWS file 2013-04-21 18:37:19 +01:00
Daniele Varrazzo
e335eb98ce Long ifdef reformatted for readibility 2013-04-20 02:21:58 +01:00
Daniele Varrazzo
5d86d07618 Testing external script independent from psycopg implementation
Patch needed to run the test suite on psycopg2cffi or psycopg2ct.
2013-04-19 23:01:28 +01:00
Daniel Enman
558f7ad929 Remove extra || 2013-04-18 17:12:14 -03:00
Daniel Enman
cda0b6a8eb Solaris 10+, and illumos distros have round() 2013-04-18 16:59:26 -03:00
Daniele Varrazzo
711c092a79 The UUID adapter returns bytes instead of str in Python 3
Also added __conform__ method to the adapter.
2013-04-07 22:19:04 +01:00
Daniele Varrazzo
61d496b2ed Script to test ticket #58 moved into sandbox
We don't need it distributed in the sdist
2013-04-07 22:02:52 +01:00
Daniele Varrazzo
04c09b7b38 Dropped GPL license from source
It doesn't apply: leaving the LGPL only.
2013-04-07 22:02:45 +01:00
Daniele Varrazzo
1af4bd83c4 Stop distributing the compiled documentation with the source 2013-04-07 22:02:38 +01:00
Daniele Varrazzo
af7347473e Dropped stale entries from MANIFEST.in 2013-04-07 22:02:32 +01:00
Daniele Varrazzo
f2fbf18a05 Dropped psycopg 1 changelog
Also MANIFEST.in cleaned up from stale entries
2013-04-07 22:01:38 +01:00
Daniele Varrazzo
6d2f2676ad Bump to next dev version 2013-04-07 19:43:52 +01:00
Daniele Varrazzo
80e105c74d Merge branch 'devel' 2013-04-07 17:43:35 +01:00
Daniele Varrazzo
b448f822f4 Bump to release 2.5 2013-04-07 17:26:57 +01:00
Daniele Varrazzo
b214d10fff Use NULL instead of an empty string as PyObject_CallMethod format 2013-04-07 17:26:57 +01:00
Daniele Varrazzo
884a7f7db6 A couple of typos fixed 2013-04-07 16:05:36 +01:00
Daniele Varrazzo
2b554937f2 Dropped __all__ from modules
They were only used to generate docs with Epydoc, now largely forgotten.

Imports in extras cleaned up to expose the API only.
2013-04-07 02:59:30 +01:00
Daniele Varrazzo
d5d6a1f4c7 Enable by default the range typecasters
Otherwise it would have been enabled importing psycopg2.extras,
which is a surprising behaviour.
2013-04-07 02:37:55 +01:00
Daniele Varrazzo
9e15f54fe8 Added cursor_factory connection attribute and connect() parameter 2013-04-07 02:30:12 +01:00
Daniele Varrazzo
0e06addc9f Testing boilerplate unified in a single base class
The class makes a connection always available, allows creating
new connection and closes everything on tear down.
2013-04-07 00:23:30 +01:00
Daniele Varrazzo
408c76fdb6 Fixed build on windows
Will fail with error: initializer element is not constant
2013-04-06 01:34:12 +01:00
Daniele Varrazzo
d36024dc1f Use the Python heap for conn->dsn 2013-04-06 00:42:25 +01:00
Daniele Varrazzo
c63d623f65 Merge branch 'drop-py24' into devel 2013-04-05 01:29:25 +01:00
Daniele Varrazzo
beea32ef03 Use the Py_RETURN_NONE macro 2013-04-05 01:25:05 +01:00
Daniele Varrazzo
67c8250081 Added tp_clear method for objects with GC support 2013-04-05 01:05:12 +01:00
Daniele Varrazzo
1a93279fe7 Dropped bogus return in void function 2013-04-05 01:03:05 +01:00
Daniele Varrazzo
e14440d96d Dropped GC support for several objects
Non-containers don't need GC. It was half-baked anyway
as the tp_clear was often not set. Dropped tp_traverse too
for these objects as unused.
2013-04-05 01:02:47 +01:00
Daniele Varrazzo
95ff64d739 Dropped encoding attribute from list adapter 2013-04-05 00:35:02 +01:00
Daniele Varrazzo
6bc4b23af5 Static-type psycopg_escape_string connection parameter 2013-04-05 00:07:36 +01:00
Daniele Varrazzo
736a78f3f6 Avoid encoding strdup in qstring adapter
Dropped encoding parameter in the constructor: it is used
nowhere and not documented. Use directly the connection
encoding if available, else the previous latin1 fallback.
2013-04-05 00:00:42 +01:00
Daniele Varrazzo
7a5a226b49 Set a memory exception in psycopg_escape_string
...otherwise all the callers should set it.
2013-04-04 22:48:53 +01:00
Daniele Varrazzo
7328aaf0fb Dropped GC support from Xid and Notify types
These types are immutable and have only atomic types attributes, so it's
impossible to build loops out of them.
2013-04-02 01:50:31 +01:00
Daniele Varrazzo
5aafe38fd7 Some improvements to connection/cursor GC
Provide a tp_clear, make sure that GC_UnTrack is called before clearing.
2013-03-21 12:55:17 +00:00
Daniele Varrazzo
3b8abf3fc4 Clean the C members of Error in tp_dealloc instead of tp_clear
tp_clear should only be used to break the reference cycles. tp_clear was
causing a segfault because it was called twice (by the gc and by _dealloc) so
self->codec was freed twice.

Amazingly the double free was only causing a segfault on Python 3.3 (released
in late 2012) talking to Postgres 8.1 (released in 2005) in async mode... no
other combination crashed. Thank you buildbot.
2013-03-21 12:34:53 +00:00
Daniele Varrazzo
d5316d7eb2 PyType_GenericAlloc is the default allocator: no need to specify 2013-03-20 23:53:20 +00:00
Daniele Varrazzo
eb280c1da4 Better use of Py_CLEAR and implicit zeroed-out structures 2013-03-20 23:53:20 +00:00
Daniele Varrazzo
546927d44a Use wrap to fix names of decorated test methods
Decorators not using wrap() prevent running the test from command line, e.g.
with:

    python tests/__init__.py test_module.TestSuite.test_method
2013-03-20 23:53:20 +00:00
Daniele Varrazzo
31265e3439 Fixed broken test decorator preventing 3 tests to run 2013-03-20 23:53:19 +00:00
Daniele Varrazzo
b6873ee1ab Dropped support for Python 2.4 2013-03-20 23:40:13 +00:00
Daniele Varrazzo
e65392e0d8 PyType_GenericAlloc is the default allocator: no need to specify 2013-03-20 22:59:50 +00:00