mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-29 12:23:42 +03:00
Applied patches to fix docstrings.
This commit is contained in:
parent
8e453ce176
commit
5715a74388
|
@ -1,3 +1,9 @@
|
||||||
|
2005-10-17 Federico Di Gregorio <fog@initd.org>
|
||||||
|
|
||||||
|
* psycopg/connection_type.c: fixed docstring for .cursor().
|
||||||
|
|
||||||
|
* psycopg/psycopgmodule.c: added useful docstring for .connect().
|
||||||
|
|
||||||
2005-10-08 Federico Di Gregorio <fog@initd.org>
|
2005-10-08 Federico Di Gregorio <fog@initd.org>
|
||||||
|
|
||||||
* psycopg/connection_type.c: isolation level upper bound set to 2.
|
* psycopg/connection_type.c: isolation level upper bound set to 2.
|
||||||
|
|
8
NEWS
8
NEWS
|
@ -5,6 +5,14 @@ What's new in psycopg 2.0 rc 1
|
||||||
|
|
||||||
* Fixed all known bugs.
|
* Fixed all known bugs.
|
||||||
|
|
||||||
|
* The initial isolation level is now read from the server and
|
||||||
|
.set_isolation_level() now takes values defined in psycopg2.extensions.
|
||||||
|
|
||||||
|
* .callproc() implemented as a SELECT of the given procedure.
|
||||||
|
|
||||||
|
* Better docstrings for a few functions/methods.
|
||||||
|
|
||||||
|
|
||||||
What's new in psycopg 2.0 beta 4
|
What's new in psycopg 2.0 beta 4
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
|
|
|
@ -37,10 +37,11 @@
|
||||||
/* cursor method - allocate a new cursor */
|
/* cursor method - allocate a new cursor */
|
||||||
|
|
||||||
#define psyco_conn_cursor_doc \
|
#define psyco_conn_cursor_doc \
|
||||||
"cursor(factory=psycopg.cursor) -> new cursor\n\n" \
|
"cursor(cursor_factory=psycopg.cursor) -> new cursor\n\n" \
|
||||||
"Return a new cursor. The 'factory' argument can be used to create\n" \
|
"Return a new cursor. The 'cursor_factory' argument can be used to\n" \
|
||||||
"non-standard cursors by passing a class different from the default.\n" \
|
"create non-standard cursors by passing a class different from the\n" \
|
||||||
"Note that the new class *should* be a sub-class of psycopg.cursor."
|
"default. Note that the new class *should* be a sub-class of\n" \
|
||||||
|
"'psycopg2.cursor'.\n"
|
||||||
|
|
||||||
static PyObject *
|
static PyObject *
|
||||||
psyco_conn_cursor(connectionObject *self, PyObject *args, PyObject *keywds)
|
psyco_conn_cursor(connectionObject *self, PyObject *args, PyObject *keywds)
|
||||||
|
|
|
@ -59,7 +59,27 @@ PyObject *psycoEncodings = NULL;
|
||||||
PyObject *decimalType = NULL;
|
PyObject *decimalType = NULL;
|
||||||
|
|
||||||
/** connect module-level function **/
|
/** connect module-level function **/
|
||||||
#define psyco_connect_doc "connect(dsn, ...) -> new connection object"
|
#define psyco_connect_doc \
|
||||||
|
"connect(dsn, ...) -> new connection object\n\n" \
|
||||||
|
"This function supports two different but equivalent sets of arguments.\n" \
|
||||||
|
"A single data source name or 'dsn' string can be used to specify the\n" \
|
||||||
|
"connection parameters, as follows:\n\n" \
|
||||||
|
" psycopg2.connect(\"dbname=xxx user=xxx ...\")\n\n" \
|
||||||
|
"If 'dsn' is not provided it is possible to pass the parameters as\n" \
|
||||||
|
"keyword arguments; e.g.,\n\n" \
|
||||||
|
" psycopg2.connect(database='xxx', user='xxx', ...)\n\n" \
|
||||||
|
"The full list of available parameters is:\n\n" \
|
||||||
|
" dbname -- database name (only in 'dsn')\n" \
|
||||||
|
" database -- database name (only as keyword argument)\n" \
|
||||||
|
" host -- host address (defaults to UNIX socket if not provided)\n" \
|
||||||
|
" port -- port number (defaults to 5432 if not provided)\n" \
|
||||||
|
" user -- user name used to authenticate\n" \
|
||||||
|
" password -- password used to authenticate\n" \
|
||||||
|
" sslmode -- SSL mode (see PostgreSQL documentation)\n\n" \
|
||||||
|
"If the 'connection_factory' keyword argument is not provided this\n" \
|
||||||
|
"function always return an instance of the 'psycopg2.connection' class.\n" \
|
||||||
|
"Else the given sub-class of 'psycopg2.connection' will be used to\n" \
|
||||||
|
"instantiate the connection object.\n"
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_psyco_connect_fill_dsn(char *dsn, char *kw, char *v, int i)
|
_psyco_connect_fill_dsn(char *dsn, char *kw, char *v, int i)
|
||||||
|
@ -241,6 +261,7 @@ static encodingPair encodings[] = {
|
||||||
{"SQL_ASCII", "ascii"},
|
{"SQL_ASCII", "ascii"},
|
||||||
{"LATIN1", "latin_1"},
|
{"LATIN1", "latin_1"},
|
||||||
{"UNICODE", "utf_8"},
|
{"UNICODE", "utf_8"},
|
||||||
|
{"UTF8", "utf_8"},
|
||||||
/* some compatibility stuff */
|
/* some compatibility stuff */
|
||||||
{"latin-1", "latin_1"},
|
{"latin-1", "latin_1"},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user