Skip to content
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

Update dependency black to v24.10.0 #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Update dependency black to v24.10.0

30d104f
Select commit
Loading
Failed to load commit list.
Open

Update dependency black to v24.10.0 #97

Update dependency black to v24.10.0
30d104f
Select commit
Loading
Failed to load commit list.
Cirrus CI / Formatting failed Feb 4, 2025 in 14s

Task Summary

Instruction poetry_install failed in 00:05

Details

✅ 00:00 clone
✅ 00:02 poetry
❌ 00:05 poetry_install

source set_poetry_build_version "$CI_BUILD_NUMBER"
#!/bin/bash
set -euo pipefail

BUILD_ID=$1

if ! current_version=$(poetry version -s); then
  echo "Could not get version from Poetry project ('poetry version -s')" >&2
  echo "$current_version" >&2
  exit 1
fi
release_version=${current_version%".dev"*}
# In case of 2 digits, we need to add a '0' as the 3rd digit.
digit_count=$(echo "${release_version//./ }" | wc -w)
if [[ "$digit_count" -lt 3 ]]; then
  release_version="$release_version.0"
fi
if [[ "$digit_count" -gt 3 && $release_version =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
  release_version="${BASH_REMATCH[0]}"
  echo "WARN: version was truncated to $release_version because it had more than 3 digits"
fi
new_version="$release_version.${BUILD_ID}"

echo "Replacing version $current_version with $new_version"
Replacing version 0.2.0 with 0.2.0.625
poetry version "$new_version"
Bumping version from 0.2.0 to 0.2.0.625
export PROJECT_VERSION=$new_version
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $CIRRUS_ENV
jfrog config add repox --artifactory-url "$ARTIFACTORY_URL" --access-token "$ARTIFACTORY_PRIVATE_ACCESS_TOKEN"
jfrog poetry-config --server-id-resolve repox --repo-resolve sonarsource-pypi
08:56:58 [Info] poetry build config successfully created.
jfrog poetry install --build-name="$CIRRUS_REPO_NAME" --build-number="$CI_BUILD_NUMBER"
08:56:58 [Info] Running Poetry install.
Using a plaintext file to store credentials
08:56:58 [Info] Added tool.poetry.source name:"sonarsource-pypi" url:"HIDDEN-BY-CIRRUS-CI/api/pypi/sonarsource-pypi/simple"
08:56:58 [Info] Running Poetry update
Creating virtualenv pysonar-scanner-XZqP7kBn-py3.12 in /home/sonarsource/.cache/poetry/venvs
Updating dependencies
Resolving dependencies...

The current project's supported Python range (>=3.8) is not compatible with some of the required packages Python requirement:
  - black requires Python >=3.9, so it will not be satisfied for Python >=3.8,<3.9

Because pysonar-scanner depends on black (24.10.0) which requires Python >=3.9, version solving failed.

  * Check your dependencies Python requirement: The Python requirement can be specified via the `python` or `markers` properties

    For black, a possible solution would be to set the `python` property to ">=3.9"

    https://python-poetry.org/docs/dependency-specification/#python-restricted-dependencies,
    https://python-poetry.org/docs/dependency-specification/#using-environment-markers

08:57:01 [Info] Trace ID for JFrog Platform logs: b2bcde0952d244e0
08:57:01 [Error] Poetry config command failed with: exit status 1