summaryrefslogtreecommitdiff
path: root/python/skytools
AgeCommit message (Collapse)Author
2011-12-29dbservice.TableAPI: cast id to int8Marko Kreen
This makes possible to use prepared plans with tapi.
2011-12-29querybuilder: take type from last ':'Marko Kreen
this allows ':' in variable name
2011-12-22dbservice.make_record: convert list to pgarrayMarko Kreen
This makes the behaviour compatible with 8.3 plpython, with did not know arrays and returned text strings. More general solution would be to use urlenc arrays (same key repeats), except that not general enough - there is no transparent way to encode lists with 0 and 1 elements. So caller must always be aware whether a key is list or not. Thus no advantages over this pgarray solution and disadvantaga is incompatibility.
2011-12-22make_pgarray(): convert python list to postgres arrayMarko Kreen
2011-12-15SkyLogger: addHandler() compat methodMarko Kreen
2011-12-09londiste: replace SERIALIZABLE with REPEATABLE_READMarko Kreen
On < 9.1 they are same. On 9.1+ REPEATABLE_READ is same as old SERIALIZABLE, but SERIALIZABLE is rather heavy.
2011-12-08skytools: seems psycopg2 isolation constants do changeMarko Kreen
Psycopg 2.4.2 moved them around. Stop hard-coding them, instead import from psycopg2.externsions Also have a symbol for repeatable read.
2011-12-07DBScript: simpler removal of password infoMarko Kreen
PG connect strings can be quite free-form. So remove everything after 'password'.
2011-12-07skylog: use LoggerAdapter to give .trace methodMarko Kreen
Replacing the default logger class seems dubious.
2011-12-07Merge remote branch 'martino/master'Marko Kreen
2011-12-07Merge branch 'master' of git://github.com/markokr/skytoolsMarko Kreen
2011-12-07skytools.signal_pidfile: ignore empty pidfile, some cleanupsMarko Kreen
Empty pidfile can happen if old process failed to write it for some reason.
2011-12-06skytools.__init__: alphabetically ordered modules / symbolsmartinko
2011-12-06Merge branch 'master' of skype-git:/git/dba/skytools-3martinko
2011-12-06skytools.skylog: fixed SkyLogger.trace() vs funcName format attributemartinko
2011-12-06filter potential passwords in connstr before logging itanti.veeranna
2011-12-05reworked custom logging initmartinko
SkyLogger is no more installed automatically on scripting.py loading, rather exlicitly when our custom getLogger() function is called.
2011-12-01skylog: add job_name, service_name, hostname to LogRecordMarko Kreen
This makes those fields usable everywhere. As discussed in comment, no better way to do it. Also remove few per-msg gethostname() calls.
2011-11-29skylog: record.name is not jobname anymoreMarko Kreen
2011-11-28skytools/scripting.py: added new log level TRACE that is below DEBUG levelmartinko
Added new "debug-2" log level that is intended for finer-grained informational events than DEBUG log level.
2011-11-24skytools.scripting: fix fileConfig on python 2.5Marko Kreen
There is no disable_existing_loggers argument so we need manually enable all loggers again.
2011-11-23skytools.BaseScript: fix use_skylog vs. module level loggers.Marko Kreen
We want to support loggers initialized on module import time, but for some reason logging.config.fileConfig() disables all existing loggers by default. Set disable_existing_loggers=False when calling to stop such behaviour.
2011-11-18dbstruct.rx_replace: report all input in exception.Marko Kreen
This helps to debug failures.
2011-11-14skytools.scripting: datefmt support in loggingmartinko
2011-11-14Merge remote-tracking branch 'intgit/master'Marko Kreen
2011-11-14skytools.AdminScript: fix typoMarko Kreen
2011-11-14skytools.BaseScript: .cf_defaults attributeMarko Kreen
This gives simple way to add defaults
2011-11-08config.py: resubmit lost commitmartinko
2011-11-08skytools.scripting: logging cleanupMarko Kreen
- allow different log format when logging verbosely - don't assign to self.log during __init__, instead use class var This allows subclass var to override self.log
2011-11-07skytools: make apipkg visible outsideMarko Kreen
Now it should be possible to re-use the module elsewhere.
2011-11-04skytools.dedent: new function for removing indentMarko Kreen
extract code from .print_ini and make usable elsewhere too.
2011-11-04skytools.sqltools: tolerate missing installer_configMarko Kreen
2011-10-16Add an option to split the key and value fieldsLukáš Lalinský
2011-10-14skytools.scripting: make non-skylog logging attach to rootMarko Kreen
use_skylog logging was already doing it. Now that simple logging does it do, using self.log is not mandatory anymore, code can use 'logging' module directly. Also make console and logfile output configurable.
2011-10-04skytools.DBscript: set_database_defaults methodMarko Kreen
Mainly for simple way to set db mode across all get_database() calls.
2011-09-18Fix bad var in plpy_applyrowMarko Kreen
2011-08-24Merge remote-tracking branch 'martino/master'Marko Kreen
2011-08-23scripting.py: added some aliases in BaseScriptmartinko
stat_add -> stat_put stat_inc -> stat_increase
2011-08-22skytools.BaseScript: fix attribute typo (cf_override)Marko Kreen
2011-08-22config.py: added items() and has_section() methods to simplify certain usecasesmartinko
2011-08-22minor typos fixedmartinko
2011-07-12sql/conflicthandler: experimental conflict handler.Marko Kreen
skytools.plpy_applyrow: low-level helper module conflicthandler/merge_on_time.sql: sample time-based conflict handler
2011-07-05safe_utf8_decode: stop using builtin 'replace', its brokenMarko Kreen
Default 'replace' can eat several symbols, which means it can corrupt even regular ascii.
2011-07-04skytools.DBScript: drop connection if connect string has changedMarko Kreen
.reload() happens between .work() calls, so it's safe to drop connection on first .get_database()
2011-06-29skytools.sockutil: separate module for low-level socket stuffMarko Kreen
Move set_tcp_keepalive() here, plus set_nonblocking() and set_cloexec().
2011-06-29Simplify utf8 sanitizer and move under skytools/Marko Kreen
This patch moves sanitizer under skytools.utf8 and makes is generally usable, also better testable.
2011-06-28skytools/__init__: setup proper __all__Marko Kreen
2011-06-21parse_pgarray: more strict error checkingMarko Kreen
2011-06-16fix: table rules are incorrect after londiste3 table (re)syncEgon Valdmees
2011-06-15sqltools.full_copy variable name fixEgon Valdmees