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
4 changes: 2 additions & 2 deletions .github/common.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Shared common variables

CI_IMAGE_VERSION=master-2856852845
CI_TOXENV_MAIN=py310,py311,py312,py313,py314,py315
CI_TOXENV_PLUGINS=py310-plugins,py311-plugins,py312-plugins,py313-plugins,py314-plugins,py315-plugins
CI_TOXENV_MAIN=py311,py312,py313,py314,py315
CI_TOXENV_PLUGINS=py311-plugins,py312-plugins,py313-plugins,py314-plugins,py315-plugins
CI_TOXENV_ALL="${CI_TOXENV_MAIN},${CI_TOXENV_PLUGINS}"
9 changes: 0 additions & 9 deletions .github/compose/ci.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ services:
<<: *tests-template
image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:45-${CI_IMAGE_VERSION:-latest}

ubuntu-22.04:
<<: *tests-template
image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-ubuntu:22.04-${CI_IMAGE_VERSION:-latest}

# Ensure that tests also pass in the absence of a sandboxing tool
fedora-missing-deps:
<<: *tests-template
Expand Down Expand Up @@ -96,11 +92,6 @@ services:
# on the PyPA official 'manylinux' images that define the base ABI for
# Python binary packages.

wheels-manylinux_2_28-cp310:
<<: *tests-template
image: quay.io/pypa/manylinux_2_28_x86_64
command: .github/wheel-helpers/test-wheel-manylinux.sh cp310 /opt/python/cp310-cp310/bin/python3

