summaryrefslogtreecommitdiff
path: root/src/python-systemd
AgeCommit message (Collapse)Author
2013-03-15systemd-python: add systemd.daemon wrapping sd-daemonZbigniew Jędrzejewski-Szmek
Please see the documentation (e.g. pydoc3 systemd.daemon) for full description. As usual, systemd._daemon wraps the raw interface, while systemd.daemon provides the more pythonic API. sd_listen_fds, sd_booted, sd_is_fifo, sd_is_socket, sd_is_socket_unix, sd_is_socket_inet, sd_is_mq, and SD_LISTEN_FDS_START are currently wrapped.
2013-03-12man,html: say 'systemd 198' in the headerZbigniew Jędrzejewski-Szmek
This should help readers of the man or HTML pages know if the documentation is out of date. An alternative to use a date generated from 'git log' was considered, but since we try to keep user visible documentation up to date, showing the project version should be enough.
2013-03-09python/docs: use the same links on top as in man pagesZbigniew Jędrzejewski-Szmek
I forgot to commit the layout file, because it was gitignored. Fixed now.
2013-03-09html: make python docs look more like the restZbigniew Jędrzejewski-Szmek
The result is ugly enough, I hope, to motivate someone with design skills to fix it.
2013-03-09systemd-python: provide version info to sphinxZbigniew Jędrzejewski-Szmek
2013-03-07systemd-python: fix segfault on double closeZbigniew Jędrzejewski-Szmek
2013-03-07systemd-python: fix typosZbigniew Jędrzejewski-Szmek
2013-03-07systemd-python: update documentation for new systemd-journal groupZbigniew Jędrzejewski-Szmek
2013-03-07systemd-python: refuse path and flags together in __init__Zbigniew Jędrzejewski-Szmek
It's better to explictly check, instead of just documenting it. The return value from init is changed from 1 to -1 on error. Python seems to ignore 1 every second time. Looks like a bug in Python, but the return value doesn't seem to be documented anywhere, and -1 works as expected... so let's just use that.
2013-03-07systemd-python: export sd_j_get_fd, sd_j_reliable_fd, sd_j_closeZbigniew Jędrzejewski-Szmek
sd_journal_get_fd(j) is called j.fileno(), for compatiblity with Python conventions for file-like objects. More importantly, those new .seek_head() and .seek_tail() do not call .get_next(). This is better, if one wants to skip before retrieving an entry.
2013-03-07systemd-python: split .seek() into .seek_head() and .seek_tail()Zbigniew Jędrzejewski-Szmek
This way python code follows the original interface more closely. Also, .seek(0, journal.SEEK_END) was just to much to type.
2013-03-07systemd-python: catch only ValueErrors in conversion codeZbigniew Jędrzejewski-Szmek
First of all, 'try: ... except: ...' (with no exception specified) is always a no-no, since it catches all BaseExceptions, which includes ^C and other stuff which should almost never be caught. Now the conversion is stricter, and only one conversion is attempted, and only a ValueEror is caught. It seems reasonable to catch ValueErrors, since the entries in the journal are not verified, and any erroneous application might log a field which cannot be converted. The consumer of events must only check if a field is an instance of bytes and can otherwise assume that the conversion was performed correctly. Order of arguments in Reader.__init__ has been changed to match order in _Reader.__init__. Conversions have been updated to work under Python 2 and 3.
2013-03-05systemd-python: fix error check in _Reader.wait()Zbigniew Jędrzejewski-Szmek
2013-03-01systemd-python: add missing check for return of PyDict_SetItem in _reader.cLukas Nykryn
2013-02-28python-systemd: rename Journal to ReaderZbigniew Jędrzejewski-Szmek
It seems inevitable that we'll also grow a writing interface, and then it'll be cumbersome to have a "Journal" for reading, and a "Writer" for writing.
2013-02-28systemd-python: return both parts of sd_journal_get_monotonic_usecZbigniew Jędrzejewski-Szmek
In Python 3, a named tuple is used. In Python 2, a simple tuple is used. In either case, the pair is (timestamp, bootid).
2013-02-28python-systemd: check all errors and use automatic cleanupZbigniew Jędrzejewski-Szmek
__REALTIME_TIMESTAMP and __MONOTONIC_TIMESTAMP return ints. It doesn't make sense to convert to string, just to convert back to a number later on. Also try to follow systemd rules for indentation.
2013-02-28systemd-python: hide ChainMap importZbigniew Jędrzejewski-Szmek
2013-02-28systemd-python: document attributesZbigniew Jędrzejewski-Szmek
In id128 it would be better to add everything automatically, but sphinx cannot do this right now.
2013-02-28systemd-python: use PyModule_AddObject in id128Zbigniew Jędrzejewski-Szmek
2013-02-28systemd-python: polish the docstringsZbigniew Jędrzejewski-Szmek
2013-02-22systemd-python: indenation and style tweaksZbigniew Jędrzejewski-Szmek
2013-02-22systemd-python: downgrade _reader.c to C89Zbigniew Jędrzejewski-Szmek
2013-02-22systemd-python: add casts and fix unused variable warnings in _readerZbigniew Jędrzejewski-Szmek
2013-02-22systemd-python: wrap some python differences using macrosZbigniew Jędrzejewski-Szmek
2013-02-22systemd-python: introduce error setting helperZbigniew Jędrzejewski-Szmek
2013-02-22systemd-python: Added doc string for JournalSteven Hiscocks
2013-02-22systemd-python: Journal convert_unicode exception handling changeSteven Hiscocks
Rather than catch all, is now limited to UnicodeDecodeError
2013-02-22systemd-python: add Journal method to add MESSAGE_ID matchSteven Hiscocks
2013-02-22systemd-python: fix memory leak in _reader and minor bugsSteven Hiscocks
iternext now checks for error from get_next, and changed a DECREF to XDECREF rather than NULL check
2013-02-22systemd-python: update Journal python docstringsSteven Hiscocks
2013-02-22systemd-python: tidy up import names in journalSteven Hiscocks
2013-02-22systemd-python: Journal this_boot/machine now accepts IDSteven Hiscocks
2013-02-22systemd-python: remove unneeded ifdef for query_uniqueSteven Hiscocks
2013-02-22systemd-python: _reader now takes unix timestamp in secondsSteven Hiscocks
2013-02-22systemd-python: Update _reader docstringsSteven Hiscocks
2013-02-22systemd-python: _reader add_match takes single stringSteven Hiscocks
python code now takes care of multiple matches
2013-02-22systemd-python: correct data_threshold error return valueSteven Hiscocks
2013-02-22systemd-python: updated _reader header to standard licenseSteven Hiscocks
2013-02-22systemd-python: Moved _reader datetime usage to pythonSteven Hiscocks
2013-02-22systemd-python: Tidy up _reader error handlingSteven Hiscocks
2013-02-22systemd-python: some python3 and bug fixesSteven Hiscocks
2013-02-22systemd-python: implement this_boot/this_machine in PythonSteven Hiscocks
2013-02-22systemd-python: Journal log_level moved to pythonSteven Hiscocks
2013-02-22sphinx: document Journal class tooZbigniew Jędrzejewski-Szmek
2013-02-22systemd-python: move default call dicts from C to pythonSteven Hiscocks
2013-02-22systemd-python: MESSAGE_ID as UUID for JournalSteven Hiscocks
2013-02-22systemd-python: moved PyRun_String to journal.py codeSteven Hiscocks
2013-02-22systemd-python: add Journal class for reading journalSteven Hiscocks
2013-02-22python: build html docs using sphinxZbigniew Jędrzejewski-Szmek
Build instructions: make make DESTIDIR=/tmp/... install make DESTIDIR=/tmp/... sphinx-html sphinx-man sphinx-epub ...