Skip to content
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
14 changes: 7 additions & 7 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ dev

-

**API Changes (Backward-compatible)**
**API Changes (Backward Compatible)**

-

Expand All @@ -19,15 +19,15 @@ dev
6.0.1 (2021-04-17)
------------------

**API Changes (Backward-compatible)**
**API Changes (Backward Compatible)**

- Added support for Python 3.9.
- Added type hints.

6.0.0 (2020-09-06)
------------------

**API Changes (Backward-incompatible)**
**API Changes (Backward Incompatible)**

- Introduce ``HyperframeError`` base exception class for all errors raised within hyperframe.
- Change exception base class of ``UnknownFrameError`` to ``HyperframeError``
Expand All @@ -37,7 +37,7 @@ dev
- Invalid SETTINGS frames (non-empty but ACK) now raise ``InvalidDataError``.
- Invalid ALTSVC frames with non-bytestring field or origin now raise ``InvalidDataError``.

**API Changes (Backward-compatible)**
**API Changes (Backward Compatible)**

- Deprecate ``total_padding`` - use `pad_length` instead.
- Improve repr() output for all frame classes.
Expand All @@ -60,7 +60,7 @@ dev
5.2.0 (2019-01-18)
------------------

**API Changes (Backward-compatible)**
**API Changes (Backward Compatible)**

- Add a new ENABLE_CONNECT_PROTOCOL settings parameter.

Expand All @@ -72,7 +72,7 @@ dev
5.1.0 (2017-04-24)
------------------

**API Changes (Backward-compatible)**
**API Changes (Backward Compatible)**

- Added support for ``DataFrame.data`` being a ``memoryview`` object.

Expand Down Expand Up @@ -119,7 +119,7 @@ dev
3.2.0 (2016-02-02)
------------------

**API Changes (Backward-compatible)**
**API Changes (Backward Compatible)**

- Invalid PING frame bodies now raise ``InvalidFrameError``, not
``ValueError``. Note that ``InvalidFrameError`` is a ``ValueError`` subclass.
Expand Down
3 changes: 1 addition & 2 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
graft src
graft src/hyperframe
graft docs
graft test
prune docs/build
prune test/http2-frame-test-case
include README.rst LICENSE CHANGELOG.rst CONTRIBUTORS.rst tox.ini .gitmodules
include src/hyperframe/py.typed
global-exclude *.pyc *.pyo *.swo *.swp *.map *.yml *.DS_Store
5 changes: 0 additions & 5 deletions Makefile

This file was deleted.

1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ source =

[flake8]
max-line-length = 120
max-complexity = 10

[check-manifest]
ignore =
Expand Down
12 changes: 4 additions & 8 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import itertools
#!/usr/bin/env python3

import os
import re
import sys

from setuptools import setup, find_packages

Expand All @@ -12,12 +10,10 @@
with open(os.path.join(PROJECT_ROOT, 'README.rst')) as file_:
long_description = file_.read()

# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open(os.path.join(PROJECT_ROOT, 'src/hyperframe/__init__.py')) as file_:
text = file_.read()
match = re.search(version_regex, text)

if match:
version = match.group(1)
else:
Expand All @@ -33,10 +29,9 @@
author_email='cory@lukasa.co.uk',
url='https://github.com/python-hyper/hyperframe/',
packages=find_packages(where="src"),
package_data={'': ['LICENSE', 'README.rst', 'CHANGELOG.rst'], "hyperframe": ["py.typed"]},
package_data={'hyperframe': ['py.typed']},
package_dir={'': 'src'},
python_requires='>=3.6.1',
include_package_data=True,
license='MIT License',
classifiers=[
'Development Status :: 5 - Production/Stable',
Expand All @@ -47,6 +42,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
],
Expand Down
2 changes: 1 addition & 1 deletion src/hyperframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def parse_frame_header(header: memoryview, strict: bool = False) -> Tuple["Frame
type is received.

.. versionchanged:: 5.0.0
Added :param:`strict` to accommodate :class:`ExtensionFrame`
Added ``strict`` parameter to accommodate :class:`ExtensionFrame`
"""
try:
fields = _STRUCT_HBBBL.unpack(header)
Expand Down
37 changes: 22 additions & 15 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ envlist = py36, py37, py38, py39, pypy3, lint, docs, packaging
python =
3.6: py36
3.7: py37
3.8: py38, lint, docs, packaging
3.9: py39
3.8: py38
3.9: py39, lint, docs, packaging
pypy3: pypy3

[testenv]
Expand All @@ -23,34 +23,41 @@ commands =
# temporarily disable coverage testing on PyPy due to performance problems
commands = pytest {posargs}

[testenv:lint]
deps =
flake8>=3.9.1,<4
mypy==0.812
commands =
flake8 src/ test/
mypy --strict src/

[testenv:docs]
basepython = python3.8
deps =
sphinx>=3.5.4,<4
sphinx>=4.0.2,<5
whitelist_externals = make
changedir = {toxinidir}/docs
commands =
make clean
make html

[testenv:lint]
basepython = python3.8
deps =
flake8==3.9.1
mypy==0.812
commands =
flake8 --max-complexity 10 src test
mypy --strict src/

[testenv:packaging]
basepython = python3.8
basepython = python3.9
deps =
check-manifest==0.46
readme-renderer==29.0
twine==3.4.1
twine>=3.4.1,<4
whitelist_externals = rm
commands =
rm -rf dist/
check-manifest
python setup.py sdist bdist_wheel
twine check dist/*

[testenv:publish]
basepython = {[testenv:packaging]basepython}
deps =
{[testenv:packaging]deps}
whitelist_externals = {[testenv:packaging]whitelist_externals}
commands =
{[testenv:packaging]commands}
twine upload dist/*