Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ jobs:
strategy:
matrix:
# only use oldest and newest version for the lint step
python-version: ["3.9", "3.11"]
python-version: ["3.10", "3.14"]

steps:

- id: checkout-code
uses: actions/checkout@v2
uses: actions/checkout@v6

- id: system-dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsystemd-dev libsnappy-dev

- id: prepare-python
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -47,19 +47,19 @@ jobs:
strategy:
max-parallel: 4
matrix:
python-version: ["3.9", "3.11"]
python-version: ["3.10", "3.14"]

steps:
- id: checkout-code
uses: actions/checkout@v2
uses: actions/checkout@v6

- id: system-dependencies
run: |
sudo apt-get update
sudo apt-get install -y libsystemd-dev libsnappy-dev

- id: prepare-python
uses: actions/setup-python@v2
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -77,7 +77,7 @@ jobs:
run: make systest

- id: upload-codecov
# Third-party action pinned to v2.1.0
uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b
# Third-party action pinned to v5.5.2
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de
with:
verbose: true
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v4

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -69,4 +69,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v4
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
Expand All @@ -10,7 +10,7 @@ repos:
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 26.3.0
hooks:
- id: black
- repo: local
Expand All @@ -21,7 +21,7 @@ repos:
language: system
types: [python]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.960
rev: v1.19.1
hooks:
- id: mypy
args: [--ignore-missing-imports]
Expand Down
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ reports=no

[TYPECHECK]
ignored-classes=responses
ignored-modules=re2
1 change: 1 addition & 0 deletions journalpump/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
# This file is under the Apache License, Version 2.0.
# See the file `LICENSE` for details.
"""journalpump"""

__version__ = "2.5.0"
1 change: 1 addition & 0 deletions journalpump/daemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Common Daemon functionality

"""

from systemd import daemon, journal

import json
Expand Down
2 changes: 1 addition & 1 deletion mypy.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[mypy]
python_version = 3.7
python_version = 3.10
ignore_missing_imports = True
1 change: 0 additions & 1 deletion requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ coverage
coveralls
pre-commit
responses
unify
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ google-api-python-client
google-auth
geoip2
https://github.com/systemd/python-systemd/zipball/master
google-re2<1.1.20251105
google-re2<1.1.20251105; python_version < "3.14"
8 changes: 3 additions & 5 deletions scripts/generate_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def __init__(self, *, logs_dir: pathlib.Path, uid: int) -> None:
self._runtime_dir: Optional[pathlib.Path] = None
self._journald_process: Optional[subprocess.Popen] = None
self._sender_process: Optional[multiprocessing.Process] = None
self._sender_queue: multiprocessing.Queue = multiprocessing.JoinableQueue()
self._sender_queue: multiprocessing.JoinableQueue = multiprocessing.JoinableQueue()
self._uid = uid

@property
Expand Down Expand Up @@ -157,8 +157,7 @@ def __exit__(self, *args) -> None:
shutil.rmtree(self._runtime_dir)


_PARSER = argparse.ArgumentParser(
usage="""Genrate journald log files.
_PARSER = argparse.ArgumentParser(usage="""Genrate journald log files.
This program reads messages from stdin in following format

msg Test 1
Expand All @@ -168,8 +167,7 @@ def __exit__(self, *args) -> None:

msg command argument be either plain message or json object
rotate command invokes journald rotation
"""
)
""")
_PARSER.add_argument("--uid", type=int, default=1000, help="user id of log sender")


Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
"Intended Audience :: Developers",
"Topic :: System :: Logging",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
],
)