Skip to content

Commit

Permalink
Added supported for old Python 3.6.
Browse files Browse the repository at this point in the history
Python 3.6 is the default Python version on Ubuntu 18.04 LTS, which is
still within its five-year support period. Having Python 3.6 support
can therefore be useful.
  • Loading branch information
john-hen committed Aug 1, 2022
1 parent 767becc commit 87aefa1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/report_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Python.
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.10"

- name: Install package.
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Python.
uses: actions/setup-python@v4
with:
python-version: "3.7"
python-version: "3.10"

- name: Install package.
run: pip install .[test]
Expand All @@ -34,7 +34,7 @@ jobs:

strategy:
matrix:
python: ["3.7", "3.8", "3.9", "3.10"]
python: ["3.6", "3.7", "3.8", "3.9", "3.10"]

runs-on: ubuntu-latest

Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,13 @@ classifiers = [
'License :: OSI Approved :: MIT License',
]
readme = 'PyPI.md'
requires-python = '>=3.7'
dependencies = ['Flake8<5', 'TOMLi']
dynamic = ['version', 'description']
requires-python = '>=3.6'
dependencies = [
'Flake8<5',
'TOMLi',
'TOMLi<2; python_version < "3.7"',
]

[project.scripts]
flake8p = 'flake8p:main'
Expand Down
3 changes: 2 additions & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

def capture(command, fixture):
folder = Path(__file__).parent/'fixtures'/fixture
process = run(command, stdout=PIPE, text=True, cwd=folder)
process = run(command, stdout=PIPE, universal_newlines=True, cwd=folder)
# From Python 3.7 on, use `text=True` instead of `universal newlines`.
return process.stdout.strip()


Expand Down

0 comments on commit 87aefa1

Please sign in to comment.