From e16ba22acf88fda22bdb83dd6d0c23b12cd3c157 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 02:08:59 -0700 Subject: [PATCH 1/7] Bump actions/setup-python from 4 to 5 (#611) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 27ac99bc..42a684c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 id: python-install with: python-version: ${{ matrix.python-version }} From 5c7aca3dcbc277c46bdc57c7c9568eff97ed305e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:19:03 +0000 Subject: [PATCH 2/7] Bump sentry-sdk from 1.38.0 to 1.39.1 (#612) Bumps [sentry-sdk](https://github.com/getsentry/sentry-python) from 1.38.0 to 1.39.1. - [Release notes](https://github.com/getsentry/sentry-python/releases) - [Changelog](https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/getsentry/sentry-python/compare/1.38.0...1.39.1) --- updated-dependencies: - dependency-name: sentry-sdk dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c1b96104..1868d844 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,4 +10,4 @@ pyparsing==3.1.1 six==1.16.0 uritemplate==4.1.1 yarl==1.9.3 -sentry-sdk==1.38.0 +sentry-sdk==1.39.1 From cf38dcf32a6d4a0a7e2c52900003f4a1b7215eb2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:19:38 +0000 Subject: [PATCH 3/7] Bump pytest-asyncio from 0.21.1 to 0.23.2 (#613) Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.21.1 to 0.23.2. - [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases) - [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.21.1...v0.23.2) --- updated-dependencies: - dependency-name: pytest-asyncio dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index c543d730..3c76e6f5 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ -r requirements.txt asynctest==0.13.0 pytest==7.4.3 -pytest-asyncio==0.21.1 +pytest-asyncio==0.23.2 pytest-aiohttp==1.0.5 pytest-cov==4.1.0 From b5bcd24e79ad72b47582f89f7e7053f5b3157fa4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jan 2024 09:21:31 +0000 Subject: [PATCH 4/7] Bump pytest from 7.4.3 to 7.4.4 (#614) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 7.4.4. - [Release notes](https://github.com/pytest-dev/pytest/releases) - [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst) - [Commits](https://github.com/pytest-dev/pytest/compare/7.4.3...7.4.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dev-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-requirements.txt b/dev-requirements.txt index 3c76e6f5..1ce53525 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,6 +1,6 @@ -r requirements.txt asynctest==0.13.0 -pytest==7.4.3 +pytest==7.4.4 pytest-asyncio==0.23.2 pytest-aiohttp==1.0.5 pytest-cov==4.1.0 From df8d80f80d7e4961c56bcc838f70cf1b6834934e Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sat, 20 Jan 2024 14:47:10 +0300 Subject: [PATCH 5/7] Add the "docs" label for ``Doc/*/.nitignore`` (#617) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> --- bedevere/prtype.py | 2 +- tests/test_prtype.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bedevere/prtype.py b/bedevere/prtype.py index 0105e500..bccd8797 100644 --- a/bedevere/prtype.py +++ b/bedevere/prtype.py @@ -43,7 +43,7 @@ async def classify_by_filepaths(gh, pull_request, filenames): if util.is_news_dir(filename): news = True filepath = pathlib.PurePath(filename) - if filepath.suffix == ".rst": + if filepath.suffix == ".rst" or filepath.name == ".nitignore": docs = True elif filepath.name.startswith("test_"): tests = True diff --git a/tests/test_prtype.py b/tests/test_prtype.py index 4fcaf0c3..c9b07778 100644 --- a/tests/test_prtype.py +++ b/tests/test_prtype.py @@ -85,6 +85,26 @@ async def test_docs_no_news(): assert gh.post_data[0] == [Labels.docs.value, Labels.skip_news.value] +async def test_docs_no_news_with_dotnitignore(): + filenames = {"path/to/docs1.rst", "path/to/.nitignore"} + issue = {"labels": [], "labels_url": "https://api.github.com/some/label"} + gh = FakeGH(getitem=issue) + event_data = { + "action": "opened", + "number": 1234, + "pull_request": { + "url": "https://api.github.com/repos/cpython/python/pulls/1234", + "statuses_url": "https://api.github.com/some/status", + "issue_url": "https://api.github.com/repos/cpython/python/issue/1234", + }, + } + await prtype.classify_by_filepaths(gh, event_data["pull_request"], filenames) + assert gh.getitem_url == "https://api.github.com/repos/cpython/python/issue/1234" + assert len(gh.post_url) == 1 + assert gh.post_url[0] == "https://api.github.com/some/label" + assert gh.post_data[0] == [Labels.docs.value, Labels.skip_news.value] + + async def test_docs_and_news(): filenames = {"/path/to/docs1.rst", f"Misc/NEWS.d/next/Lib/{GOOD_BASENAME}"} issue = {"labels": [], "labels_url": "https://api.github.com/some/label"} From 21092fba6b2d07d65abcbe371621e91cff5c0f10 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Jan 2024 11:47:33 +0000 Subject: [PATCH 6/7] Bump yarl from 1.9.3 to 1.9.4 (#615) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 1868d844..89ad8647 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,5 +9,5 @@ packaging==23.2 pyparsing==3.1.1 six==1.16.0 uritemplate==4.1.1 -yarl==1.9.3 +yarl==1.9.4 sentry-sdk==1.39.1 From 246591e5e9244e346bb3326de193356082f54a10 Mon Sep 17 00:00:00 2001 From: Sergey B Kirpichev Date: Sat, 20 Jan 2024 14:48:32 +0300 Subject: [PATCH 7/7] Add the "tests" label for files starting with "_test" (#606) --- bedevere/prtype.py | 2 +- tests/test_prtype.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bedevere/prtype.py b/bedevere/prtype.py index bccd8797..8f58a1cf 100644 --- a/bedevere/prtype.py +++ b/bedevere/prtype.py @@ -45,7 +45,7 @@ async def classify_by_filepaths(gh, pull_request, filenames): filepath = pathlib.PurePath(filename) if filepath.suffix == ".rst" or filepath.name == ".nitignore": docs = True - elif filepath.name.startswith("test_"): + elif filepath.name.startswith(("test_", "_test")): tests = True else: return pr_labels diff --git a/tests/test_prtype.py b/tests/test_prtype.py index c9b07778..8cb76da2 100644 --- a/tests/test_prtype.py +++ b/tests/test_prtype.py @@ -145,6 +145,26 @@ async def test_tests_only(): assert gh.post_data[0] == [Labels.tests.value] +async def test_tests_and_testmods_only(): + filenames = {"/path/to/_testmod.c", "_test_module.c", "test_capi,py"} + issue = {"labels": [], "labels_url": "https://api.github.com/some/label"} + gh = FakeGH(getitem=issue) + event_data = { + "action": "opened", + "number": 1234, + "pull_request": { + "url": "https://api.github.com/repos/cpython/python/pulls/1234", + "statuses_url": "https://api.github.com/some/status", + "issue_url": "https://api.github.com/repos/cpython/python/issue/1234", + }, + } + await prtype.classify_by_filepaths(gh, event_data["pull_request"], filenames) + assert gh.getitem_url == "https://api.github.com/repos/cpython/python/issue/1234" + assert len(gh.post_url) == 1 + assert gh.post_url[0] == "https://api.github.com/some/label" + assert gh.post_data[0] == [Labels.tests.value] + + async def test_docs_and_tests(): filenames = {"/path/to/docs.rst", "test_docs2.py"} issue = {