Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hooks: collect cloudpickle_fast from numba.cloudpickle and cloudpickle #716

Merged
merged 2 commits into from
Mar 20, 2024

Conversation

rokm
Copy link
Member

@rokm rokm commented Mar 20, 2024

Update numba hook to ensure that numba.cloudpickle.cloudpickle_fast is collected when using numba v0.59.0 or later.

Add hook for cloudpickle to ensure that cloudpickle.cloudpickle_fast is collected when using cloudpickle v3.0.0 or later.

In cloudpickle v3.0.0 (upstream or vendored version in numba), the cloudpickle_fast module became a compatibility shim for unpickling data that was pickled with earlier versions. However, it is not directly imported from the cloudpickle package anymore. Therefore, it ends up missing from the frozen application and results in error when trying to unpickle data. See pyinstaller/pyinstaller#8337.

`numba` 0.59.0 updated its vendored version of `cloudpickle` to 3.0.0;
this version keeps `cloudpickle_fast` module around for backward
compatibility with existing pickled data, but does not import it
directly anymore.

Therefore, we need to add it to hidden imports to ensure that it is
collected and available when unpickling data that was pickled with
older version of `numba`.
Add hook for `cloudpickle` to ensure that `cloudpickle.cloudpickle_fast`
is collected when using `cloudpickle° v3.0.0 or later.
@rokm rokm merged commit 035708f into pyinstaller:master Mar 20, 2024
14 checks passed
@rokm rokm deleted the numba-cloudpickle-fast branch March 20, 2024 13:53
github-actions bot pushed a commit to wxx9248/CIS-Game-Project-2023W that referenced this pull request Apr 15, 2024
…4.4 (#94)

Bumps
[pyinstaller-hooks-contrib](https://github.com/pyinstaller/pyinstaller-hooks-contrib)
from 2024.3 to 2024.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/releases">pyinstaller-hooks-contrib's
releases</a>.</em></p>
<blockquote>
<h2>2024.4</h2>
<p>Please see the <a
href="https://www.github.com/pyinstaller/pyinstaller-hooks-contrib/tree/master/CHANGELOG.rst">changelog</a>
for more details</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/blob/master/CHANGELOG.rst">pyinstaller-hooks-contrib's
changelog</a>.</em></p>
<blockquote>
<h2>2024.4 (2024-04-13)</h2>
<p>New hooks</p>
<pre><code>
* Add a hook for ``python-pptx``, including required template files.
(`[#719](pyinstaller/pyinstaller-hooks-contrib#719)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/719&gt;`_)
* Add hook for ``cloudpickle`` to ensure that
``cloudpickle.cloudpickle_fast``
is collected when using ``cloudpickle`` v3.0.0 or later.
(`[#716](pyinstaller/pyinstaller-hooks-contrib#716)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/716&gt;`_)
* Add hook for ``hexbytes`` that collects package's metadata (required
starting with ``hexbytes`` v.1.1.0).
(`[#714](pyinstaller/pyinstaller-hooks-contrib#714)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/714&gt;`_)
<p>Updated hooks
</code></pre></p>
<ul>
<li>(Windows) Update <code>netCDF4</code> hook to explicitly collect
DLLs and
load-order file (if present) from <code>netCDF4.libs</code> directory.
This
fixes <code>DLL load failed while importing _netCDF4</code> error when
using
Anaconda python 3.8 or 3.9, where <code>delvewheel</code> (used by
<code>netCDF4</code>)
needs to load DLLs via load-order file due to defunct
<code>os.add_dll_directory</code> function.
(<code>[#722](pyinstaller/pyinstaller-hooks-contrib#722)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/722&gt;</code>_)</li>
<li>Update <code>adbutils</code> hooks for compatibility with
<code>adbutils</code> v2.2.2 and
later.
(<code>[#717](pyinstaller/pyinstaller-hooks-contrib#717)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/717&gt;</code>_)</li>
<li>Update <code>numba</code> hook to ensure that
<code>numba.cloudpickle.cloudpickle_fast</code>
is collected when using <code>numba</code> v0.59.0 or later.
(<code>[#716](pyinstaller/pyinstaller-hooks-contrib#716)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/716&gt;</code>_)</li>
<li>Update <code>tensorflow</code> hooks for compatibility with
<code>tensorflow</code> v2.16.0.

(<code>[#714](pyinstaller/pyinstaller-hooks-contrib#714)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/714&gt;</code>_)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/20e08cae0db31f4ebe0c0155b58e2ecf4627d695"><code>20e08ca</code></a>
Release v2024.4</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/c4ad2f3a1157010365cf2790807eae46db116cc4"><code>c4ad2f3</code></a>
hooks: netCDF4: explicitly collect files from netCDF4.libs</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/aa0640514c5031cebcad12be8c5a7c9a5fc94d0a"><code>aa06405</code></a>
Add hook for python-pptx (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/719">#719</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/76b2a4f0270730b43559aee5e87fc79887d81a67"><code>76b2a4f</code></a>
Scheduled weekly dependency update for week 14 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/720">#720</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/b268edf46570f47b3118d49f7d135646f4b50d71"><code>b268edf</code></a>
Scheduled weekly dependency update for week 13 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/718">#718</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/5f5e2bcaaed1469d2f1a55df224d12ebdab3d2f9"><code>5f5e2bc</code></a>
hooks: update adbutils hook for compatibility with adbutils &gt;=
2.2.2</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/e15daecef4bc02e32d12d6e28155a270a265c96b"><code>e15daec</code></a>
test requirements: remove all restrictions on adbutils</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/3d55a5097d4750289f53f9b0c7e5effbac0e8392"><code>3d55a50</code></a>
Scheduled weekly dependency update for week 12 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/717">#717</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/035708f0d59da3619c72caac9d052c3d770530a2"><code>035708f</code></a>
hooks: add hook for cloudpickle</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/33c82abc8a4c44fc31063bfeb5e48ba32a01a5bc"><code>33c82ab</code></a>
hooks: numba: ensure numba.cloudpickle.cloudpickle_fast is
collected</li>
<li>Additional commits viewable in <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/compare/2024.3...2024.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pyinstaller-hooks-contrib&package-manager=pip&previous-version=2024.3&new-version=2024.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>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants