diff --git a/build.sh b/build.sh index 29173336d0..2d2920bc3b 100755 --- a/build.sh +++ b/build.sh @@ -23,8 +23,8 @@ if [ -n "${GITHUB_ACTIONS-}" ] || [ -n "${CODESPACES-}" ] ; then else # Otherwise, we install it from scratch # NOTE: tooling keeps this version in sync with ci_version in tooling - "$SCRIPTS/ensure-python.sh" 3.10.8 - PYTHON=$(pythonloc 3.10.8)/bin/python + "$SCRIPTS/ensure-python.sh" 3.10.9 + PYTHON=$(pythonloc 3.10.9)/bin/python fi TOOL_REQUIREMENTS="$ROOT/requirements/tools.txt" diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..cfbd34824b --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,4 @@ +RELEASE_TYPE: patch + +This patch updates our vendored `list of top-level domains `__, +which is used by the provisional :func:`~hypothesis.provisional.domains` strategy. diff --git a/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt b/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt index cbff007069..51aef8c5c6 100644 --- a/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt +++ b/hypothesis-python/src/hypothesis/vendor/tlds-alpha-by-domain.txt @@ -1,4 +1,4 @@ -# Version 2022112700, Last Updated Sun Nov 27 07:07:01 2022 UTC +# Version 2022121000, Last Updated Sat Dec 10 07:07:02 2022 UTC AAA AARP ABARTH @@ -1384,7 +1384,6 @@ XN--J1AEF XN--J1AMH XN--J6W193G XN--JLQ480N2RG -XN--JLQ61U9W7B XN--JVR189M XN--KCRX77D1X4A XN--KPRW13D diff --git a/hypothesis-python/tox.ini b/hypothesis-python/tox.ini index fc86194b35..251a5be7ef 100644 --- a/hypothesis-python/tox.ini +++ b/hypothesis-python/tox.ini @@ -5,7 +5,7 @@ toxworkdir={env:TOX_WORK_DIR:.tox} [testenv] deps = -r../requirements/test.txt -whitelist_externals= +allowlist_externals = bash passenv= HOME @@ -141,7 +141,7 @@ commands= [testenv:coverage] deps = -r../requirements/coverage.txt -whitelist_externals= +allowlist_externals = rm setenv= PYTHONDEVMODE=1 diff --git a/requirements/coverage.txt b/requirements/coverage.txt index 97bd5958ae..103b3c6e7d 100644 --- a/requirements/coverage.txt +++ b/requirements/coverage.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # ./build.sh upgrade-requirements # @@ -10,7 +10,7 @@ attrs==22.1.0 # via # hypothesis (hypothesis-python/setup.py) # pytest -black==22.10.0 +black==22.12.0 # via -r requirements/coverage.in click==8.1.3 # via @@ -26,11 +26,11 @@ exceptiongroup==1.0.4 ; python_version < "3.11" # pytest execnet==1.9.0 # via pytest-xdist -fakeredis==2.1.0 +fakeredis==2.2.0 # via -r requirements/coverage.in iniconfig==1.1.1 # via pytest -lark==1.1.4 +lark==1.1.5 # via -r requirements/coverage.in libcst==0.4.9 # via -r requirements/coverage.in @@ -42,24 +42,20 @@ numpy==1.23.5 # via # -r requirements/coverage.in # pandas -packaging==21.3 - # via - # pytest - # redis +packaging==22.0 + # via pytest pandas==1.5.2 # via -r requirements/coverage.in -pathspec==0.10.2 +pathspec==0.10.3 # via black pexpect==4.8.0 # via -r requirements/test.in -platformdirs==2.5.4 +platformdirs==2.6.0 # via black pluggy==1.0.0 # via pytest ptyprocess==0.7.0 # via pexpect -pyparsing==3.0.9 - # via packaging pytest==7.2.0 # via # -r requirements/test.in @@ -76,7 +72,7 @@ pytz==2022.6 # pandas pyyaml==6.0 # via libcst -redis==4.3.5 +redis==4.4.0 # via fakeredis six==1.16.0 # via python-dateutil diff --git a/requirements/test.txt b/requirements/test.txt index 38e3e5f60b..3f6fc35399 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # ./build.sh upgrade-requirements # @@ -16,7 +16,7 @@ execnet==1.9.0 # via pytest-xdist iniconfig==1.1.1 # via pytest -packaging==21.3 +packaging==22.0 # via pytest pexpect==4.8.0 # via -r requirements/test.in @@ -24,8 +24,6 @@ pluggy==1.0.0 # via pytest ptyprocess==0.7.0 # via pexpect -pyparsing==3.0.9 - # via packaging pytest==7.2.0 # via # -r requirements/test.in diff --git a/requirements/tools.txt b/requirements/tools.txt index f7d8554e95..ac30a77eb7 100644 --- a/requirements/tools.txt +++ b/requirements/tools.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # ./build.sh upgrade-requirements # @@ -10,7 +10,7 @@ asgiref==3.5.2 # via django astor==0.8.1 # via flake8-simplify -asttokens==2.2.0 +asttokens==2.2.1 # via stack-data attrs==22.1.0 # via @@ -27,16 +27,20 @@ bandit==1.7.4 # via flake8-bandit beautifulsoup4==4.11.1 # via sphinx-codeautolink -black==22.10.0 +black==22.12.0 # via shed bleach==5.0.1 # via readme-renderer build==0.9.0 # via pip-tools -certifi==2022.9.24 +cachetools==5.2.0 + # via tox +certifi==2022.12.7 # via requests cffi==1.15.1 # via cryptography +chardet==5.1.0 + # via tox charset-normalizer==2.1.1 # via requests click==8.1.3 @@ -45,6 +49,8 @@ click==8.1.3 # pip-tools codespell==2.2.2 # via -r requirements/tools.in +colorama==0.4.6 + # via tox com2ann==0.3.0 # via shed commonmark==0.9.1 @@ -57,7 +63,7 @@ decorator==5.1.1 # via ipython distlib==0.3.6 # via virtualenv -django==4.1.3 +django==4.1.4 # via -r requirements/tools.in docutils==0.17.1 # via @@ -73,7 +79,7 @@ exceptiongroup==1.0.4 ; python_version < "3.11" # pytest executing==1.2.0 # via stack-data -filelock==3.8.0 +filelock==3.8.2 # via # tox # virtualenv @@ -94,7 +100,7 @@ flake8-2020==1.7.0 # via -r requirements/tools.in flake8-bandit==4.1.1 # via -r requirements/tools.in -flake8-bugbear==22.10.27 +flake8-bugbear==22.12.6 # via -r requirements/tools.in flake8-builtins==2.0.1 # via -r requirements/tools.in @@ -150,7 +156,7 @@ jinja2==3.1.2 # via sphinx keyring==23.11.0 # via twine -lark==1.1.4 +lark==1.1.5 # via -r requirements/tools.in libcst==0.4.9 # via @@ -173,15 +179,16 @@ mypy-extensions==0.4.3 # typing-inspect nodeenv==1.7.0 # via pyright -packaging==21.3 +packaging==22.0 # via # build + # pyproject-api # pytest # sphinx # tox parso==0.8.3 # via jedi -pathspec==0.10.2 +pathspec==0.10.3 # via black pbr==5.11.0 # via stevedore @@ -195,22 +202,21 @@ pip-tools==6.11.0 # via -r requirements/tools.in pkginfo==1.9.2 # via twine -platformdirs==2.5.4 +platformdirs==2.6.0 # via # black + # tox # virtualenv pluggy==1.0.0 # via # pytest # tox -prompt-toolkit==3.0.33 +prompt-toolkit==3.0.36 # via ipython ptyprocess==0.7.0 # via pexpect pure-eval==0.2.2 # via stack-data -py==1.11.0 - # via tox pycodestyle==2.10.0 # via flake8 pycparser==2.21 @@ -227,9 +233,9 @@ pygments==2.13.0 # readme-renderer # rich # sphinx -pyparsing==3.0.9 - # via packaging -pyright==1.1.282 +pyproject-api==1.2.1 + # via tox +pyright==1.1.283 # via -r requirements/tools.in pytest==7.2.0 # via -r requirements/tools.in @@ -237,7 +243,7 @@ python-dateutil==2.8.2 # via -r requirements/tools.in pytz==2022.6 # via babel -pyupgrade==3.3.0 +pyupgrade==3.3.1 # via shed pyyaml==6.0 # via @@ -261,14 +267,13 @@ rich==12.6.0 # via twine secretstorage==3.3.3 # via keyring -shed==0.10.7 +shed==0.10.8 # via -r requirements/tools.in six==1.16.0 # via # asttokens # bleach # python-dateutil - # tox smmap==5.0.0 # via gitdb snowballstemmer==2.2.0 @@ -322,11 +327,12 @@ tomli==2.0.1 # build # mypy # pep517 + # pyproject-api # pytest # tox -tox==3.27.1 +tox==4.0.5 # via -r requirements/tools.in -traitlets==5.6.0 +traitlets==5.7.0 # via # ipython # matplotlib-inline @@ -354,7 +360,7 @@ urllib3==1.26.13 # via # requests # twine -virtualenv==20.17.0 +virtualenv==20.17.1 # via tox wcwidth==0.2.5 # via prompt-toolkit diff --git a/tooling/src/hypothesistooling/__main__.py b/tooling/src/hypothesistooling/__main__.py index 9909260f0c..9eb713dd04 100644 --- a/tooling/src/hypothesistooling/__main__.py +++ b/tooling/src/hypothesistooling/__main__.py @@ -330,16 +330,9 @@ def upgrade_requirements(): compile_requirements(upgrade=True) subprocess.call(["./build.sh", "format"], cwd=tools.ROOT) # exits 1 if changed if has_diff(hp.PYTHON_SRC) and not os.path.isfile(hp.RELEASE_FILE): - if has_diff(f"{hp.PYTHON_SRC}/hypothesis/vendor/tlds-alpha-by-domain.txt"): - msg = ( - "our vendored `list of top-level domains " - "`__,\nwhich is used by the " - "provisional :func:`~hypothesis.provisional.domains` strategy." - ) - else: - msg = "our autoformatting tools, improving our code style without any API changes." + msg = hp.get_autoupdate_message(domainlist_changed=has_diff(hp.DOMAINS_LIST)) with open(hp.RELEASE_FILE, mode="w") as f: - f.write(f"RELEASE_TYPE: patch\n\nThis patch updates {msg}\n") + f.write(f"RELEASE_TYPE: patch\n\n" + msg) update_python_versions() subprocess.call(["git", "add", "."], cwd=tools.ROOT) @@ -386,11 +379,11 @@ def run_tox(task, version, *args): # When a version is added or removed, manually update the env lists in tox.ini and # workflows/main.yml, and the `Programming Language ::` specifiers in setup.py PYTHONS = { - "3.7": "3.7.15", - "3.8": "3.8.15", - "3.9": "3.9.15", - "3.10": "3.10.8", - "3.11": "3.11.0", + "3.7": "3.7.16", + "3.8": "3.8.16", + "3.9": "3.9.16", + "3.10": "3.10.9", + "3.11": "3.11.1", "3.12": "3.12-dev", "pypy3.7": "pypy3.7-7.3.9", "pypy3.8": "pypy3.8-7.3.9", diff --git a/tooling/src/hypothesistooling/projects/hypothesispython.py b/tooling/src/hypothesistooling/projects/hypothesispython.py index 8a14520215..5a8194d000 100644 --- a/tooling/src/hypothesistooling/projects/hypothesispython.py +++ b/tooling/src/hypothesistooling/projects/hypothesispython.py @@ -29,6 +29,9 @@ PYTHON_SRC = os.path.join(HYPOTHESIS_PYTHON, "src") PYTHON_TESTS = os.path.join(HYPOTHESIS_PYTHON, "tests") +DOMAINS_LIST = os.path.join( + PYTHON_SRC, "hypothesis", "vendor", "tlds-alpha-by-domain.txt" +) RELEASE_FILE = os.path.join(HYPOTHESIS_PYTHON, "RELEASE.rst") @@ -234,3 +237,16 @@ def latest_version(): def tag_name(): return PYTHON_TAG_PREFIX + __version__ + + +def get_autoupdate_message(domainlist_changed: bool) -> str: + if domainlist_changed: + return ( + "This patch updates our vendored `list of top-level domains " + "`__,\nwhich is used by the " + "provisional :func:`~hypothesis.provisional.domains` strategy.\n" + ) + return ( + "This patch updates our autoformatting tools, " + "improving our code style without any API changes." + ) diff --git a/whole-repo-tests/test_release_files.py b/whole-repo-tests/test_release_files.py index 95bbb3e83f..ccd812b9cd 100644 --- a/whole-repo-tests/test_release_files.py +++ b/whole-repo-tests/test_release_files.py @@ -29,6 +29,8 @@ def test_release_file_exists_and_is_valid(project): def test_release_file_has_no_merge_conflicts(): _, message = rm.parse_release_file(hp.RELEASE_FILE) assert "<<<" not in message, "Merge conflict in RELEASE.rst" + if message in {hp.get_autoupdate_message(x).strip() for x in (True, False)}: + return _, *recent_changes, _ = hp.CHANGELOG_ANCHOR.split(hp.changelog(), maxsplit=12) for entry in recent_changes: _, version, old_msg = (x.strip() for x in hp.CHANGELOG_BORDER.split(entry))