Repository: errbotio/errbot (branch: fix/tests)
Commit date: 2023-10-30T03:42:53Z

Workflow file: .github/workflows/python-package.yml (Python package)
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Python package

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

permissions:
  contents: read

jobs:
  build:

    runs-on: ubuntu-latest

    services:

      pypi_wayback:

        image: ghcr.io/waleko/pypi-wayback

        ports:

          - 8629:8080
    strategy:
      fail-fast: false
      matrix:
        python-version: [3.8, 3.9, "3.10"]

    steps:
    - uses: actions/checkout@v4.1.1
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4.7.1
      with:
        python-version: ${{ matrix.python-version }}

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install \
          pytest \
          tox
        cp tests/config-ci.py config.py

    - name: Test on ${{ matrix.python-version }}
      run: |
        tox -e py

    - name: Check Distribution
      if: ${{ matrix.python-version == '3.9' }}
      run: |
        tox -e dist-check

    - name: Codestyle
      if: ${{ matrix.python-version == '3.9' }}
      run: |
        tox -e codestyle

    - name: Lint - sort
      if: ${{ matrix.python-version == '3.9' }}
      run: |
        tox -e sort

    - name: Security
      if: ${{ matrix.python-version == '3.9' }}
      run: |
        tox -e security

    - name: Docs
      if: ${{ matrix.python-version == '3.9' }}
      run: |
        tox -e docs

env:
  PIP_INDEX_URL: http://localhost:8629/2023-10-30
  UV_INDEX_URL: http://localhost:8629/2023-10-30


Failed build logs:
step_name: build (3.9)/7_Codestyle.txt
log: ##[group]Run tox -e codestyle
[36;1mtox -e codestyle[0m
shell: /usr/bin/bash -e {0}
env:
  pythonLocation: /opt/hostedtoolcache/Python/3.9.18/x64
  PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib/pkgconfig
  Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.18/x64
  LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.18/x64/lib
##[endgroup]
.pkg: remove tox env folder /home/runner/work/errbot/errbot/.tox/.pkg
codestyle: install_deps> python -I -m pip install black
.pkg: install_requires> python -I -m pip install 'setuptools>=40.8.0' wheel
.pkg: _optional_hooks> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: get_requires_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: install_requires_for_build_wheel> python -I -m pip install wheel
.pkg: freeze> python -m pip freeze --all
.pkg: pip==23.3.1,setuptools==68.2.2,wheel==0.41.2
.pkg: prepare_metadata_for_build_wheel> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
.pkg: build_sdist> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
codestyle: install_package_deps> python -I -m pip install Pygments==2.16.1 ansi==0.3.6 colorlog==6.7.0 'daemonize==2.5.0; sys_platform != "win32"' deepmerge==1.1.0 dulwich==0.21.5 flask==2.3.3 jinja2==3.1.2 markdown==3.4.4 pyOpenSSL==23.2.0 pygments-markdown-lexer==0.1.0.dev39 requests==2.31.0 setuptools==68.1.2 webtest==3.0.0
codestyle: install_package> python -I -m pip install --force-reinstall --no-deps /home/runner/work/errbot/errbot/.tox/.tmp/package/3/errbot-9.9.9.tar.gz
codestyle: freeze> python -m pip freeze --all
codestyle: ansi==0.3.6,beautifulsoup4==4.12.2,black==23.10.1,blinker==1.6.3,certifi==2023.7.22,cffi==1.16.0,charset-normalizer==3.3.1,click==8.1.7,colorlog==6.7.0,cryptography==41.0.5,daemonize==2.5.0,deepmerge==1.1.0,dulwich==0.21.5,errbot @ file:///home/runner/work/errbot/errbot/.tox/.tmp/package/3/errbot-9.9.9.tar.gz#sha256=596448edc7b2f358f3344839c159709534d1380fdf40473638b51d2f08692cb6,Flask==2.3.3,idna==3.4,importlib-metadata==6.8.0,itsdangerous==2.1.2,Jinja2==3.1.2,Markdown==3.4.4,MarkupSafe==2.1.3,mypy-extensions==1.0.0,packaging==23.2,pathspec==0.11.2,pip==23.3.1,platformdirs==3.11.0,pycparser==2.21,Pygments==2.16.1,pygments-markdown-lexer==0.1.0.dev39,pyOpenSSL==23.2.0,requests==2.31.0,setuptools==68.1.2,soupsieve==2.5,tomli==2.0.1,typing_extensions==4.8.0,urllib3==2.0.7,waitress==2.1.2,WebOb==1.8.7,WebTest==3.0.0,Werkzeug==3.0.1,wheel==0.41.2,zipp==3.17.0
codestyle: commands[0]> black --check errbot/ tests/ tools/
would reformat /home/runner/work/errbot/errbot/errbot/core_plugins/vcheck.py

Oh no! 💥 💔 💥
1 file would be reformatted, 121 files would be left unchanged.
codestyle: exit 1 (1.65 seconds) /home/runner/work/errbot/errbot> black --check errbot/ tests/ tools/ pid=6313
.pkg: _exit> python /opt/hostedtoolcache/Python/3.9.18/x64/lib/python3.9/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
  codestyle: FAIL code 1 (17.08=setup[15.43]+cmd[1.65] seconds)
  evaluation failed :( (17.16 seconds)
##[error]Process completed with exit code 1.


Changed files:
errbot/core_plugins/vcheck.py

Fix diff:
diff --git a/errbot/core_plugins/vcheck.py b/errbot/core_plugins/vcheck.py
index 556ea235..ef0f2c0a 100644
--- a/errbot/core_plugins/vcheck.py
+++ b/errbot/core_plugins/vcheck.py
@@ -47,9 +47,7 @@ class VersionChecker(BotPlugin):
         # noinspection PyBroadException
         try:
             possible_versions = requests.get(HOME).json()
-            version = possible_versions.get(
-                f"python{major_py_version}", VERSION
-            )
+            version = possible_versions.get(f"python{major_py_version}", VERSION)
             self.log.debug("Latest Errbot version is: %s", version)
         except (HTTPError, URLError, ConnectionError, JSONDecodeError):
             self.log.info("Could not establish connection to retrieve latest version.")