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: add hook for backports namespace package #735

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

rokm
Copy link
Member

@rokm rokm commented Apr 23, 2024

Add hook for backports package, to accommodate the pkgutil-style backports namespace package provided by backports.functools-lru-cache and the latest release of backports.tarfile.

The __init__.py file from this backports namespace package uses __import('pkgutil')__, which slips past PyInstaller's modulegraph analysis, hence we need a hidden import.

This should fix the macOS test failures from yesterday's CI run in the main PyInstaller repository: https://github.com/pyinstaller/pyinstaller/actions/runs/8791000204/job/24124262352
The culprit keyring, which imports jaraco.context, which (on python < 3.12) imports backports.tarfile, which added pkgutil-style namespace package in the recent 1.1.1 release

Add hook for `backports` package, to accommodate the `pkgutil`-style
`backports` namespace package provided by `backports.functools-lru-cache`
and the latest release of `backports.tarfile`.

The `__init__.py` file from this `backports` namespace package uses
`__import('pkgutil')__`, which slips past PyInstaller's modulegraph
analysis, hence we need a hidden import.
@rokm rokm merged commit 6d9f5c5 into pyinstaller:master Apr 23, 2024
2 checks passed
@rokm rokm deleted the hook-backports branch April 23, 2024 20:50
github-actions bot pushed a commit to wxx9248/Pickle-Rush that referenced this pull request Apr 24, 2024
…4.5 (#96)

Bumps
[pyinstaller-hooks-contrib](https://github.com/pyinstaller/pyinstaller-hooks-contrib)
from 2024.4 to 2024.5.
<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.5</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.5 (2024-04-23)</h2>
<p>New hooks</p>
<pre><code>
* Add hook for ``backports`` package, to accommodate the
``pkgutil``-style
``backports`` namespace package provided by
``backports.functools-lru-cache``
and the latest release of ``backports.tarfile``.
(`[#735](pyinstaller/pyinstaller-hooks-contrib#735)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/735&gt;`_)
* Add hook for ``opentelemetry`` that collects all entry-points with
``opentelemetry_`` prefix.
(`[#725](pyinstaller/pyinstaller-hooks-contrib#725)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/725&gt;`_)
* Add hook for ``skimage.metrics`` to account for lazy loading of the
``skimage.metrics`` that was introduced in ``scikit-image`` 0.23.0.
(`[#723](pyinstaller/pyinstaller-hooks-contrib#723)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/723&gt;`_)
* Add hook for ``xarray``, which ensures that metadata for ``numpy``
(required by ``xarray``) is collected.
(`[#728](pyinstaller/pyinstaller-hooks-contrib#728)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/728&gt;`_)
<p>Updated hooks
</code></pre></p>
<ul>
<li>(Windows) Update <code>pyproj</code> hook to explicitly collect DLLs
and
load-order file (if present) from <code>pyproj.libs</code> directory.
This
fixes <code>DLL load failed while importing _network</code> error when
using
Anaconda python 3.8 or 3.9, where <code>delvewheel</code> (used by
<code>pyproj</code>)
needs to load DLLs via load-order file due to defunct
<code>os.add_dll_directory</code> function.
(<code>[#726](pyinstaller/pyinstaller-hooks-contrib#726)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/726&gt;</code>_)</li>
<li>Extend <code>cryptography</code> hook to collect OpenSSL modules
(the
<code>ossl-modules</code> directory) when available. Add a run-time hook
that
overrides OpenSSL module search path by setting the
<code>OPENSSL_MODULES</code>
environment variable to the bundled <code>ossl-modules</code> directory.
This
fixes <code>RuntimeError: OpenSSL 3.0's legacy provider failed to
load.</code>
error when using <code>cryptography</code> with OpenSSL &gt;= 3.0 builds
that have
modules enabled (e.g., most Linux distributions, msys/MinGW on Windows,
and Homebrew on macOS).
(<code>[#724](pyinstaller/pyinstaller-hooks-contrib#724)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/724&gt;</code>_)</li>
<li>Suppress errors in <code>gcloud</code> hook that occur when the hook
is triggered
by the <code>gcloud</code> namespace package from
<code>gcloud-aio-*</code> and
<code>gcloud-rest-*</code>
dists instead of the <code>gcloud</code> package from the
<code>gcloud</code> dist.
(<code>[#731](pyinstaller/pyinstaller-hooks-contrib#731)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/731&gt;</code>_)</li>
<li>Update hook for <code>tables</code> (PyTables) to collect bundled
blosc2
shared library, if available. On Windows, explicitly collect DLLs and
load-order file (if present) from <code>tables.libs</code> directory.
(<code>[#732](pyinstaller/pyinstaller-hooks-contrib#732)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/732&gt;</code>_)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/a62d86392e952bc37a92c28e0429956de29ed7a9"><code>a62d863</code></a>
Release v2024.5</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/6d9f5c5c7117d76eb3e347503efbb3b04e896821"><code>6d9f5c5</code></a>
hooks: add hook for backports namespace package</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/485ce07f3dd7dc3e6e6c11717079c356172a7b7a"><code>485ce07</code></a>
hooks: cryptography: account for ossl-modules location on Alpine
linux</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/a0cbbc29b99a08ee018d89513f2c570f2c842197"><code>a0cbbc2</code></a>
hooks: cryptography: work-around for systems with musl libc</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/8d14a00e7429abca5e3e6d1f282cc799f61b96b0"><code>8d14a00</code></a>
Scheduled weekly dependency update for week 16 (<a
href="https://redirect.github.com/pyinstaller/pyinstaller-hooks-contrib/issues/734">#734</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/88708840343c799af578f02a3875a5f40b150ba0"><code>8870884</code></a>
hooks: update tables hook to collect blosc2 shared library</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/ccc5f7dbcaf2c1f0778d1459b246ee56cf6baf57"><code>ccc5f7d</code></a>
hooks: gcloud: suppress errors</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/d2a4a24399a7e9897360d66f48474a7ea182c1bd"><code>d2a4a24</code></a>
hooks: add hook for xarray</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/aa7d19fa1f4217bd7ef541b38495d0a5157fa099"><code>aa7d19f</code></a>
ci/cd: bump actions versions</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/82292498516674a3681617128e17bca508d7259c"><code>8229249</code></a>
tests: add basic test for cryptography</li>
<li>Additional commits viewable in <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/compare/2024.4...2024.5">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.4&new-version=2024.5)](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.

2 participants