Skip to content

Commit

Permalink
Add Pyston 2.2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
kura committed Jul 14, 2021
1 parent bc17ca1 commit fec548a
Show file tree
Hide file tree
Showing 13 changed files with 196 additions and 192 deletions.
53 changes: 22 additions & 31 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,34 @@ on:
workflow_dispatch:

jobs:
unittest:
unittest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', 'pypy-3.7']
python-version: ['3.7', '3.8', '3.9', 'pypy-3.7', 'pyston']
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
if: ${{ matrix.python-version != 'pyston' }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Set up Pyston
if: ${{ matrix.python-version == 'pyston' }}
run: |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv
~/.pyenv/bin/pyenv install pyston-2.2
echo "$HOME/.pyenv/versions/pyston-2.2/bin" >> $GITHUB_PATH
- uses: actions/cache@v2
env:
cache-name: unittest
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: unittest-cache-${{ matrix.python-version }}
- name: Apt install
run: sudo apt install shellcheck
- name: Pip install
run: pip install -U codecov tox tox-gh-actions
- name: Build and install uvloop
- name: Build and install libuv
run: |
git clone https://github.com/libuv/libuv.git
pushd libuv
Expand All @@ -39,8 +44,8 @@ jobs:
make
sudo make install
popd
- name: unittest ${{ matrix.python-version }}
run: tox
- name: Run tests
run: tox -vv
- name: Generate coverage report
run: tox -e coverage-report
- name: Upload coverage
Expand All @@ -49,7 +54,7 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
name: blackhole
name: blackhole
flags: unittests
env_vars: PYTHON
fail_ci_if_error: true
Expand All @@ -64,11 +69,9 @@ jobs:
python-version: '3.9'
architecture: x64
- uses: actions/cache@v2
env:
cache-name: lint
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: lint-cache
- name: Pip install
run: pip install tox
- name: Lint
Expand All @@ -84,11 +87,9 @@ jobs:
python-version: '3.9'
architecture: x64
- uses: actions/cache@v2
env:
cache-name: docs
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: docs-cache
- name: Pip install
run: pip install tox
- name: Docs
Expand All @@ -110,11 +111,9 @@ jobs:
python-version: '3.9'
architecture: x64
- uses: actions/cache@v2
env:
cache-name: build
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: build-cache
- name: Pip install
run: pip install tox
- name: Build
Expand All @@ -130,11 +129,9 @@ jobs:
python-version: '3.9'
architecture: x64
- uses: actions/cache@v2
env:
cache-name: man
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: man-cache
- name: Pip install
run: pip install tox
- name: Man
Expand All @@ -150,11 +147,9 @@ jobs:
python-version: '3.9'
architecture: x64
- uses: actions/cache@v2
env:
cache-name: poetry
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: poetry-cache
- name: Pip install
run: pip install tox
- name: Poetry
Expand All @@ -170,11 +165,9 @@ jobs:
python-version: '3.9'
architecture: x64
- uses: actions/cache@v2
env:
cache-name: setuppy
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: setuppy-cache
- name: Pip install
run: pip install tox
- name: setup.py
Expand All @@ -190,11 +183,9 @@ jobs:
python-version: '3.9'
architecture: x64
- uses: actions/cache@v2
env:
cache-name: shellcheck
with:
path: ~/.cache/pip
key: ${{ env.cache-name }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements-dev.txt') }}
key: shellcheck-cache
- name: Install shellcheck
run: sudo apt install shellcheck
- name: Pip install
Expand Down
13 changes: 9 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
fail_fast: true
exclude: ^(\.tox/|\.coverage|poetry\.lock)
repos:
- repo: https://github.com/psf/black
rev: stable
rev: 21.6b0
hooks:
- id: black

- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear, flake8-isort, flake8-commas]

- repo: https://github.com/timothycrosley/isort
rev: 4.3.21-2
rev: 5.9.2
hooks:
- id: isort
additional_dependencies: [toml]
exclude: ^.*/tests/.*\.py$

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
rev: v4.0.1
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -28,3 +30,6 @@ repos:
- id: check-symlinks
- id: debug-statements
- id: fix-encoding-pragma
- id: check-toml
- id: check-yaml
- id: destroyed-symlinks
13 changes: 10 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,24 @@ the functionality yourself.
Current release
---------------

.. _2.1.17:
.. _2.1.18:

2.1.17
2.1.18
======

- Release to update PyPI pages to remove references to Travis CI.
- Blackhole now officially supports Pyston 2.2 and above.

-------------
Past releases
-------------

.. _2.1.17:

2.1.17
======

- Release to update PyPI pages to remove references to Travis CI.

.. _2.1.16:

2.1.16
Expand Down
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,27 @@ shellcheck:

.PHONY: test
test:
tox -e py38
tox -vv -e py38

.PHONY: test_py37
test_py37:
tox -e py37,py37-setproctitle,py37-uvloop
tox -vv -e py37,py37-setproctitle,py37-uvloop

.PHONY: test_py38
test_py38:
tox -e py38,py38-setproctitle,py38-uvloop
tox -vv -e py38,py38-setproctitle,py38-uvloop

.PHONY: test_py39
test_py39:
tox -e py39,py39-setproctitle,py39-uvloop
tox -vv -e py39,py39-setproctitle,py39-uvloop

.PHONY: test_pypy3
tox -e pypy3,pypy3-setproctitle
test_pypy:
tox -vv -e pypy3,pypy3-setproctitle,py39-uvloop

.PHONY: test_pyston-3
test_pyston-3:
tox -vv -e pyston-3,pyston-3-setproctitle,pyston-3-uvloop

.PHONY: test_build
test_build:
Expand Down
2 changes: 1 addition & 1 deletion blackhole/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
__copyright__ = "None"
__credits__ = ("Kura",)
__license__ = "MIT"
__version__ = "2.1.17"
__version__ = "2.1.18"
__maintainer__ = "Kura"
__email__ = "[email protected]"
__status__ = "Stable"
Expand Down
2 changes: 1 addition & 1 deletion blackhole/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
class StreamProtocol(asyncio.streams.FlowControlMixin, asyncio.Protocol):
"""Helper class to adapt between Protocol and StreamReader."""

def __init__(self, *, loop=None, disconnect_error=RuntimeError, **kwargs):
def __init__(self, *, loop=None, **kwargs):
"""Stream protocol."""
super().__init__(loop=loop)
self.transport = None
Expand Down
2 changes: 1 addition & 1 deletion docs/source/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Overview
Requirements
============

- Python 3.7+ or PyPy 3.7+
- Python 3.7+, PyPy 3.7+, or Pyston 2.2+


.. _installation:
Expand Down
Loading

0 comments on commit fec548a

Please sign in to comment.