Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scheduled weekly dependency update for week 41 #2639

Merged
merged 5 commits into from
Oct 14, 2020
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
4 changes: 4 additions & 0 deletions hypothesis-python/RELEASE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
RELEASE_TYPE: patch

This patch fixes :func:`~hypothesis.extra.lark.from_lark` with version
0.10.1+ of the :pypi:`lark-parser` package.
9 changes: 8 additions & 1 deletion hypothesis-python/src/hypothesis/extra/lark.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ def __init__(self, grammar, start, explicit):
start = [start]
self.grammar = grammar

if "start" in getfullargspec(grammar.grammar.compile).args:
# This is a total hack, but working around the changes is a nicer user
# experience than breaking for anyone who doesn't instantly update their
# installation of Lark alongside Hypothesis.
compile_args = getfullargspec(grammar.grammar.compile).args
if "terminals_to_keep" in compile_args:
terminals, rules, ignore_names = grammar.grammar.compile(start, ())
elif "start" in compile_args: # pragma: no cover
# Support lark <= 0.10.0, without the terminals_to_keep argument.
terminals, rules, ignore_names = grammar.grammar.compile(start)
else: # pragma: no cover
# This branch is to support lark <= 0.7.1, without the start argument.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1476,7 +1476,7 @@ def as_strategy(strat_or_callable, thing, final=True):
# We also have a special case for TypeVars.
# They are represented as instances like `~T` when they come here.
# We need to work with their type instead.
if isinstance(thing, TypeVar) and type(thing) in types._global_type_lookup: # type: ignore
if isinstance(thing, TypeVar) and type(thing) in types._global_type_lookup:
return as_strategy(types._global_type_lookup[type(thing)], thing)
# If there's no explicitly registered strategy, maybe a subtype of thing
# is registered - if so, we can resolve it to the subclass strategy.
Expand Down
4 changes: 2 additions & 2 deletions requirements/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#
attrs==20.2.0 # via hypothesis (hypothesis-python/setup.py)
coverage==5.3 # via -r requirements/coverage.in
lark-parser==0.10.0 # via -r requirements/coverage.in
lark-parser==0.10.1 # via -r requirements/coverage.in
numpy==1.19.2 # via -r requirements/coverage.in, pandas
pandas==1.1.2 # via -r requirements/coverage.in
pandas==1.1.3 # via -r requirements/coverage.in
python-dateutil==2.8.1 # via pandas
pytz==2020.1 # via -r requirements/coverage.in, pandas
six==1.15.0 # via python-dateutil
Expand Down
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
apipkg==1.5 # via execnet
attrs==20.2.0 # via hypothesis (hypothesis-python/setup.py), pytest
execnet==1.7.1 # via pytest-xdist
iniconfig==1.0.1 # via pytest
iniconfig==1.1.1 # via pytest
packaging==20.4 # via pytest
pexpect==4.8.0 # via -r requirements/test.in
pluggy==0.13.1 # via pytest
Expand Down
24 changes: 12 additions & 12 deletions requirements/tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ certifi==2020.6.20 # via requests
cffi==1.14.3 # via cryptography
chardet==3.0.4 # via requests
click==7.1.2 # via black, pip-tools, pyupio, safety
colorama==0.4.3 # via twine
colorama==0.4.4 # via twine
coverage==5.3 # via -r requirements/tools.in
cryptography==3.1.1 # via secretstorage
decorator==4.4.2 # via ipython
Expand All @@ -40,19 +40,19 @@ gitdb==4.0.5 # via gitpython
gitpython==3.1.9 # via bandit
idna==2.10 # via requests
imagesize==1.2.0 # via sphinx
iniconfig==1.0.1 # via pytest
iniconfig==1.1.1 # via pytest
ipython-genutils==0.2.0 # via traitlets
ipython==7.18.1 # via -r requirements/tools.in
isort==5.5.4 # via -r requirements/tools.in
isort==5.6.4 # via -r requirements/tools.in
jedi==0.17.2 # via ipython
jeepney==0.4.3 # via keyring, secretstorage
jinja2==2.11.2 # via pyupio, sphinx
keyring==21.4.0 # via twine
lark-parser==0.10.0 # via -r requirements/tools.in
lark-parser==0.10.1 # via -r requirements/tools.in
markupsafe==1.1.1 # via jinja2
mccabe==0.6.1 # via flake8
mypy-extensions==0.4.3 # via black, mypy
mypy==0.782 # via -r requirements/tools.in
mypy==0.790 # via -r requirements/tools.in
numpy==1.19.2 # via -r requirements/tools.in
packaging==20.4 # via bleach, dparse, pytest, pyupio, safety, sphinx, tox
parso==0.7.1 # via jedi
Expand All @@ -63,7 +63,7 @@ pickleshare==0.7.5 # via ipython
pip-tools==5.3.1 # via -r requirements/tools.in
pkginfo==1.5.0.1 # via twine
pluggy==0.13.1 # via pytest, tox
prompt-toolkit==3.0.7 # via ipython
prompt-toolkit==3.0.8 # via ipython
ptyprocess==0.6.0 # via pexpect
py==1.9.0 # via pytest, tox
pycodestyle==2.6.0 # via flake8, flake8-bandit
Expand All @@ -81,8 +81,8 @@ pytz==2020.1 # via babel, django
pyupgrade==2.7.2 # via -r requirements/tools.in
pyupio==1.1.1 # via -r requirements/tools.in
pyyaml==5.3.1 # via bandit, dparse, pyupio
readme-renderer==26.0 # via twine
regex==2020.9.27 # via black
readme-renderer==27.0 # via twine
regex==2020.10.11 # via black
requests-toolbelt==0.9.1 # via twine
requests==2.24.0 # via -r requirements/tools.in, pygithub, python-gitlab, pyupio, requests-toolbelt, safety, sphinx, twine
restructuredtext-lint==1.3.1 # via -r requirements/tools.in
Expand All @@ -102,18 +102,18 @@ sphinxcontrib-htmlhelp==1.0.3 # via sphinx
sphinxcontrib-jsmath==1.0.1 # via sphinx
sphinxcontrib-qthelp==1.0.3 # via sphinx
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
sqlparse==0.3.1 # via django
sqlparse==0.4.1 # via django
stevedore==3.2.2 # via bandit
tokenize-rt==4.0.0 # via pyupgrade
toml==0.10.1 # via -r requirements/tools.in, black, dparse, pytest, tox
tox==3.20.0 # via -r requirements/tools.in
tqdm==4.50.0 # via pyupio, twine
tox==3.20.1 # via -r requirements/tools.in
tqdm==4.50.2 # via pyupio, twine
traitlets==5.0.4 # via ipython
twine==3.2.0 # via -r requirements/tools.in
typed-ast==1.4.1 # via black, mypy
typing-extensions==3.7.4.3 # via black, mypy
urllib3==1.25.10 # via requests
virtualenv==20.0.33 # via tox
virtualenv==20.0.34 # via tox
wcwidth==0.2.5 # via prompt-toolkit
webencodings==0.5.1 # via bleach
wrapt==1.12.1 # via deprecated
Expand Down