diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4baef9b6f..9735170ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,14 +80,9 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "macos-latest", "windows-latest"] + os: ["macos-latest"] # pypy version pin was required due 7.3.13 being broken https://foss.heptapod.net/pypy/pypy/-/issues/4021 - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.10-nightly"] - exclude: - - os: "macos-latest" - python-version: "pypy-3.10-nightly" - - os: "windows-latest" - python-version: "pypy-3.10-nightly" + python-version: ["3.11"] steps: - uses: actions/checkout@v3 with: @@ -108,134 +103,3 @@ jobs: # Limit CI workload by running integration tests with secrets only on edge Python versions. if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' && contains(fromJSON('["3.7", "pypy-3.10-nightly", "3.11"]'), matrix.python-version) }} run: nox -vs integration -- -m "require_secrets" --cleanup - test-docker: - needs: cleanup_buckets - env: - B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }} - B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - - name: setup sudo NOX_PYTHONS - run: echo NOX_PYTHONS=$(sudo python3 --version | cut -d ' ' -f 2) >> "$GITHUB_ENV" - - name: Install dependencies - run: sudo python -m pip install --upgrade nox pip setuptools - - name: Generate Dockerfile - run: nox -vs generate_dockerfile - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Build Docker - uses: docker/build-push-action@v5 - with: - context: . - load: true - tags: backblazeit/b2:test - platforms: linux/amd64 - - name: Run tests with docker - if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} - run: sudo NOX_PYTHONS=$NOX_PYTHONS B2_TEST_APPLICATION_KEY=${{ env.B2_TEST_APPLICATION_KEY }} B2_TEST_APPLICATION_KEY_ID=${{ env.B2_TEST_APPLICATION_KEY_ID }} nox -vs docker_test -- backblazeit/b2:test - test-linux-bundle: - needs: cleanup_buckets - env: - B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }} - B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }} - runs-on: ubuntu-latest - container: - image: "python:3.11" # can not use ${{ env.PYTHON_DEFAULT_VERSION }} here - env: - DEBIAN_FRONTEND: noninteractive - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install dependencies - run: | - apt-get -y update - apt-get -y install patchelf - python -m pip install --upgrade nox pip setuptools - git config --global --add safe.directory '*' - - name: Bundle the distribution - id: bundle - run: nox -vs bundle >> $GITHUB_OUTPUT - - name: Generate hashes - id: hashes - run: nox -vs make_dist_digest - - name: Run integration tests (without secrets) - run: nox -vs integration -- -m "not require_secrets" - - name: Run integration tests (with secrets) - if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} - run: nox -vs integration -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup - - name: Upload assets - if: failure() - uses: actions/upload-artifact@v2 - with: - path: ${{ steps.bundle.outputs.asset_path }} - if-no-files-found: warn - retention-days: 7 - test-windows-bundle: - needs: cleanup_buckets - env: - B2_TEST_APPLICATION_KEY: ${{ secrets.B2_TEST_APPLICATION_KEY }} - B2_TEST_APPLICATION_KEY_ID: ${{ secrets.B2_TEST_APPLICATION_KEY_ID }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [windows-2019, windows-latest] - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - - name: Install dependencies - run: python -m pip install --upgrade nox pip setuptools - - name: Bundle the distribution - id: bundle - shell: bash - run: nox -vs bundle >> $GITHUB_OUTPUT - - name: Generate hashes - id: hashes - run: nox -vs make_dist_digest - - name: Run integration tests (without secrets) - run: nox -vs integration -- -m "not require_secrets" - - name: Run integration tests (with secrets) - if: ${{ env.B2_TEST_APPLICATION_KEY != '' && env.B2_TEST_APPLICATION_KEY_ID != '' }} - run: nox -vs integration -- --sut=${{ steps.bundle.outputs.sut_path }} -m "require_secrets" --cleanup - - name: Upload assets - if: failure() - uses: actions/upload-artifact@v2 - with: - path: ${{ steps.bundle.outputs.asset_path }} - if-no-files-found: warn - retention-days: 7 - doc: - needs: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Set up Python ${{ env.PYTHON_DEFAULT_VERSION }} - uses: actions/setup-python@v4 - with: - python-version: ${{ env.PYTHON_DEFAULT_VERSION }} - - name: Install dependencies - env: - DEBIAN_FRONTEND: noninteractive - run: | - sudo apt-get update -y - sudo apt-get install -y graphviz plantuml - python -m pip install --upgrade nox pip setuptools - - name: Build the docs - run: nox --non-interactive -vs doc diff --git a/b2/console_tool.py b/b2/console_tool.py index 9785a8a57..876c1ae32 100644 --- a/b2/console_tool.py +++ b/b2/console_tool.py @@ -701,7 +701,8 @@ def __exit__(self, exc_type, exc_val, exc_tb): if sys.platform != "darwin": return try: - print('\n\n\n\nI\'m running!!!!!!\n\n\n\n\n') + print('\n\n\n\nI\'m running!!!!!!\n\n\n\n\n', file=sys.stdout) + print('\n\n\n\nI\'m running!!!!!!\n\n\n\n\n', file=sys.stderr) from multiprocessing.synchronize import SemLock tqdm_lock = self.progress_listener.tqdm.get_lock() SemLock._cleanup(tqdm_lock.mp_lock._semlock.name)