From e5a4a3a6985d5e2ce1eb0c1db900881fe9e0b6d7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 12:30:17 +0200 Subject: [PATCH] build(deps): bump coverage from 7.6.1 to 7.6.2 (#781) * build(deps): bump coverage from 7.6.1 to 7.6.2 Bumps [coverage](https://github.com/nedbat/coveragepy) from 7.6.1 to 7.6.2. - [Release notes](https://github.com/nedbat/coveragepy/releases) - [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst) - [Commits](https://github.com/nedbat/coveragepy/compare/7.6.1...7.6.2) --- updated-dependencies: - dependency-name: coverage dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * drop python 3.8 for coverage --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: mayeut --- .github/workflows/coverage.yml | 2 +- noxfile.py | 15 +++++++-------- requirements-coverage.txt | 2 +- src/pybase64/__main__.py | 4 ++-- 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index d91bf9a..7f69249 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -22,7 +22,7 @@ jobs: - uses: wntrblm/nox@2024.10.09 with: - python-versions: "3.8, 3.12, pypy3.10" + python-versions: "3.13, pypy3.10" - name: Install Intel SDE run: | diff --git a/noxfile.py b/noxfile.py index 1a1cf43..c506a54 100644 --- a/noxfile.py +++ b/noxfile.py @@ -76,7 +76,7 @@ def test(session: nox.Session) -> None: session.run("pytest", *session.posargs, env=env) -@nox.session(python=["3.8", "3.12", "pypy3.10"]) +@nox.session(python=["3.13", "pypy3.10"]) def _coverage(session: nox.Session) -> None: """internal coverage run. Do not run manually""" with_sde = "--with-sde" in session.posargs @@ -137,13 +137,12 @@ def _coverage(session: nox.Session) -> None: @nox.session(venv_backend="none") def coverage(session: nox.Session) -> None: """Coverage tests.""" - posargs = set(session.posargs) - assert len(posargs & {"--clean", "--report"}) == 0 - assert len(posargs - {"--with-sde"}) == 0 - posargs.add("--report") - session.notify("_coverage-3.8", ["--clean"]) - session.notify("_coverage-pypy3.10", []) - session.notify("_coverage-3.12", posargs) + posargs_ = set(session.posargs) + assert len(posargs_ & {"--clean", "--report"}) == 0 + assert len(posargs_ - {"--with-sde"}) == 0 + posargs = [*session.posargs, "--report"] + session.notify("_coverage-pypy3.10", ["--clean"]) + session.notify("_coverage-3.13", posargs) @nox.session(python="3.12") diff --git a/requirements-coverage.txt b/requirements-coverage.txt index 0167262..cc06957 100644 --- a/requirements-coverage.txt +++ b/requirements-coverage.txt @@ -1,4 +1,4 @@ -r requirements-test.txt gcovr==8.0 pytest-cov==5.0.0 -coverage==7.6.1 +coverage==7.6.2 diff --git a/src/pybase64/__main__.py b/src/pybase64/__main__.py index 19382ca..14c2fcf 100644 --- a/src/pybase64/__main__.py +++ b/src/pybase64/__main__.py @@ -96,12 +96,12 @@ def bench_one( def readall(file: BinaryIO) -> bytes: - if file == cast(BinaryIO, sys.stdin): + if sys.version_info[:2] == (3, 8) and file == cast(BinaryIO, sys.stdin): # pragma: no cover # Python 3 < 3.9 does not honor the binary flag, # read from the underlying buffer if hasattr(file, "buffer"): return cast(BinaryIO, file.buffer).read() - return file.read() # pragma: no cover + return file.read() # do not close the file try: data = file.read()