Commit Graph

1851 Commits

Author SHA1 Message Date
Erik Lee
e9f54a2d6e Correct exausted -> exhausted typo 2014-11-17 17:01:00 +00:00
Federico Di Gregorio
096e0729d5 Merge pull request #272 from yoloseem/timetz
Cast time into timetz when the tzinfo field is set.
2014-11-13 10:07:02 +01:00
Hyunjun Kim
4dbda02145 Cast time into timetz when the tzinfo field is set. 2014-11-13 17:32:06 +09:00
Federico Di Gregorio
0d553269d5 Merge pull request #271 from tokheim/master
Correction to type adaption example

It is OK for an adapted object to return the escaped string on 
__str__ calls but getquoted() is the canonical method.
2014-11-03 21:21:10 +01:00
Asmund Tokheim
ab4afd0e2f Correction to type adaption example, making it more transparent 2014-11-02 14:15:51 +01:00
Daniele Varrazzo
1b48033345 Don't try to close the server cursor in error state
`close()` is implicitly called by `__exit__()`, so an exit on error
would run a query on a inerr connection, causing another exception
hiding the original one. The fix is on `close()`, not on `__exit__()`,
because the semantic of the latter is simply to call the former.

Closes #262.
2014-09-16 06:57:34 +01:00
Daniele Varrazzo
48a32b766b In 2010 I couldn't speak English 2014-09-16 06:57:34 +01:00
Tomer Chachamu
6de7315210 Fix typo in docs 2014-09-01 16:29:38 +01:00
Daniele Varrazzo
b4d38c455c Don't need to build the env for a sdist
After 2.5 we are not releasing the html docs in the sdist anymore.
2014-09-01 16:29:38 +01:00
Daniele Varrazzo
7faa06ce0b Added scripts to release and upload docs 2014-09-01 16:29:38 +01:00
Daniele Varrazzo
9fdfa86200 Release notes cleanup before releasing 2.4.5 2014-08-31 03:06:50 +01:00
Daniele Varrazzo
6210af2763 Fixed excessively strict notices test
Failing with PG 9.4 because it generates other debug messages during the
test run (rehashing catalog cache).
2014-08-31 03:06:33 +01:00
Daniele Varrazzo
8e06a51884 Added plural version of the tickets role 2014-08-31 03:05:03 +01:00
Daniele Varrazzo
7d81c48849 Point tickets to GitHub instead of Lighthouse
Keep into account the numbers reshuffling: Lighthouse bugs with a number
matching a GitHub merge request are shifted ahead.
2014-08-31 03:05:03 +01:00
Daniele Varrazzo
37d80f2c03 Use the readme as PyPI desctiption 2014-08-31 02:59:49 +01:00
Daniele Varrazzo
6705e4051d Dropped creation of errcodes with missing spec field
On further inspection these names are just aliases for values already
defined: we don't need the duplication.
2014-08-28 02:17:57 +01:00
Daniele Varrazzo
ccc30e1877 Clear adapters in test to maintain reference count 2014-08-28 02:17:54 +01:00
Daniele Varrazzo
2d601ef157 Fixed memory leak with large objects
Deallocating closed large objects failed to decrement the connection
refcount. The fact the lobject is closed doesn't matter for refcount.
Issue detected by the always useful scripts/refcounter.py

With an extra bit of unrequested whitespace love.
2014-08-28 02:17:52 +01:00
Daniele Varrazzo
ea54aa77ed Added test to verify _psycopg can be imported 2014-08-28 02:17:49 +01:00
Daniele Varrazzo
54d904138d Don't import psycopg2.tz into the C extension
This makes possible to import _psycopg directly, after adding the
package directory to the pythonpath. This enables hacks such as:

    sys.path.insert(0, '/path/to/psycopg2')
    import _psycopg
    sys.modules['psycopg2._psycopg'] = _psycopg
    sys.path.pop(0)

which can work around e.g. the problem of #201, freeze that cannot
freeze psycopg2. Well, freeze cannot freeze it because it's just not
designed to deal with C extensions. At least now the frozen application
can hack the pythonpath and work around the limitation by importing
_psycopg as above and then doing the rest of the imports normally.

Keeping long-lived references to python objects is bad anyway: the
tz module couldn't be reloaded before.
2014-08-28 02:17:46 +01:00
Daniele Varrazzo
df9fbc515d Direct link to the install docs in the readme 2014-08-24 23:33:14 +01:00
Daniele Varrazzo
f7ee006bef Use virtualenv as build environment for the docs 2014-08-24 23:11:07 +01:00
Daniele Varrazzo
4a4e0d8f9a Self-updating copyright year in docs 2014-08-24 23:07:22 +01:00
Daniele Varrazzo
c1da93a7b2 Document we known 9.4 errorcodes 2014-08-24 22:11:21 +01:00
Daniele Varrazzo
b8b15637aa Take the PYTHONPATH into account when building the docs 2014-08-24 22:11:02 +01:00
Daniele Varrazzo
2ad67ee56e Move the extras module up in the docs
It is more interesting than `tz` and `pool`.
2014-08-24 22:10:24 +01:00
Daniele Varrazzo
843de765a1 Fixed doc example about Error attributes
Catch the Error, not everything!

