Skip to content

blurb: support Python 3.10, drop EOL 3.6, and fix README badges #419

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
11 changes: 6 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----
Expand Down
2 changes: 1 addition & 1 deletion blurb/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions blurb/blurb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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')

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion blurb/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ author-email = "[email protected]"
maintainer = "Python Core Developers"
maintainer-email = "[email protected]"
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",
Expand Down