Skip to content

Commit

Permalink
Merge pull request #124 from ethereum/add-release-notes
Browse files Browse the repository at this point in the history
Add release notes
  • Loading branch information
carver committed Aug 18, 2022
2 parents 0de3520 + de4b171 commit fa51edd
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 35 deletions.
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -31,6 +31,7 @@ lint:
tox -elint

lint-roll:
black ssz tests scripts setup.py
isort --recursive ssz tests
$(MAKE) lint

Expand All @@ -41,7 +42,7 @@ test-all:
tox

build-docs:
sphinx-apidoc -o docs/ . setup.py "*conftest*"
sphinx-apidoc -o docs/ . setup.py "*conftest*" "tests/"
$(MAKE) -C docs clean
$(MAKE) -C docs html
$(MAKE) -C docs doctest
Expand Down
69 changes: 35 additions & 34 deletions docs/release_notes.rst
Expand Up @@ -3,42 +3,40 @@ Release Notes

.. towncrier release notes start
v0.1.0-alpha.0
--------------

- Launched repository, claimed names for pip, RTD, github, etc


v0.1.0-alpha.1
v0.2.4
--------------

Released 2018-02-05
Released 2020-03-24

- Implements January pre-release spec
- Update `pyrsistent` dependency.


v0.1.0-alpha.2
v0.1.0-alpha.8
--------------

Released 2018-02-05
Released 2018-05-05

- Add zero padding to tree hash - `#35 <https://github.com/ethereum/py-ssz/pull/35>`_
- Less strict class relationship requirement for equality of serializables -
`#71 <https://github.com/ethereum/py-ssz/pull/71>`_


v0.1.0-alpha.3
v0.1.0-alpha.7
--------------

Released 2018-04-04
Released 2018-05-02

- Implement spec version 0.5.0
- Fix equality of serializable objects - `#64 <https://github.com/ethereum/py-ssz/pull/64>`_
- Add helpers to convert objects to and from a human readable representation -
`#66 <https://github.com/ethereum/py-ssz/pull/66>`_
- Cache hash tree root of serializable objects - `#68 <https://github.com/ethereum/py-ssz/pull/68>`_


v0.1.0-alpha.4
v0.1.0-alpha.6
--------------

Released 2018-04-09
Released 2018-04-23

- Fix bug in serializable class - `#56 <https://github.com/ethereum/py-ssz/pull/56>`_
No changes


v0.1.0-alpha.5
Expand All @@ -53,37 +51,40 @@ Released 2018-04-23
`#57 <https://github.com/ethereum/py-ssz/pull/57>`_


v0.1.0-alpha.6
v0.1.0-alpha.4
--------------

Released 2018-04-23
Released 2018-04-09

No changes
- Fix bug in serializable class - `#56 <https://github.com/ethereum/py-ssz/pull/56>`_


v0.1.0-alpha.7
v0.1.0-alpha.3
--------------

Released 2018-05-02
Released 2018-04-04

- Fix equality of serializable objects - `#64 <https://github.com/ethereum/py-ssz/pull/64>`_
- Add helpers to convert objects to and from a human readable representation -
`#66 <https://github.com/ethereum/py-ssz/pull/66>`_
- Cache hash tree root of serializable objects - `#68 <https://github.com/ethereum/py-ssz/pull/68>`_
- Implement spec version 0.5.0


v0.1.0-alpha.8
v0.1.0-alpha.2
--------------

Released 2018-05-05
Released 2018-02-05

- Less strict class relationship requirement for equality of serializables -
`#71 <https://github.com/ethereum/py-ssz/pull/71>`_
- Add zero padding to tree hash - `#35 <https://github.com/ethereum/py-ssz/pull/35>`_


v0.2.4
v0.1.0-alpha.1
--------------

Released 2020-03-24
Released 2018-02-05

- Implements January pre-release spec


v0.1.0-alpha.0
--------------

- Launched repository, claimed names for pip, RTD, github, etc

- Update `pyrsistent` dependency.
1 change: 1 addition & 0 deletions newsfragments/109.bugfix.rst
@@ -0,0 +1 @@
Reject empty bytes at the end of a bitlist as invalid
1 change: 1 addition & 0 deletions newsfragments/111.bugfix.rst
@@ -0,0 +1 @@
Reject vectors and bitvectors of length 0 as invalid, as defined in the spec.
1 change: 1 addition & 0 deletions newsfragments/116.bugfix.rst
@@ -0,0 +1 @@
Enforce that vector types must have a maximum length of 1 or more, and lists may have a 0 max length
3 changes: 3 additions & 0 deletions newsfragments/118.feature.rst
@@ -0,0 +1,3 @@
Add a :class:`~ssz.sedes.byte_list.ByteList` sedes that is more convenient and more performant. With
ByteList, the caller can decode a :class:`bytes` object, rather than passing in a list of
single-byte elements.
1 change: 1 addition & 0 deletions newsfragments/120.internal.rst
@@ -0,0 +1 @@
Upgrade black to a stable version, and pass newest style checks
2 changes: 2 additions & 0 deletions newsfragments/121.internal.rst
@@ -0,0 +1,2 @@
Use the latest project template, which gives many developer-focused benefits: in making release
notes, releasing new versions, etc.
1 change: 1 addition & 0 deletions newsfragments/124.doc.rst
@@ -0,0 +1 @@
Sort release notes with most recent on top
3 changes: 3 additions & 0 deletions newsfragments/124.misc.rst
@@ -0,0 +1,3 @@
Run black autoformat, as part of ``make lint-roll``. Added some tests to check length validation of
:class:`~ssz.sedes.byte_list.ByteList` and :class:`~ssz.sedes.byte_vector.ByteVector`. When
generating website docs from docstrings, skip tests.
19 changes: 19 additions & 0 deletions tests/sedes/test_composite_sedes.py
Expand Up @@ -10,6 +10,8 @@
from ssz.sedes import (
Bitlist,
Bitvector,
ByteList,
ByteVector,
Container,
List,
UInt,
Expand Down Expand Up @@ -195,6 +197,23 @@ def test_homogeneous_sequence_length_boundary(
sedes_type(element_type, length)


@pytest.mark.parametrize(
("sedes_type", "length", "is_valid"),
(
(ByteList, 0, True),
(ByteList, -1, False),
(ByteVector, 1, True),
(ByteVector, 0, False),
),
)
def test_byte_sequence_length_boundary(sedes_type, length, is_valid):
if is_valid:
sedes_type(length)
else:
with pytest.raises(ValueError):
sedes_type(length)


@pytest.mark.parametrize(
("sedes_type", "length", "is_valid"),
(
Expand Down

0 comments on commit fa51edd

Please sign in to comment.