Repository: copier-org/copier
Pull request #1682 (2024-06-28 17:52:31)

build(jinja2): update dependency

codecov[bot]: ## [Codecov](https://app.codecov.io/gh/copier-org/copier/pull/1682?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=copier-org) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 96.76%. Comparing base [(`8f5b627`)](https://app.codecov.io/gh/copier-org/copier/commit/8f5b62775688ab1573c973988cfd4e881f081142?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=copier-org) to head [(`7307b11`)](https://app.codecov.io/gh/copier-org/copier/commit/7307b118e6291f80ad530f1e688a3352596ba501?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=copier-org).

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master    #1682      +/-   ##
==========================================
- Coverage   97.32%   96.76%   -0.56%     
==========================================
  Files          49       49              
  Lines        5004     5004              
==========================================
- Hits         4870     4842      -28     
- Misses        134      162      +28     
```

| [Flag](https://app.codecov.io/gh/copier-org/copier/pull/1682/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=copier-org) | Coverage Δ | |
|---|---|---|
| [unittests](https://app.codecov.io/gh/copier-org/copier/pull/1682/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=copier-org) | `96.76% <ø> (-0.56%)` | :arrow_down: |

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=copier-org#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/copier-org/copier/pull/1682?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=copier-org).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=copier-org).


Patch:
diff --git a/copier/main.py b/copier/main.py
index c862f34..960a41b 100644
--- a/copier/main.py
+++ b/copier/main.py
@@ -241,7 +241,7 @@ class Worker:
         features: set[str] = set()
         if self.template.jinja_extensions:
             features.add("jinja_extensions")
-        if self.template.tasks:
+        if self.template.tasks and not self.skip_tasks:
             features.add("tasks")
         if mode == "update" and self.subproject.template:
             if self.subproject.template.jinja_extensions:
diff --git a/poetry.lock b/poetry.lock
index 416bcc9..4b274fd 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
 
 [[package]]
 name = "annotated-types"
@@ -441,13 +441,13 @@ files = [
 
 [[package]]
 name = "jinja2"
-version = "3.1.3"
+version = "3.1.4"
 description = "A very fast and expressive template engine."
 optional = false
 python-versions = ">=3.7"
 files = [
-    {file = "Jinja2-3.1.3-py3-none-any.whl", hash = "sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa"},
-    {file = "Jinja2-3.1.3.tar.gz", hash = "sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90"},
+    {file = "jinja2-3.1.4-py3-none-any.whl", hash = "sha256:bc5dd2abb727a5319567b7a813e6a2e7318c39f4f487cfe6c89c6f9c7d25197d"},
+    {file = "jinja2-3.1.4.tar.gz", hash = "sha256:4a3aee7acbbe7303aede8e9648d13b8bf88a429282aa6122a993f0ac800cb369"},
 ]
 
 [package.dependencies]
@@ -1691,4 +1691,4 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools"
 [metadata]
 lock-version = "2.0"
 python-versions = ">=3.8"
-content-hash = "a787c59dd13a9e743e96c3b12e447e7d3399302d419cf5eba932fd84a15cc9a4"
+content-hash = "e9f5b300ab32886155c864b53e3d0e1dcf7cfdd7ed12567cf781cdf5e2edaaa8"
diff --git a/pyproject.toml b/pyproject.toml
index 3b50f55..3405e6b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,7 +31,7 @@ python = ">=3.8"
 colorama = ">=0.4.6"
 dunamai = ">=1.7.0"
 funcy = ">=1.17"
-jinja2 = ">=3.1.3"
+jinja2 = ">=3.1.4"
 jinja2-ansible-filters = ">=1.3.1"
 packaging = ">=23.0"
 pathspec = ">=0.9.0"


Test patch:
diff --git a/tests/test_tasks.py b/tests/test_tasks.py
index fb00027..05c80b2 100644
--- a/tests/test_tasks.py
+++ b/tests/test_tasks.py
@@ -73,7 +73,6 @@ def test_copy_skip_tasks(template_path: str, tmp_path: Path) -> None:
         quiet=True,
         defaults=True,
         overwrite=True,
-        unsafe=True,
         skip_tasks=True,
     )
     assert not (tmp_path / "hello").exists()