Also, whitespaces.
2014-08-24 22:08:33 +01:00
Daniele Varrazzo
afdb7422fb Merge branch 'clean-text-files' 2014-08-24 02:06:27 +01:00
Daniele Varrazzo
c0e94ad01f Dropped outdated HACKING file 2014-08-24 02:06:09 +01:00
Daniele Varrazzo
2be26804d3 Dropped content from the INSTALL file
The docs have it right.
2014-08-24 02:06:09 +01:00
Daniele Varrazzo
d8bbaf0481 Added info about running the test suite in the docs
They were in the INSTALL file, which is quite out-of-date now.
Also fixed a couple of other things.
2014-08-24 02:06:09 +01:00
Daniele Varrazzo
353b36c657 Readme cleaned up and converted to reST
Dropped outdated info and references to the INSTALL, which is less
up-to-date than the docs.

Converted to reST to have it prettier on GitHub.
2014-08-24 02:06:09 +01:00
Daniele Varrazzo
0ea7798122 Merge branch 'drop-flags' 2014-08-24 02:05:23 +01:00
Daniele Varrazzo
1d729ab40e Dropped HAVE_PQFREEMEM flag
It was necessary before PG 7.4, in versions which have long been unsupported.
2014-08-24 01:43:12 +01:00
Daniele Varrazzo
68a4308c3d 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.
2014-08-24 01:25:02 +01:00
Daniele Varrazzo
6e841a41e6 Dropped PSYCOPG_EXTENSIONS flag
Building without extensions has been long broken and nobody really cares
about a pure-DBAPI implementation (which could be created using a wrapper
instead).
2014-08-23 19:30:48 +01:00
Daniele Varrazzo
6a5f778361 Merge branch 'withhold-transactions' 2014-08-21 05:55:11 +01:00
Daniele Varrazzo
d20c03310d Document WITH HOLD corrections. 2014-08-21 05:53:07 +01:00
Alexey Borzenkov
13b0852619 Allow using named with hold cursors in autocommit 2014-08-21 05:35:11 +01:00
Daniele Varrazzo
c81522079e Added test to verify withhold cursors work in autocommit 2014-08-21 05:35:11 +01:00
Alexey Borzenkov
478e66f761 No implicit transaction on named cursor close
Also, don't start an implicit transaction when fetching with
named with hold cursor, since it already returns results
from a previously committed transaction.
2014-08-21 05:35:10 +01:00
Daniele Varrazzo
283a422b4d Added test to verify withhold transaction behaviour
A withhold cursor can read its data when the transaction is closed, so
it shouldn't start a new one upon movement/close.
2014-08-21 05:35:10 +01:00
Daniele Varrazzo
a2b01cdf42 Dropped simple type wrapper functions
These functions don't need to exist: exposing the type in the module is
enough. It is actually better as one may use isinstance and such.
2014-08-15 02:54:31 +01:00
Daniele Varrazzo
1b322a9b19 Fixed segfault in List function
This function is never called: it segfaults 100%. To be removed.
2014-08-15 02:54:25 +01:00
Daniele Varrazzo
95165cef7d Dropped almost-no-op customized objects repr()
The default repr is enough: it prints <TypeName at 0xADDR> instead of
<TypeName object at 0xADDR>.

The only people being hurt by this change are the ones using doctests:
they deserve it.
2014-08-15 02:54:10 +01:00
Daniele Varrazzo
669e787919 Name the types after the module they are exposed from 2014-08-15 01:47:19 +01:00
Daniele Varrazzo
31d07e5029 Scrape PostgreSQL 9.4 error codes table too
No new error code found as of 9.4 beta2.
2014-08-13 02:44:59 +01:00
Daniele Varrazzo
41a083cec3 Convert pool arguments to int
Failing to do so may cause dangerous misbehaviours such as an unbounded
pool (because of lame comparison operators in Python 2).

Fix ticket #220.
2014-08-13 02:39:16 +01:00
Daniele Varrazzo
c475a0db95 Document PostgreSQL 9.4 as supported
Actually there is a test failing in the test suite in PG 9.4beta2, but
it's probably because the default logging level is to DEBUG. Will wait
for the final release to check if the test is to be fixed. All other
tests pass no problem.
2014-08-13 02:09:04 +01:00
Daniele Varrazzo
0b95194f74 Merge branch 'jsonb' 2014-08-13 02:03:11 +01:00