diff --git a/CHANGELOG.md b/CHANGELOG.md index 744ea4a..e937948 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### 0.3.1 - 2023-09-06 +- Hypothesis >= 6.89.0 made some internal changes which broke our `from_grammar()`. + This patch restores compatibility, and requires the new Hypothesis. + ### 0.3.0 - 2023-09-06 - Even more efficient generation of Python identifiers, using [Hypothesis 6.84.1](https://hypothesis.readthedocs.io/en/latest/changes.html#v6-84-1) diff --git a/deps/check.txt b/deps/check.txt index 4bbec9c..a6bbd59 100644 --- a/deps/check.txt +++ b/deps/check.txt @@ -12,7 +12,7 @@ autoflake==2.2.1 # via shed bandit==1.7.5 # via flake8-bandit -black==23.7.0 +black==23.11.0 # via shed click==8.1.7 # via black @@ -29,21 +29,21 @@ flake8==6.1.0 # flake8-docstrings flake8-bandit==4.1.1 # via -r deps/check.in -flake8-bugbear==23.7.10 +flake8-bugbear==23.9.16 # via -r deps/check.in flake8-comprehensions==3.14.0 # via -r deps/check.in flake8-docstrings==1.7.0 # via -r deps/check.in -gitdb==4.0.10 +gitdb==4.0.11 # via gitpython -gitpython==3.1.34 +gitpython==3.1.40 # via bandit -hypothesis==6.84.1 +hypothesis==6.89.0 # via -r deps/check.in isort==5.12.0 # via shed -libcst==1.0.1 +libcst==1.1.0 # via shed markdown-it-py==3.0.0 # via rich @@ -51,22 +51,22 @@ mccabe==0.7.0 # via flake8 mdurl==0.1.2 # via markdown-it-py -mypy==1.5.1 +mypy==1.7.0 # via -r deps/check.in mypy-extensions==1.0.0 # via # black # mypy # typing-inspect -packaging==23.1 +packaging==23.2 # via black pathspec==0.11.2 # via black -pbr==5.11.1 +pbr==6.0.0 # via stevedore -platformdirs==3.10.0 +platformdirs==4.0.0 # via black -pycodestyle==2.11.0 +pycodestyle==2.11.1 # via flake8 pydocstyle==6.3.0 # via flake8-docstrings @@ -76,17 +76,17 @@ pyflakes==3.1.0 # flake8 pygments==2.16.1 # via rich -pyupgrade==3.10.1 +pyupgrade==3.15.0 # via shed pyyaml==6.0.1 # via # bandit # libcst -rich==13.5.2 +rich==13.7.0 # via bandit shed==2023.6.1 # via -r deps/check.in -smmap==5.0.0 +smmap==5.0.1 # via gitdb snowballstemmer==2.2.0 # via pydocstyle @@ -101,8 +101,9 @@ tomli==2.0.1 # autoflake # black # mypy -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via + # black # libcst # mypy # typing-inspect diff --git a/deps/test.txt b/deps/test.txt index 02bbbfe..abf3168 100644 --- a/deps/test.txt +++ b/deps/test.txt @@ -6,11 +6,11 @@ # attrs==23.1.0 # via hypothesis -black==23.7.0 +black==23.11.0 # via -r deps/test.in click==8.1.7 # via black -coverage[toml]==7.3.0 +coverage[toml]==7.3.2 # via pytest-cov exceptiongroup==1.1.3 # via @@ -18,19 +18,19 @@ exceptiongroup==1.1.3 # pytest execnet==2.0.2 # via pytest-xdist -hypothesis[lark]==6.84.1 +hypothesis[lark]==6.89.0 # via hypothesmith (setup.py) iniconfig==2.0.0 # via pytest -lark==1.1.7 +lark==1.1.8 # via hypothesis -libcst==1.0.1 +libcst==1.1.0 # via hypothesmith (setup.py) mypy-extensions==1.0.0 # via # black # typing-inspect -packaging==23.1 +packaging==23.2 # via # black # pytest @@ -38,18 +38,18 @@ parso==0.8.3 # via -r deps/test.in pathspec==0.11.2 # via black -platformdirs==3.10.0 +platformdirs==4.0.0 # via black pluggy==1.3.0 # via pytest -pytest==7.4.1 +pytest==7.4.3 # via # -r deps/test.in # pytest-cov # pytest-xdist pytest-cov==4.1.0 # via -r deps/test.in -pytest-xdist==3.3.1 +pytest-xdist==3.4.0 # via -r deps/test.in pyyaml==6.0.1 # via libcst @@ -60,8 +60,9 @@ tomli==2.0.1 # black # coverage # pytest -typing-extensions==4.7.1 +typing-extensions==4.8.0 # via + # black # libcst # typing-inspect typing-inspect==0.9.0 diff --git a/src/hypothesmith/__init__.py b/src/hypothesmith/__init__.py index 8dfbacd..3d06754 100644 --- a/src/hypothesmith/__init__.py +++ b/src/hypothesmith/__init__.py @@ -3,5 +3,5 @@ from hypothesmith.cst import from_node from hypothesmith.syntactic import from_grammar -__version__ = "0.3.0" +__version__ = "0.3.1" __all__ = ["from_grammar", "from_node"] diff --git a/src/hypothesmith/syntactic.py b/src/hypothesmith/syntactic.py index f01f6ad..654d8e7 100644 --- a/src/hypothesmith/syntactic.py +++ b/src/hypothesmith/syntactic.py @@ -80,12 +80,12 @@ def do_draw(self, data): # type: ignore return result def draw_symbol(self, data, symbol, draw_state): # type: ignore - count = len(draw_state.result) + count = len(draw_state) super().draw_symbol(data, symbol, draw_state) if symbol.name in COMPILE_MODES: try: compile( - source="".join(draw_state.result[count:]), + source="".join(draw_state[count:]), filename="", mode=COMPILE_MODES[symbol.name], ) @@ -108,7 +108,7 @@ def draw_symbol(self, data, symbol, draw_state): # type: ignore # Or the new https://bugs.python.org/issue45738 which makes me # wish CPython would start running proptests in CI already. assume(False) - source_code = ascii("".join(draw_state.result[count:])) + source_code = ascii("".join(draw_state[count:])) raise type(err)( f"compile({source_code}, '', " f"{COMPILE_MODES[symbol.name]!r}) "