Skip to content

Commit ba47e05

Browse files
DRMacIverZac-HD
authored andcommitted
Update pinned dependencies
1 parent 910253d commit ba47e05

File tree

15 files changed

+49
-58
lines changed

15 files changed

+49
-58
lines changed

hypothesis-python/RELEASE.rst

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
RELEASE_TYPE: patch
2+
3+
This patch updates our autoformatting tools, improving our code style without any API changes.

hypothesis-python/src/hypothesis/_settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ def __call__(self, test: T) -> T:
207207
)
208208
setattr(test, attr_name, True)
209209
_test.TestCase.settings = self
210-
return test
210+
return test # type: ignore
211211
else:
212212
raise InvalidArgument(
213213
"@settings(...) can only be used as a decorator on "

hypothesis-python/src/hypothesis/entry_points.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# We prefer to use importlib.metadata, or the backport on Python <= 3.7,
2020
# because it's much faster than pkg_resources (200ms import time speedup).
2121
try:
22-
from importlib import metadata as importlib_metadata
22+
from importlib import metadata as importlib_metadata # type: ignore
2323
except ImportError:
2424
import importlib_metadata # type: ignore # mypy thinks this is a redefinition
2525

@@ -33,7 +33,6 @@ def get_entry_points():
3333
eps = importlib_metadata.entry_points().get("hypothesis", [])
3434
yield from eps
3535

36-
3736
except ImportError:
3837
# But if we're not on Python >= 3.8 and the importlib_metadata backport
3938
# is not installed, we fall back to pkg_resources anyway.

hypothesis-python/src/hypothesis/extra/cli.py

-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ def main():
6565
sys.stderr.write(MESSAGE.format("click"))
6666
sys.exit(1)
6767

68-
6968
else:
7069
# Ensure that Python scripts in the current working directory are importable,
7170
# on the principle that Ghostwriter should 'just work' for novice users. Note

hypothesis-python/src/hypothesis/extra/ghostwriter.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ def _type_from_doc_fragment(token: str) -> Optional[type]:
221221
return int
222222
if "numpy" in sys.modules:
223223
if re.fullmatch(r"[Aa]rray[-_ ]?like", token):
224-
return sys.modules["numpy"].ndarray # type: ignore
224+
return sys.modules["numpy"].ndarray
225225
elif token == "dtype":
226-
return sys.modules["numpy"].dtype # type: ignore
226+
return sys.modules["numpy"].dtype
227227
# Natural-language syntax, e.g. "sequence of integers"
228228
coll_match = re.fullmatch(r"(\w+) of (\w+)", token)
229229
if coll_match is not None:
@@ -775,7 +775,7 @@ def magic(
775775
functions.add(thing)
776776
elif isinstance(thing, types.ModuleType):
777777
if hasattr(thing, "__all__"):
778-
funcs = [getattr(thing, name, None) for name in thing.__all__] # type: ignore
778+
funcs = [getattr(thing, name, None) for name in thing.__all__]
779779
else:
780780
pkg = thing.__package__
781781
funcs = [

hypothesis-python/src/hypothesis/internal/coverage.py

-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ def accept(*args, **kwargs):
9999

100100
return accept
101101

102-
103102
else: # pragma: no cover
104103

105104
def check_function(f: Func) -> Func:

hypothesis-python/src/hypothesis/strategies/_internal/datetime.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import zoneinfo
3030
except ImportError:
3131
try:
32-
from backports import zoneinfo # type: ignore
32+
from backports import zoneinfo
3333
except ImportError:
3434
# We raise an error recommending `pip install hypothesis[zoneinfo]`
3535
# when timezones() or timezone_keys() strategies are actually used.

hypothesis-python/tests/codemods/test_codemod_cli.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ def run(command, tmpdir=None, input=None):
3636
return subprocess.run(
3737
command,
3838
input=input,
39-
stderr=subprocess.PIPE,
40-
stdout=subprocess.PIPE,
39+
capture_output=True,
4140
shell=True,
42-
universal_newlines=True,
41+
text=True,
4342
cwd=tmpdir,
4443
)
4544

hypothesis-python/tests/cover/test_pretty.py

-1
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ def test_super_repr():
301301
output = pretty.pretty(super(SA, sb))
302302
assert "SA" in output
303303

304-
305304
except AttributeError:
306305

307306
def test_super_repr():

hypothesis-python/tests/ghostwriter/test_ghostwriter_cli.py

+8-12
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@
5050
def test_cli_python_equivalence(cli, code):
5151
result = subprocess.run(
5252
"hypothesis write " + cli,
53-
stderr=subprocess.PIPE,
54-
stdout=subprocess.PIPE,
53+
capture_output=True,
5554
shell=True,
56-
universal_newlines=True,
55+
text=True,
5756
)
5857
cli_output = result.stdout.strip()
5958
assert not result.stderr
@@ -87,10 +86,9 @@ def test_cli_too_many_functions(cli, err_msg):
8786
# Supplying multiple functions to writers that only cope with one
8887
result = subprocess.run(
8988
"hypothesis write " + cli,
90-
stderr=subprocess.PIPE,
91-
stdout=subprocess.PIPE,
89+
capture_output=True,
9290
shell=True,
93-
universal_newlines=True,
91+
text=True,
9492
)
9593
assert result.returncode == 2
9694
assert "Error: " + err_msg in result.stderr
@@ -109,10 +107,9 @@ def test_can_import_from_scripts_in_working_dir(tmpdir):
109107
(tmpdir / "mycode.py").write(CODE_TO_TEST)
110108
result = subprocess.run(
111109
"hypothesis write mycode.sorter",
112-
stderr=subprocess.PIPE,
113-
stdout=subprocess.PIPE,
110+
capture_output=True,
114111
shell=True,
115-
universal_newlines=True,
112+
text=True,
116113
cwd=tmpdir,
117114
)
118115
assert result.returncode == 0
@@ -123,10 +120,9 @@ def test_empty_module_is_not_error(tmpdir):
123120
(tmpdir / "mycode.py").write("# Nothing to see here\n")
124121
result = subprocess.run(
125122
"hypothesis write mycode",
126-
stderr=subprocess.PIPE,
127-
stdout=subprocess.PIPE,
123+
capture_output=True,
128124
shell=True,
129-
universal_newlines=True,
125+
text=True,
130126
cwd=tmpdir,
131127
)
132128
assert result.returncode == 0

hypothesis-python/tests/ghostwriter/try-writing-for-installed.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,9 @@ def write_for(mod):
5050
subprocess.run(
5151
["hypothesis", "write", mod],
5252
check=True,
53-
stdout=subprocess.PIPE,
54-
stderr=subprocess.PIPE,
53+
capture_output=True,
5554
timeout=10,
56-
universal_newlines=True,
55+
text=True,
5756
)
5857
except subprocess.SubprocessError as e:
5958
# Only report the error if we could load _but not process_ the module

requirements/coverage.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ mypy-extensions==0.4.3
3636
# via
3737
# black
3838
# typing-inspect
39-
numpy==1.21.4
39+
numpy==1.21.5
4040
# via
4141
# -r requirements/coverage.in
4242
# pandas
4343
packaging==21.3
4444
# via
4545
# fakeredis
4646
# pytest
47-
pandas==1.3.4
47+
pandas==1.3.5
4848
# via -r requirements/coverage.in
4949
pathspec==0.9.0
5050
# via black
@@ -67,9 +67,9 @@ pytest==6.2.5
6767
# -r requirements/test.in
6868
# pytest-forked
6969
# pytest-xdist
70-
pytest-forked==1.3.0
70+
pytest-forked==1.4.0
7171
# via pytest-xdist
72-
pytest-xdist==2.4.0
72+
pytest-xdist==2.5.0
7373
# via -r requirements/test.in
7474
python-dateutil==2.8.2
7575
# via
@@ -93,7 +93,7 @@ sortedcontainers==2.4.0
9393
# hypothesis (hypothesis-python/setup.py)
9494
toml==0.10.2
9595
# via pytest
96-
tomli==1.2.2
96+
tomli==1.2.3
9797
# via black
9898
typing-extensions==4.0.1
9999
# via

requirements/test.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pytest==6.2.5
3131
# -r requirements/test.in
3232
# pytest-forked
3333
# pytest-xdist
34-
pytest-forked==1.3.0
34+
pytest-forked==1.4.0
3535
# via pytest-xdist
36-
pytest-xdist==2.4.0
36+
pytest-xdist==2.5.0
3737
# via -r requirements/test.in
3838
sortedcontainers==2.4.0
3939
# via hypothesis (hypothesis-python/setup.py)

requirements/tools.txt

+20-22
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ backcall==0.2.0
2323
# via ipython
2424
backports.entry-points-selectable==1.1.1
2525
# via virtualenv
26+
backports.zoneinfo==0.2.1
27+
# via django
2628
bandit==1.7.1
2729
# via flake8-bandit
2830
beautifulsoup4==4.10.0
2931
# via sphinx-codeautolink
30-
black==21.11b1
32+
black==21.12b0
3133
# via
3234
# blacken-docs
3335
# shed
@@ -53,13 +55,13 @@ com2ann==0.3.0
5355
# via shed
5456
coverage==6.2
5557
# via -r requirements/tools.in
56-
cryptography==36.0.0
58+
cryptography==36.0.1
5759
# via secretstorage
5860
decorator==5.1.0
5961
# via ipython
60-
distlib==0.3.3
62+
distlib==0.3.4
6163
# via virtualenv
62-
django==3.2.9
64+
django==4.0
6365
# via -r requirements/tools.in
6466
docutils==0.17.1
6567
# via
@@ -120,7 +122,7 @@ idna==3.3
120122
# via requests
121123
imagesize==1.3.0
122124
# via sphinx
123-
importlib-metadata==4.8.2
125+
importlib-metadata==4.10.0
124126
# via
125127
# keyring
126128
# twine
@@ -152,7 +154,7 @@ matplotlib-inline==0.1.3
152154
# via ipython
153155
mccabe==0.6.1
154156
# via flake8
155-
mypy==0.910
157+
mypy==0.930
156158
# via -r requirements/tools.in
157159
mypy-extensions==0.4.3
158160
# via
@@ -189,7 +191,7 @@ pluggy==1.0.0
189191
# via
190192
# pytest
191193
# tox
192-
prompt-toolkit==3.0.23
194+
prompt-toolkit==3.0.24
193195
# via ipython
194196
ptyprocess==0.7.0
195197
# via pexpect
@@ -221,19 +223,15 @@ pytest==6.2.5
221223
python-dateutil==2.8.2
222224
# via -r requirements/tools.in
223225
pytz==2021.3
224-
# via
225-
# babel
226-
# django
226+
# via babel
227227
pyupgrade==2.29.1
228228
# via shed
229229
pyyaml==6.0
230230
# via
231231
# bandit
232232
# libcst
233-
readme-renderer==30.0
233+
readme-renderer==32.0
234234
# via twine
235-
regex==2021.11.10
236-
# via black
237235
requests==2.26.0
238236
# via
239237
# -r requirements/tools.in
@@ -248,7 +246,7 @@ rfc3986==1.5.0
248246
# via twine
249247
secretstorage==3.3.1
250248
# via keyring
251-
shed==0.5.3
249+
shed==0.7.0
252250
# via -r requirements/tools.in
253251
six==1.16.0
254252
# via
@@ -266,12 +264,12 @@ sortedcontainers==2.4.0
266264
# via hypothesis (hypothesis-python/setup.py)
267265
soupsieve==2.3.1
268266
# via beautifulsoup4
269-
sphinx==4.3.1
267+
sphinx==4.3.2
270268
# via
271269
# -r requirements/tools.in
272270
# sphinx-codeautolink
273271
# sphinx-rtd-theme
274-
sphinx-codeautolink==0.7.0
272+
sphinx-codeautolink==0.8.0
275273
# via -r requirements/tools.in
276274
sphinx-hoverxref==1.0.0
277275
# via -r requirements/tools.in
@@ -300,12 +298,12 @@ tokenize-rt==4.2.1
300298
toml==0.10.2
301299
# via
302300
# -r requirements/tools.in
303-
# mypy
304301
# pytest
305302
# tox
306-
tomli==1.2.2
303+
tomli==1.2.3
307304
# via
308305
# black
306+
# mypy
309307
# pep517
310308
tox==3.24.4
311309
# via -r requirements/tools.in
@@ -315,15 +313,15 @@ traitlets==5.1.1
315313
# via
316314
# ipython
317315
# matplotlib-inline
318-
twine==3.7.0
316+
twine==3.7.1
319317
# via -r requirements/tools.in
320318
types-click==7.1.8
321319
# via -r requirements/tools.in
322320
types-pkg-resources==0.1.3
323321
# via -r requirements/tools.in
324-
types-pytz==2021.3.1
322+
types-pytz==2021.3.3
325323
# via -r requirements/tools.in
326-
types-redis==4.0.3
324+
types-redis==4.0.5
327325
# via -r requirements/tools.in
328326
typing-extensions==4.0.1
329327
# via
@@ -343,7 +341,7 @@ wcwidth==0.2.5
343341
# via prompt-toolkit
344342
webencodings==0.5.1
345343
# via bleach
346-
wheel==0.37.0
344+
wheel==0.37.1
347345
# via pip-tools
348346
zipp==3.6.0
349347
# via importlib-metadata

tooling/src/hypothesistooling/__main__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def run_tox(task, version):
385385
PY37 = "3.7.12"
386386
PY38 = PYMAIN = "3.8.12" # Sync PYMAIN minor version with GH Actions main.yml
387387
PY39 = "3.9.9"
388-
PY310 = "3.10.0"
388+
PY310 = "3.10.1"
389389
PY311 = "3.11-dev"
390390
PYPY37 = "pypy3.7-7.3.7"
391391
PYPY38 = "pypy3.8-7.3.7"

0 commit comments

Comments
 (0)