Repository: pulp/pulpcore

Issue:
[noissue]: Update django-lifecycle requirement from <=1.1.2,>=1.0 to >=1.0,<=1.2.0
Updates the requirements on [django-lifecycle](https://github.com/rsinger86/django-lifecycle) to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/rsinger86/django-lifecycle/releases">django-lifecycle's releases</a>.</em></p>
<blockquote>
<h2>1.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix <code>has_changed</code> and <code>changed_to</code> when working with mutable data (i.e.: <code>dict</code>s) by <a href="https://github.com/AlaaNour94"><code>@​AlaaNour94</code></a> in <a href="https://redirect.github.com/rsinger86/django-lifecycle/pull/151">rsinger86/django-lifecycle#151</a></li>
<li>Hook condition can be now built using some predefined conditions and/or with custom ones by <a href="https://github.com/EnriqueSoria"><code>@​EnriqueSoria</code></a> in <a href="https://redirect.github.com/rsinger86/django-lifecycle/pull/150">rsinger86/django-lifecycle#150</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/AlaaNour94"><code>@​AlaaNour94</code></a> made their first contribution in <a href="https://redirect.github.com/rsinger86/django-lifecycle/pull/151">rsinger86/django-lifecycle#151</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/rsinger86/django-lifecycle/compare/1.1.2...1.2.0">https://github.com/rsinger86/django-lifecycle/compare/1.1.2...1.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/rsinger86/django-lifecycle/blob/master/CHANGELOG.md">django-lifecycle's changelog</a>.</em></p>
<blockquote>
<h1>1.2.0 (February 2024)</h1>
<ul>
<li>Hook condition can be now built using some predefined conditions and/or with custom ones.</li>
<li>Fix <code>has_changed</code> and <code>changed_to</code> when working with mutable data (i.e.: <code>dict</code>s). Thanks <a href="https://github.com/AlaaNour94"><code>@​AlaaNour94</code></a></li>
</ul>
<h1>1.1.2 (November 2023)</h1>
<ul>
<li>Fix: Hooks were failing if some watched field (those in <code>when=&quot;&quot;</code> or <code>when_any=[...]</code>) was a <code>GenericForeignKey</code></li>
</ul>
<h2>1.1.1 (November 2023)</h2>
<ul>
<li>Fix: Include missing <code>django_lifecycle_checks</code> into python package</li>
</ul>
<h2>1.1.0 (November 2023)</h2>
<ul>
<li>Drop support for Django &lt; 2.2.</li>
<li>Confirm support for Django 5.0. Thanks <a href="https://github.com/adamchainz"><code>@​adamchainz</code></a>!</li>
<li>Remove urlman from required packages. Thanks <a href="https://github.com/DmytroLitvinov"><code>@​DmytroLitvinov</code></a>!</li>
<li>Add an optional Django check to avoid errors by not inheriting from <code>LifecycleModelMixin</code> (or <code>LifecycleModel</code>)</li>
</ul>
<h2>1.0.2 (September 2023)</h2>
<ul>
<li>Correct package info to note that Django 4.0, 4.1, and 4.2 are supported.</li>
</ul>
<h2>1.0.1 (August 2023)</h2>
<ul>
<li>Initial state gets reset using <code>transaction.on_commit()</code>, fixing the <code>has_changed()</code> and <code>initial_value()</code> methods for on_commit hooks. Thanks <a href="https://github.com/alb3rto269"><code>@​alb3rto269</code></a>!</li>
</ul>
<h2>1.0.0 (May 2022)</h2>
<ul>
<li>Drops Python 3.6 support</li>
<li>Adds <code>priority</code> hook kwarg to control the order in which hooked methods fire. Thanks <a href="https://github.com/EnriqueSoria"><code>@​EnriqueSoria</code></a>!</li>
<li>Internal cleanup/refactoring. Thanks <a href="https://github.com/EnriqueSoria"><code>@​EnriqueSoria</code></a>!</li>
</ul>
<h2>0.9.6 (February 2022)</h2>
<ul>
<li>Adds missing <code>packaging</code> to <code>install_requires</code>. Thanks <a href="https://github.com/mikedep333"><code>@​mikedep333</code></a>!</li>
</ul>
<h2>0.9.5 (February 2022)</h2>
<ul>
<li>Makes the <code>has_changed</code>, <code>changes_to</code> conditions depend on whether the field in question was included in the SQL update/insert statement by checking
the <code>update_fields</code> argument passed to save.</li>
</ul>
<h2>0.9.4 (February 2022)</h2>
<ul>
<li>Adds optional <a href="https://github.com/hook"><code>@​hook</code></a> <code>on_commit</code> argument for executing hooks when the database transaction is committed. Thanks <a href="https://github.com/amcclosky"><code>@​amcclosky</code></a>!</li>
</ul>
<h2>0.9.3 (October 2021)</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/4cc4c0b8f5688f87e520a949350519619311815a"><code>4cc4c0b</code></a> chore: Prepare release 1.2.0</li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/2ba92cec9b54ec89a29cf8870b81acb7c9c41f05"><code>2ba92ce</code></a> Merge pull request <a href="https://redirect.github.com/rsinger86/django-lifecycle/issues/150">#150</a> from rsinger86/feature/generalize-conditions</li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/b8b6336e19de4a6e5eb8ad6e52dda0257e57ce94"><code>b8b6336</code></a> refactor: Rename conditions as suggested by <a href="https://github.com/mateocpdev"><code>@​mateocpdev</code></a></li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/bca05776ee77cf61f16d4bc8fc145d76bc276b01"><code>bca0577</code></a> docs: Update docs to add new way to add conditions</li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/f2c6b803c5d4445d00c07ffeec7e5c73f75d0f6a"><code>f2c6b80</code></a> feat: Allow to specify both condition or legacy params</li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/b6581622b49a906b1aab6ae07c80a29d61e77d2d"><code>b658162</code></a> feat: Make conditions chainable through <code>&amp;</code> and <code>|</code></li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/6eb62e7ee5dbb8b2bca9c4c3f8eb0086765c4267"><code>6eb62e7</code></a> feat: Replicate conditions tests from LifecycleMixinTests using new conditions</li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/1b2ccb86a583f729ff916f473562814c30b446aa"><code>1b2ccb8</code></a> Merge remote-tracking branch 'origin/master' into feature/generalize-conditions</li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/2d1b46672b7f660012dbff08a7fe29f6d10094ed"><code>2d1b466</code></a> Merge pull request <a href="https://redirect.github.com/rsinger86/django-lifecycle/issues/151">#151</a> from AlaaNour94/capture_mutable_fields_changes</li>
<li><a href="https://github.com/rsinger86/django-lifecycle/commit/98b69493e3914299d67a7eb8b05146bcfe20ea53"><code>98b6949</code></a> capture mutable fields changes</li>
<li>Additional commits viewable in <a href="https://github.com/rsinger86/django-lifecycle/compare/1.0.0...1.2.0">compare view</a></li>
</ul>
</details>
<br />


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>


Discussion:

Resolving patch:
diff --git a/pulpcore/app/models/upload.py b/pulpcore/app/models/upload.py
--- a/pulpcore/app/models/upload.py
+++ b/pulpcore/app/models/upload.py
@@ -49,6 +49,17 @@ def sha256(self, rehash=False):
             self._sha256 = sha256.hexdigest()
         return self._sha256
 
+    def delete(self, *args, **kwargs):
+        """
+        Deletes Upload model and the file associated with the model
+
+        Args:
+            args (list): list of positional arguments for Model.delete()
+            kwargs (dict): dictionary of keyword arguments to pass to Model.delete()
+        """
+        super().delete(*args, **kwargs)
+        self.file.delete(save=False)
+
 
 class UploadChunk(Model):
     """


Test patch: