summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix test failureHEADmainEric T. Johnson2023-03-261-1/+1
| | | One usage of `connection_error` got missed when dropping Python 2 support.
* README: stop mentioning Python 2 build dependenciesJelle van der Waa2023-03-261-11/+2
| | | | | | Python 2 support was fully dropped in 802c8dcaa3096719be0a1c12 so it can be a bit confusing to advertise Python 2 build dependencies in the README.
* fixed PyPI url in last commitGuiorgy2023-03-041-1/+1
|
* treewide: remove python 2 support and assume we have python 3.3+Joerg Behrmann2023-02-119-211/+10
|
* Merge pull request #123 from Guiorgy/patch-1Zbigniew Jędrzejewski-Szmek2023-02-111-2/+4
|\ | | | | Update README.md
| * Update README.mdGuiorgy2023-02-061-2/+4
|/ | | Moved pypi instructions under the Installation heading and added a pypi badge
* ci: use CodeQL instead of LGTMFrantisek Sumsal2022-09-221-0/+53
| | | | | | | | | | As LGTM is going to be shut down by EOY[0], let's move the code scanning to CodeQL as recommended. Thanks to GH integration the results from such scans will be shown both in the respective PR and in the Security -> Code Scanning tab[1]. [0] https://github.blog/2022-08-15-the-next-step-for-lgtm-com-github-code-scanning/ [1] https://github.com/systemd/python-systemd/security/code-scanning
* Merge pull request #119 from keszybz/sd128-testsZbigniew Jędrzejewski-Szmek2022-08-173-7/+12
|\ | | | | tests: check for errnos that sd_id128_get_machine actually returns
| * ci: drop instantiation of machine-idZbigniew Jędrzejewski-Szmek2022-08-171-2/+0
| | | | | | | | Now the tests should pass without it.
| * tests: check for errnos that sd_id128_get_machine actually returnsZbigniew Jędrzejewski-Szmek2022-08-172-5/+12
|/ | | | Fixes #118.
* Version 235v235Zbigniew Jędrzejewski-Szmek2022-08-161-2/+11
| | | | Fixes #76.
* Merge pull request #117 from keszybz/python2-compatZbigniew Jędrzejewski-Szmek2022-08-165-17/+29
|\ | | | | Compat with python2
| * NEWS: say that we'll drop support for python2 soonZbigniew Jędrzejewski-Szmek2022-08-162-9/+8
| | | | | | | | | | I think it's nicer to make one last release with the remaining code for python2 in place.
| * tests: simplify importsZbigniew Jędrzejewski-Szmek2022-08-161-2/+2
| | | | | | | | | | 'import foo as _foo' is useful in exported modules to avoid 'foo' being present in the public API. No need to play that game in test code.
| * tests: python2-compat in another placeZbigniew Jędrzejewski-Szmek2022-08-161-1/+1
| |
| * journal: fix compatibility with python2Zbigniew Jędrzejewski-Szmek2022-08-162-5/+18
|/ | | | | | | | | | | | This is a lazy workaround: 4c9a241949067fc8d55f3ea12170ad364bd8b18d is amended to do nothing on python2, so we have the same issue that was present before. This allows the code to execute, and hopefully almost nobody is using python2 code anyway. f868a56b935b6152d611b22f7a5538f14dafb194 is amended in the same way. For python2 code we have the same lack of timezone-awareness as before. This allows the tests to pass under python 2.7.
* Merge pull request #92 from chrismullins/support-realtime-cutoffZbigniew Jędrzejewski-Szmek2022-08-162-0/+52
|\ | | | | Support realtime cutoff access
| * Pass NULL for unnecessary timestampsChris Mullins2021-01-031-4/+4
| |
| * Add support for sd_journal_get_cutoff_realtime_usec wrapperChris Mullins2021-01-032-0/+52
| |
* | Merge pull request #114 from keszybz/install-docsZbigniew Jędrzejewski-Szmek2022-08-161-31/+41
|\ \ | | | | | | Update/clean-up installation instructions
| * | README: apt-get → aptZbigniew Jędrzejewski-Szmek2022-08-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Jörg Behrmann's comment: https://github.com/systemd/python-systemd/pull/114#discussion_r945896280 > apt is available in the stretch, which is the oldest listed [1] release for it > and stretch has already ended LTS support. [1] https://packages.debian.org/bullseye/apt
| * | README: drop distro instructions for python2, drop epel/rhelZbigniew Jędrzejewski-Szmek2022-08-151-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fedora has no python2 package, so drop that. Similarly, with latest Debian and Opensuse, 'apt-get install python3-systemd' works, but 'apt-get install python-systemd' doesn't. (Tested with podman run -it --rm debian apt-get install python3-systemd mock -r opensuse-tumbleweed-x86_64 --enable-network -i python3-systemd) It also seems we never built the package in EPEL, so let's drop RHEL/CentOS from the list. If people need to, they can install from sources where the distro packages are unavailable (and they shouldn't be using python2 anyway at this point.) Also add 'apt-get update' into the instructions because w/o that install does not work in a pristine container. Fixes #78.
| * | README: markup and line wrappingZbigniew Jędrzejewski-Szmek2022-08-151-23/+28
| | | | | | | | | | | | | | | Bash doesn't do anything special for a command with '#', but at least zsh treat it as a comment. It's better to quote such a commandline.
| * | README: fix installation urlsZbigniew Jędrzejewski-Szmek2022-08-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | pip3 install says: WARNING: Discarding git+https://github.com/systemd/python-systemd.git#egg=systemd. Requested systemd-python from git+https://github.com/systemd/python-systemd.git#egg=systemd has inconsistent name: filename has 'systemd', but metadata has 'systemd-python' Closes #97.
* | | ci: run CIs on push events as wellFrantisek Sumsal2022-08-152-2/+10
| | | | | | | | | | | | Let's cover merges into main with CIs too.
* | | Update constants for systemd 251Zbigniew Jędrzejewski-Szmek2022-08-153-0/+42
|/ /
* | Merge pull request #111 from keszybz/setuptools-compatZbigniew Jędrzejewski-Szmek2022-08-132-2/+5
|\ \ | | | | | | make: fix compat with setuptools >= 61
| * | ci: add 3.11 to the test matrixZbigniew Jędrzejewski-Szmek2022-08-131-0/+1
| | |
| * | make: fix compat with setuptools >= 61Zbigniew Jędrzejewski-Szmek2022-08-131-2/+4
|/ / | | | | | | Fixes #110.
* | Adding timezone information to datetimes from systemd-journalSamuel BF2022-08-132-3/+15
| |
* | reader: Fix use of potentially uninitialized valueAndrew Stone2022-08-131-1/+1
| |
* | setup.py: switch from distutils to setuptoolsTim Orling2022-08-131-1/+1
| | | | | | | | | | | | | | In Python 3.10, distutils is deprecated and slated for removal in Python 3.12. It also prevents 'setup.py bdist_wheel' from building a wheel. Signed-off-by: Tim Orling <tim.orling@konsulko.com>
* | Merge pull request #104 from systemd/ci-shenanigansZbigniew Jędrzejewski-Szmek2022-08-133-1/+129
|\ \ | | | | | | ci: move the CI to GitHub Actions
| * | ci: introduce a simple install testFrantisek Sumsal2022-04-141-0/+77
| | |
| * | ci: move the CI to GitHub ActionsFrantisek Sumsal2022-04-141-0/+51
| | |
| * | Makefile: accept $SPHINXOPTS from the outsideFrantisek Sumsal2022-03-061-1/+1
| |/
* | Update news since 234Dan Bungert2022-08-131-4/+18
| |
* | Set unit name in JournalHandler example, see #74Federico Ceratto2022-08-131-1/+1
| |
* | Merge pull request #91 from chrismullins/journal-examplesZbigniew Jędrzejewski-Szmek2022-08-131-0/+70
|\ \ | | | | | | Journal examples
| * | Add link to journal fields docsChris Mullins2021-01-021-0/+2
| | |
| * | Add journalctl example for ring bufferChris Mullins2021-01-021-1/+1
| | |
| * | Add some examplesChris Mullins2021-01-021-0/+68
| |/
* | fix a mistype in README.mdArchitector #42022-06-231-1/+1
|/ | | "libsytemd" should obviously be "libsystemd"
* journal: remove ChainMapmasterGlandos2020-11-121-11/+3
| | | | | | | "after some quick testing, the execution time got halved (32-ish seconds to 16-ish seconds) when going through all journal entries." Closes #63.
* journal: add namespace supportAlexander Olekhnovich2020-11-122-19/+41
| | | | Add log namespace support which is added since systemd v245
* journal: allow JournalHandler constructor to be called with args in a ↵Tamaki Nishino2020-11-122-0/+28
| | | | | | | | | | | | | | | positional param This change enables to add extra fields to JournalHandler in a configuration file loaded by `logging.config.fileConfig`, which only allows positional parameters: class=systemd.journal.JournalHandler args={'level': INFO, 'SYSLOG_IDENTIFIER': 'my-cool-app'} [zj: originally the patch added a new positional parameter to __init__(), but that is not backwards compatible. So I added a new classmethod to allow the positional parameters to be passed.]
* test: make sure $NOTIFY_SOCKET is unset in testZbigniew Jędrzejewski-Szmek2020-11-121-0/+2
| | | | | | When running the tests in Fedora's mock, the test would fail because NOTIFY_SOCKET is set to /run/systemd/nspawn/notify, and we get a permission error.
* reader: make PY_SSIZE_T_CLEANZbigniew Jędrzejewski-Szmek2020-11-121-2/+13
|
* journal: avoid warning about deprecated constantZbigniew Jędrzejewski-Szmek2020-11-121-1/+1
|
* Fix seek_realtime to work with timezone aware dateLéonard Gérard2020-11-121-1/+1
| | | | | `strftime("%s")` is not in the official python documentation but in my system (ubuntu 18.04 python 3.6.9) it is not aware of the object timezone and will return the wrong value if the timezone is specified and is not the system local one. There are multiple ways to ensure a python `datetime.datetime` is in local timezone, the easiest (with python 3.3+) is to call `.astimezone()` If one wants to support earlier versions of python an extra dependency might be needed like `dateutil.tz.tzlocal()`.