wheels-manylinux_2_28-cp311:
<<: *tests-template
image: quay.io/pypa/manylinux_2_28_x86_64
Expand Down
2 changes: 1 addition & 1 deletion .github/run-ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function runServiceTest() {


if [ -z "${test_names}" ]; then
for test_name in mypy debian-12 debian-13 fedora-44 fedora-45 fedora-missing-deps ubuntu-22.04; do
for test_name in mypy debian-12 debian-13 fedora-44 fedora-45 fedora-missing-deps; do
if ! runTest "${test_name}"; then
echo "Tests failed"
exit 1
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
- fedora-44
- fedora-45
- fedora-missing-deps
- ubuntu-22.04
- lint
- mypy

Expand Down Expand Up @@ -153,7 +152,6 @@ jobs:
# The names here should map to a valid service defined in
# "../compose/ci.docker-compose.yml"
test-name:
- wheels-manylinux_2_28-cp310
- wheels-manylinux_2_28-cp311
- wheels-manylinux_2_28-cp312
- wheels-manylinux_2_28-cp313
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ jobs:
# The names here should map to a valid service defined in
# "../compose/ci.docker-compose.yml"
test-name:
- wheels-manylinux_2_28-cp310
- wheels-manylinux_2_28-cp311
- wheels-manylinux_2_28-cp312
- wheels-manylinux_2_28-cp313
Expand Down
2 changes: 1 addition & 1 deletion doc/source/main_install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ Runtime requirements

BuildStream requires the following Python environment to run:

- python3 >= 3.10
- python3 >= 3.11
- PyPI packages as specified in
`requirements.in <https://github.com/apache/buildstream/blob/master/requirements/requirements.in>`_.

Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ dynamic = ["version", "dependencies"]
description = "A framework for modelling build pipelines in YAML"
readme = "README.rst"
license = "Apache-2.0"
requires-python = ">=3.10"
requires-python = ">=3.11"
authors = [
{ name = "The Apache Software Foundation", email = "dev@buildstream.apache.org" },
]
Expand All @@ -38,7 +38,6 @@ classifiers = [
"Intended Audience :: Developers",
"Operating System :: POSIX",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
Expand All @@ -58,7 +57,7 @@ Tracker = "https://github.com/apache/buildstream/issues"
bst = "buildstream._frontend:cli"

[tool.black]
target-version = ["py310", "py311", "py312", "py313", "py314", "py315"]
target-version = ["py311", "py312", "py313", "py314", "py315"]
line-length = 119
exclude = '''
(
Expand Down
17 changes: 7 additions & 10 deletions requirements/cov-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
coverage==7.15.4
coverage==7.16.2
pytest-cov==7.1.0
pytest==9.0.3
Cython==3.2.4
pytest==9.1.1
Cython==3.3.0
## The following requirements were added by pip freeze:
exceptiongroup==1.3.1
iniconfig==2.3.0
packaging==26.2
pluggy==1.6.0
Pygments==2.20.0
tomli==2.4.1
typing_extensions==4.15.0
iniconfig==2.3.1
packaging==26.3
pluggy==1.7.0
Pygments==2.21.0
30 changes: 15 additions & 15 deletions requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
pexpect==4.9.0
pylint==4.0.5
pylint==4.1.3
# Pytest 6.0.0 doesn't play well with pylint
pytest==9.0.3
pytest==9.1.1
pytest-datafiles==3.0.1
pytest-env==1.6.0
pytest-env==1.8.1
pytest-xdist==3.8.0
pytest-timeout==2.4.0
pyftpdlib==2.2.0
## The following requirements were added by pip freeze:
astroid==4.0.4
astroid==4.3.4
dill==0.4.1
exceptiongroup==1.3.1
execnet==2.1.2
iniconfig==2.3.0
isort==8.0.1
iniconfig==2.3.1
isort==9.0.2
mccabe==0.7.0
packaging==26.2
platformdirs==4.9.6
pluggy==1.6.0
mypy_extensions==1.1.0
packaging==26.3
platformdirs==4.13.5
pluggy==1.7.0
ptyprocess==0.7.0
Pygments==2.20.0
python-dotenv==1.2.2
tomli==2.4.1
tomlkit==0.14.0
typing_extensions==4.15.0
pyasynchat==1.0.5
pyasyncore==1.0.5
Pygments==2.21.0
python-dotenv==1.2.4
tomlkit==0.15.2
16 changes: 8 additions & 8 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
click==8.3.3
grpcio==1.80.0
click==8.5.0
grpcio==1.84.0
Jinja2==3.1.6
packaging==26.2
packaging==26.3
pluginbase==1.0.1
protobuf==7.34.1
protobuf==7.36.2
psutil==7.2.2
ruamel.yaml==0.19.1
ruamel.yaml.clib==0.2.15
pyroaring==1.1.0
ujson==5.12.0
pyroaring==1.2.0
ujson==6.0.0
## The following requirements were added by pip freeze:
MarkupSafe==3.0.3
typing_extensions==4.15.0
MarkupSafe==3.0.4
typing_extensions==4.16.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# Python requirements
##################################################################
REQUIRED_PYTHON_MAJOR = 3
REQUIRED_PYTHON_MINOR = 10
REQUIRED_PYTHON_MINOR = 11

if sys.version_info[0] != REQUIRED_PYTHON_MAJOR or sys.version_info[1] < REQUIRED_PYTHON_MINOR:
print("BuildStream requires Python >= " + str(REQUIRED_PYTHON_MAJOR) + "." + str(REQUIRED_PYTHON_MINOR))
Expand Down
5 changes: 1 addition & 4 deletions src/buildstream/_artifact.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,7 @@ def cache(

# Capture queued files and store returned digests
digests = self._cas.add_objects(paths=[entry[0] for entry in files_to_capture])
# add_objects() should guarantee this.
# `zip(..., strict=True)` could be used in Python 3.10+
assert len(files_to_capture) == len(digests)
for entry, digest in zip(files_to_capture, digests):
for entry, digest in zip(files_to_capture, digests, strict=True):
entry[1].CopyFrom(digest)

# store build dependencies
Expand Down
9 changes: 1 addition & 8 deletions src/buildstream/_cas/casdprocessmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import shutil
import stat
import subprocess
import sys
import tempfile
import time
from subprocess import CalledProcessError
Expand Down Expand Up @@ -146,12 +145,6 @@ def __init__(
self._start_time = time.time()
self._logfile = self._rotate_and_get_next_logfile()

# Create a new process group for buildbox-casd such that SIGINT won't reach it.
if sys.version_info >= (3, 11):
process_group_kwargs = {"process_group": 0}
else:
process_group_kwargs = {"preexec_fn": os.setpgrp}

with open(self._logfile, "w", encoding="utf-8") as logfile_fp:
# The frontend will take care of terminating buildbox-casd.
self.process = subprocess.Popen( # pylint: disable=consider-using-with
Expand All @@ -160,7 +153,7 @@ def __init__(
stdout=logfile_fp,
stderr=subprocess.STDOUT,
env=self.__buildbox_casd_env(),
**process_group_kwargs,
process_group=0, # Create a new process group for buildbox-casd such that SIGINT won't reach it
)

self._casd_channel = None
Expand Down
4 changes: 3 additions & 1 deletion src/buildstream/_scheduler/resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ def reserve(self, resources, exclusive=None, *, peek=False):
# available. If we don't have enough, the job cannot be
# scheduled.
for resource in resources:
if self._max_resources[resource] > 0 and self._used_resources[resource] >= self._max_resources[resource]:
if ( # pylint: disable=chained-comparison
self._max_resources[resource] > 0 and self._used_resources[resource] >= self._max_resources[resource]
):
return False

# Now we register the fact that our job is using the resources
Expand Down
40 changes: 20 additions & 20 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Tox global configuration
#
[tox]
envlist = py{310,311,312,313,314,315}
envlist = py{311,312,313,314,315}
skip_missing_interpreters = true
isolated_build = true

Expand All @@ -33,30 +33,30 @@ BST_PLUGINS_VERSION = 79649529cffb695d0d22195ed9a4910c80ca6907 # 2.5.0
[testenv]
usedevelop =
# This is required by Cython in order to get coverage for cython files.
py{310,311,312,313,314,315}-!nocover: True
py{311,312,313,314,315}-!nocover: True

commands =
# Running with coverage reporting enabled
py{310,311,312,313,314,315}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
py{311,312,313,314,315}-!plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc {posargs}
# Running with coverage reporting disabled
py{310,311,312,313,314,315}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs}
py{311,312,313,314,315}-!plugins-nocover: pytest --basetemp {envtmpdir} {posargs}
# Running external plugins tests with coverage reporting enabled
py{310,311,312,313,314,315}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs}
py{311,312,313,314,315}-plugins-!nocover: pytest --basetemp {envtmpdir} --cov=buildstream --cov-config .coveragerc --plugins {posargs}
# Running external plugins tests with coverage disabled
py{310,311,312,313,314,315}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs}
py{311,312,313,314,315}-plugins-nocover: pytest --basetemp {envtmpdir} --plugins {posargs}
commands_post:
py{310,311,312,313,314,315}-!nocover: mkdir -p .coverage-reports
py{310,311,312,313,314,315}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
py{311,312,313,314,315}-!nocover: mkdir -p .coverage-reports
py{311,312,313,314,315}-!nocover: mv {envtmpdir}/.coverage {toxinidir}/.coverage-reports/.coverage.{env:COVERAGE_PREFIX:}{envname}
deps =
py{310,311,312,313,314,315}: -rrequirements/requirements.txt
py{310,311,312,313,314,315}: -rrequirements/dev-requirements.txt
py{310,311,312,313,314,315}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}}
py{311,312,313,314,315}: -rrequirements/requirements.txt
py{311,312,313,314,315}: -rrequirements/dev-requirements.txt
py{311,312,313,314,315}: git+https://github.com/apache/buildstream-plugins.git@{env:BST_PLUGINS_VERSION:{[config]BST_PLUGINS_VERSION}}

# Install local sample plugins for testing pip plugin origins
py{310,311,312,313,314,315}: {toxinidir}/tests/plugins/sample-plugins
py{311,312,313,314,315}: {toxinidir}/tests/plugins/sample-plugins

# Install external plugins for plugin tests
py{310,311,312,313,314,315}-plugins: git+https://gitlab.com/buildstream/buildstream-plugins-community.git@{env:BST_PLUGINS_COMMUNITY_VERSION:{[config]BST_PLUGINS_COMMUNITY_VERSION}}#egg=bst_plugins_community[deb]
py{311,312,313,314,315}-plugins: git+https://gitlab.com/buildstream/buildstream-plugins-community.git@{env:BST_PLUGINS_COMMUNITY_VERSION:{[config]BST_PLUGINS_COMMUNITY_VERSION}}#egg=bst_plugins_community[deb]

# Only require coverage and pytest-cov when using it
!nocover: -rrequirements/cov-requirements.txt
Expand Down Expand Up @@ -84,18 +84,18 @@ passenv =
# These keys are not inherited by any other sections
#
setenv =
py{310,311,312,313,314,315}: COVERAGE_FILE = {envtmpdir}/.coverage
py{310,311,312,313,314,315}: BST_TEST_HOME = {envtmpdir}
py{310,311,312,313,314,315}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
py{310,311,312,313,314,315}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
py{310,311,312,313,314,315}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share
py{311,312,313,314,315}: COVERAGE_FILE = {envtmpdir}/.coverage
py{311,312,313,314,315}: BST_TEST_HOME = {envtmpdir}
py{311,312,313,314,315}: BST_TEST_XDG_CACHE_HOME = {envtmpdir}/cache
py{311,312,313,314,315}: BST_TEST_XDG_CONFIG_HOME = {envtmpdir}/config
py{311,312,313,314,315}: BST_TEST_XDG_DATA_HOME = {envtmpdir}/share

# This is required to get coverage for Cython
py{310,311,312,313,314,315}-!nocover: BST_CYTHON_TRACE = 1
py{311,312,313,314,315}-!nocover: BST_CYTHON_TRACE = 1
randomized: PYTEST_ADDOPTS="--random-order-bucket=global"

allowlist_externals =
py{310,311,312,313,314,315}:
py{311,312,313,314,315}:
mv
mkdir

Expand Down
Loading