Repository: python/bedevere
Pull request #615 (2024-01-01 09:10:26)

Bump yarl from 1.9.3 to 1.9.4
Bumps [yarl](https://github.com/aio-libs/yarl) from 1.9.3 to 1.9.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/aio-libs/yarl/releases">yarl's releases</a>.</em></p>
<blockquote>
<h2>1.9.4</h2>
<h2>Bug fixes</h2>
<ul>
<li>
<p>Started raising :py:exc:<code>TypeError</code> when a string value is passed into
:py:meth:<code>~yarl.URL.build</code> as the <code>port</code> argument  -- by :user:<code>commonism</code>.</p>
<p>Previously the empty string as port would create malformed URLs when rendered as string representations. (<a href="https://redirect.github.com/aio-libs/yarl/issues/883">#883</a>)</p>
</li>
</ul>
<h2>Packaging updates and notes for downstreams</h2>
<ul>
<li>
<p>The leading <code>--</code> has been dropped from the :pep:<code>517</code> in-tree build
backend config setting names. <code>--pure-python</code> is now just <code>pure-python</code>
-- by :user:<code>webknjaz</code>.</p>
<p>The usage now looks as follows:</p>
<p>.. code-block:: console</p>
<pre><code>$ python -m build \
    --config-setting=pure-python=true \
    --config-setting=with-cython-tracing=true
</code></pre>
<p>(<a href="https://redirect.github.com/aio-libs/yarl/issues/963">#963</a>)</p>
</li>
</ul>
<h2>Contributor-facing changes</h2>
<ul>
<li>
<p>A step-by-step :doc:<code>Release Guide &lt;contributing/release_guide&gt;</code> guide has
been added, describing how to release <em>yarl</em> -- by :user:<code>webknjaz</code>.</p>
<p>This is primarily targeting maintainers. (<a href="https://redirect.github.com/aio-libs/yarl/issues/960">#960</a>)</p>
</li>
<li>
<p>Coverage collection has been implemented for the Cython modules
-- by :user:<code>webknjaz</code>.</p>
<p>It will also be reported to Codecov from any non-release CI jobs.</p>
<p>To measure coverage in a development environment, <em>yarl</em> can be
installed in editable mode, which requires an environment variable
<code>YARL_CYTHON_TRACING=1</code> to be set:</p>
<p>.. code-block:: console</p>
<pre><code>$ YARL_CYTHON_TRACING=1 python -Im pip install -e .
</code></pre>
<p>Editable install produces C-files required for the Cython coverage
plugin to map the measurements back to the PYX-files. (<a href="https://redirect.github.com/aio-libs/yarl/issues/961">#961</a>)</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/aio-libs/yarl/blob/master/CHANGES.rst">yarl's changelog</a>.</em></p>
<blockquote>
<h1>1.9.4 (2023-12-06)</h1>
<h2>Bug fixes</h2>
<ul>
<li>
<p>Started raising :py:exc:<code>TypeError</code> when a string value is passed into
:py:meth:<code>~yarl.URL.build</code> as the <code>port</code> argument  -- by :user:<code>commonism</code>.</p>
<p>Previously the empty string as port would create malformed URLs when rendered as string representations. (:issue:<code>883</code>)</p>
</li>
</ul>
<h2>Packaging updates and notes for downstreams</h2>
<ul>
<li>
<p>The leading <code>--</code> has been dropped from the :pep:<code>517</code> in-tree build
backend config setting names. <code>--pure-python</code> is now just <code>pure-python</code>
-- by :user:<code>webknjaz</code>.</p>
<p>The usage now looks as follows:</p>
<p>.. code-block:: console</p>
<pre><code>$ python -m build \
    --config-setting=pure-python=true \
    --config-setting=with-cython-tracing=true
</code></pre>
<p>(:issue:<code>963</code>)</p>
</li>
</ul>
<h2>Contributor-facing changes</h2>
<ul>
<li>
<p>A step-by-step :doc:<code>Release Guide &lt;contributing/release_guide&gt;</code> guide has
been added, describing how to release <em>yarl</em> -- by :user:<code>webknjaz</code>.</p>
<p>This is primarily targeting maintainers. (:issue:<code>960</code>)</p>
</li>
<li>
<p>Coverage collection has been implemented for the Cython modules
-- by :user:<code>webknjaz</code>.</p>
<p>It will also be reported to Codecov from any non-release CI jobs.</p>
<p>To measure coverage in a development environment, <em>yarl</em> can be
installed in editable mode:</p>
<p>.. code-block:: console</p>
<pre><code>$ python -Im pip install -e .
</code></pre>
<p>Editable install produces C-files required for the Cython coverage</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aio-libs/yarl/commit/6362ff155ba02964a5e773927412f7cf4ca23cd1"><code>6362ff1</code></a> ⇪📦 Release yarl v1.9.4</li>
<li><a href="https://github.com/aio-libs/yarl/commit/241e5dfbe2216b8f368f5882db2331e947c909ee"><code>241e5df</code></a> 📝 Add a dedicated Towncrier template</li>
<li><a href="https://github.com/aio-libs/yarl/commit/f384fefa0416adee3f99626082fb9e3f90784dca"><code>f384fef</code></a> 🎨 Sort coverage report config settings</li>
<li><a href="https://github.com/aio-libs/yarl/commit/04399eb70236912d2501a7731f25d02002e79ac5"><code>04399eb</code></a> Exterminate offensive references from the project</li>
<li><a href="https://github.com/aio-libs/yarl/commit/6e61b44a05e590be14ab776904b83f544daf8c49"><code>6e61b44</code></a> 🎨Move <code>tomllib</code> access to <code>_compat</code> @ packaging</li>
<li><a href="https://github.com/aio-libs/yarl/commit/b3a5a710ccd9f797e769400e6f71cd573ad4957f"><code>b3a5a71</code></a> Raise <code>TypeError</code> when a string is passed for <code>port</code> to <code>URL.build()</code></li>
<li><a href="https://github.com/aio-libs/yarl/commit/e8cc8abbf0fa76bda0533b0440204b5b125f56bf"><code>e8cc8ab</code></a> 🧪 Determine and use exact pure dist names @ GHA</li>
<li><a href="https://github.com/aio-libs/yarl/commit/cc8f29ed5e629c29946231a9a5b64b3d91b90c9d"><code>cc8f29e</code></a> 🧪 Skip setting up Python @ <code>cibuildwheel</code> jobs</li>
<li><a href="https://github.com/aio-libs/yarl/commit/d86eb203aea5bd669231eec2964857cd48c0d8d1"><code>d86eb20</code></a> Bump cython from 3.0.5 to 3.0.6 (<a href="https://redirect.github.com/aio-libs/yarl/issues/966">#966</a>)</li>
<li><a href="https://github.com/aio-libs/yarl/commit/d3f762db55f5c977ab1d3299535e5042827eecf6"><code>d3f762d</code></a> Bump idna from 3.4 to 3.6 (<a href="https://redirect.github.com/aio-libs/yarl/issues/965">#965</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/aio-libs/yarl/compare/v1.9.3...v1.9.4">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=yarl&package-manager=pip&previous-version=1.9.3&new-version=1.9.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/python/bedevere/pull/615?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Comparison is base [(`e16ba22`)](https://app.codecov.io/gh/python/bedevere/commit/e16ba22acf88fda22bdb83dd6d0c23b12cd3c157?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) 100.00% compared to head [(`72b84b1`)](https://app.codecov.io/gh/python/bedevere/pull/615?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) 100.00%.

[![Impacted file tree graph](https://app.codecov.io/gh/python/bedevere/pull/615/graphs/tree.svg?width=650&height=150&src=pr&token=S7kyeapERi&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python)](https://app.codecov.io/gh/python/bedevere/pull/615?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python)

```diff
@@            Coverage Diff            @@
##              main      #615   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines         2128      2128           
  Branches       245       245           
=========================================
  Hits          2128      2128           
```

| [Flag](https://app.codecov.io/gh/python/bedevere/pull/615/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) | Coverage Δ | |
|---|---|---|
| [Python_3.10.13](https://app.codecov.io/gh/python/bedevere/pull/615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) | `100.00% <ø> (ø)` | |
| [Python_3.11.7](https://app.codecov.io/gh/python/bedevere/pull/615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) | `100.00% <ø> (ø)` | |
| [Python_3.12.1](https://app.codecov.io/gh/python/bedevere/pull/615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) | `100.00% <ø> (ø)` | |
| [Python_3.8.18](https://app.codecov.io/gh/python/bedevere/pull/615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) | `?` | |
| [Python_3.9.18](https://app.codecov.io/gh/python/bedevere/pull/615/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python) | `?` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=python#carryforward-flags-in-the-pull-request-comment) to find out more.



Patch:
diff --git a/bedevere/prtype.py b/bedevere/prtype.py
index 0105e50..bccd879 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/requirements.txt b/requirements.txt
index 1868d84..89ad864 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


Test patch:
diff --git a/tests/test_prtype.py b/tests/test_prtype.py
index 4fcaf0c..c9b0777 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"}