From 98141bb84ade59b2fee8c04052d96d53f9383e33 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 5 Jan 2022 14:24:28 +0200 Subject: [PATCH 1/3] Add Python 3.10, drop EOL 3.6 --- .github/workflows/tests.yml | 2 +- blurb/README.rst | 2 +- blurb/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/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/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", From 728e67c2a85bcbd8834011cf40940c037e28bc80 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 5 Jan 2022 14:44:40 +0200 Subject: [PATCH 2/3] Upgrade Python syntax with pyupgrade --py37-plus --- blurb/blurb.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() From abee8656d0a9d30416b8d550f20ebe7738333792 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 5 Jan 2022 14:44:49 +0200 Subject: [PATCH 3/3] Replace badges: Travis CI with GitHub Actions, Zulip with Discourse --- README.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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 -----