diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ae1810..19f62eb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,10 +13,10 @@ jobs: strategy: matrix: python: - - '3.6' - '3.7' - '3.8' - '3.9' + - '3.10' name: ${{ matrix.python }} runs-on: ubuntu-latest steps: diff --git a/README.rst b/README.rst index 8114602..3b6f056 100644 --- a/README.rst +++ b/README.rst @@ -2,12 +2,13 @@ core-workflow ============= Issue tracker and relevant tools for CPython's workflow -.. image:: https://travis-ci.org/python/core-workflow.svg?branch=master - :target: https://travis-ci.org/python/core-workflow +.. image:: https://github.com/python/core-workflow/actions/workflows/tests.yml/badge.svg + :alt: GitHub Actions + :target: https://github.com/python/core-workflow/actions -.. image:: https://img.shields.io/badge/zulip-join_chat-brightgreen.svg - :alt: Python Zulip chat - :target: https://python.zulipchat.com +.. image:: https://img.shields.io/badge/Discourse-join_chat-brightgreen.svg + :alt: Python Discourse chat + :target: https://discuss.python.org/ blurb ----- diff --git a/blurb/README.rst b/blurb/README.rst index 1962427..e71d702 100644 --- a/blurb/README.rst +++ b/blurb/README.rst @@ -25,7 +25,7 @@ and automatically uses the correct file paths. You can install **blurb** from PyPI using ``pip``. Alternatively, simply add ``blurb`` to a directory on your path. -**blurb**'s only dependency is Python 3.5+. +**blurb**'s only dependency is Python 3.7+. Files used by blurb diff --git a/blurb/blurb.py b/blurb/blurb.py index 86d7de0..78177e2 100755 --- a/blurb/blurb.py +++ b/blurb/blurb.py @@ -521,7 +521,7 @@ def load(self, filename, *, metadata=None): Broadly equivalent to blurb.parse(open(filename).read()). """ - with open(filename, "rt", encoding="utf-8") as file: + with open(filename, encoding="utf-8") as file: text = file.read() self.parse(text, metadata=metadata, filename=filename) @@ -683,7 +683,7 @@ def filename_test(self, filename): def run(s): - process = subprocess.run(s.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) + process = subprocess.run(s.split(), capture_output=True) process.check_returncode() return process.stdout.decode('ascii') @@ -711,7 +711,7 @@ def chdir_to_repo_root(): def test_first_line(filename, test): if not os.path.exists(filename): return False - with open(filename, "rt") as file: + with open(filename) as file: lines = file.read().split('\n') if not (lines and test(lines[0])): return False @@ -1335,7 +1335,7 @@ def flush_version(): blurbs.clear() version_count += 1 - with open("NEWS", "rt", encoding="utf-8") as file: + with open("NEWS", encoding="utf-8") as file: for line_number, line in enumerate(file): line = line.rstrip() diff --git a/blurb/pyproject.toml b/blurb/pyproject.toml index 38d9ac0..e5398ee 100644 --- a/blurb/pyproject.toml +++ b/blurb/pyproject.toml @@ -9,7 +9,7 @@ author-email = "larry@hastings.org" maintainer = "Python Core Developers" maintainer-email = "core-workflow@mail.python.org" home-page = "https://github.com/python/core-workflow/tree/master/blurb" -requires-python = ">=3.6" +requires-python = ">=3.7" description-file = "README.rst" classifiers = [ "Intended Audience :: Developers",