8000 Fixes SIGSEGV and improve thread safety of journal.Reader class by sebres · Pull Request #144 · systemd/python-systemd · GitHub
[go: up one dir, main page]

Skip to content

Fixes SIGSEGV and improve thread safety of journal.Reader class #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
repair GHA-CI (update versions, pip install using --break-system-pack…
…ages, etc)
  • Loading branch information
sebres committed Apr 2, 2025
commit 7c99a39e6dc40367b4bbd3173f3db9dcc799cc97
14 changes: 9 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,28 @@ permissions:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ matrix.python }}-${{ github.ref }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
python: [
"3.7",
"3.8",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should probably be dropped as well, since it is EOL or in other words: with 3.7 dropped I see no reason not to drop 3.8

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dropped 3.7 only because of switch to ubuntu-latest, which doesn't have it.
I don't see any reason to drop 3.8. at least as long as it is compatible and running yet.
Anyway has nothing to do with the PR as is, I made the changes just in order to repair the GHA flow.

"3.9",
"3.10",
"3.11.0-rc.1",
"3.11",
"3.12",
"3.13"
]
name: Python ${{ matrix.python }}
steps:
- name: Repository checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Configure Python ${{ matrix.python }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: x64
Expand All @@ -43,6 +44,9 @@ jobs:
run: |
sudo apt -y update
sudo apt -y install gcc libsystemd-dev
if dpkg --compare-versions "${{ matrix.python }}" ge 3.12; then
python -m pip install setuptools || echo "can't install setuptools"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make sense to always install setuptools, so that all versions are tested with the same?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno... IMHO, only 3.12+ missing it as package, but I am unsure the attempt to install with pip for previous versions would be always successful (and not fail due to conflict with preinstalled package).
I can imagine it could.

fi
python -m pip install pytest sphinx

- name: Build (Python ${{ matrix.python }})
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
container: [
"archlinux:latest",
"debian:testing",
"quay.io/centos/centos:stream8",
"quay.io/centos/centos:stream9",
"quay.io/fedora/fedora:rawhide",
"ubuntu:focal",
]
Expand All @@ -33,7 +33,7 @@ jobs:
name: ${{ matrix.container }}
steps:
- name: Repository checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install dependencies
shell: bash
Expand All @@ -45,34 +45,39 @@ jobs:
gcc
git
pkg-config
python3
systemd
)

case "$DIST_ID" in
arch)
pacman --noconfirm -Sy python3 || echo "Issue installing/upgrading python3"
pacman --noconfirm -Sy python-pip
python3 -m pip install --upgrade pip || echo "can't upgrade pip"
pacman --noconfirm -Sy "${DEPS_COMMON[@]}" systemd-libs
python3 -m ensurepip
;;
centos|fedora)
dnf -y install "${DEPS_COMMON[@]}" systemd-devel python3-devel python3-pip
dnf -y install python3 python3-devel python3-pip
python3 -m pip install --upgrade pip || echo "can't upgrade pip"
dnf -y install "${DEPS_COMMON[@]}" systemd-devel
;;
ubuntu|debian)
apt -y update
DEBIAN_FRONTEND=noninteractive apt -y install python3 python3-dev python3-pip
python3 -m pip install --upgrade pip || echo "can't upgrade pip"
DEBIAN_FRONTEND=noninteractive apt -y install "${DEPS_COMMON[@]}" libsystemd-dev python3-dev python3-pip
;;
*)
echo >&2 "Invalid distribution ID: $DISTRO_ID"
exit 1
esac

python3 -m pip install pytest sphinx
python3 -m pip install --break-system-packages pytest sphinx

- name: Build & install
shell: bash
run: |
set -x
python3 -m pip install -I -v .
python3 -m pip install --break-system-packages -I -v .
# Avoid importing the systemd module from the git repository
cd /
python3 -c 'from systemd import journal; print(journal.__version__)'
Expand Down
Loading
0