Skip to content
New issue

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

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

Already on GitHub? # to your account

hooks: cryptography: rework the OpenSSL version check #768

Merged
merged 1 commit into from
Jul 26, 2024

Conversation

rokm
Copy link
Member

@rokm rokm commented Jul 24, 2024

Instead of trying to infer OpenSSL version by looking at CRYPTOGRAPHY_OPENSSL_300_OR_GREATER attribute of cryptography.hazmat.backends.openssl.backend._lib, use cryptography.hazmat.backends.openssl.backend.openssl_version_number() to obtain full OpenSSL version number.

Fixes compatibility with cryptography 43.0.0, where the afore-mentioned attribute does not seem to be available anymore. openssl_version_number(), on the other hand, seems to be available in all versions going back to 2.8 (which is the first version that supports python 3.8).

Closes pyinstaller/pyinstaller#8682

Instead of trying to infer OpenSSL version by looking at
`CRYPTOGRAPHY_OPENSSL_300_OR_GREATER` attribute of
`cryptography.hazmat.backends.openssl.backend._lib`, use
`cryptography.hazmat.backends.openssl.backend.openssl_version_number()`
to obtain full OpenSSL version number.

Fixes compatibility with `cryptography` 43.0.0, where the
afore-mentioned attribute does not seem to be available anymore.
`openssl_version_number()`, on the other hand, seems to be
available in all versions going back to 2.8 (which is the first
version that supports python 3.8).
@rokm rokm merged commit c6f79f1 into pyinstaller:master Jul 26, 2024
2 checks passed
@rokm rokm deleted the hook-cryptography-fix-openssl-check branch July 26, 2024 18:32
github-actions bot pushed a commit to wxx9248/Pickle-Rush that referenced this pull request Aug 12, 2024
…4.8 (#108)

Bumps
[pyinstaller-hooks-contrib](https://github.com/pyinstaller/pyinstaller-hooks-contrib)
from 2024.7 to 2024.8.
<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>v2024.8</h2>
<p>Please see the <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/tree/v2024.8/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.8 (2024-08-09)</h2>
<p>New hooks</p>
<pre><code>
* Add a hook for ``cmocean``, which has text data files.
(`[#769](pyinstaller/pyinstaller-hooks-contrib#769)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/769&gt;`_)
* Add a hook for ``pydicom``, which has hidden imports.
(`[#776](pyinstaller/pyinstaller-hooks-contrib#776)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/776&gt;`_)
* Add a hook for ``tzwhere``, which has data files.
(`[#772](pyinstaller/pyinstaller-hooks-contrib#772)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/772&gt;`_)
* Add hook for ``monai`` to collect its source .py files for
TorchScript/JIT.

(`[#778](pyinstaller/pyinstaller-hooks-contrib#778)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/778&gt;`_)
* Add hooks for ``itk`` to work around the package's requirements about
the ``itk/Configuration`` directory.
(`[#778](pyinstaller/pyinstaller-hooks-contrib#778)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/778&gt;`_)
* Added hooks for the ``trame`` suite of libraries, which has data files
and
hidden imports.
(`[#775](pyinstaller/pyinstaller-hooks-contrib#775)

&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/775&gt;`_)
<p>Updated hooks
</code></pre></p>
<ul>
<li>Rework the OpenSSL version check in <code>cryptography</code> hook
to fix
compatibility with <code>cryptography</code> 43.0.0.
(<code>[#768](pyinstaller/pyinstaller-hooks-contrib#768)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/768&gt;</code>_)</li>
<li>Update <code>hydra</code> hook to include work-around for
<code>hydra</code>'s plugin
manager, which under python &lt; 3.10 (still) uses deprecated PEP-302
that was removed from PyInstaller's <code>PyiFrozenImporter</code> in
PyInstaller 5.8. When building using python <!-- raw HTML omitted -->=
5.8,
the modules collected from <code>hydra._internal.core_plugins</code> and
<code>hydra_plugins</code> packages are now collected as source .py
files only;
this way, they are handled by built-in python's finder/importer instead
of PyInstaller's <code>PyiFrozenImporter</code>.
(<code>[#760](pyinstaller/pyinstaller-hooks-contrib#760)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/760&gt;</code>_)</li>
<li>Update <code>imageio_ffmpeg</code> hook for compatibility with
<code>imageio-ffmpeg</code>
0.5.0 and later.
(<code>[#766](pyinstaller/pyinstaller-hooks-contrib#766)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/766&gt;</code>_)</li>
<li>Update <code>pyexcel_ods</code> hook to add missing hidden import
and add tests.

(<code>[#779](pyinstaller/pyinstaller-hooks-contrib#779)
&lt;https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/779&gt;</code>_)</li>
</ul>
<p>Project &amp; Process</p>
<pre><code>
* Released sdists and tagged GitHub source archives contain the
changelog
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/c1affefbe2bb8a35ecd05f6779727eec5b70eec5"><code>c1affef</code></a>
Release v2024.8</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/1f84e9b0b985a8b47fbb92e16c2c115191545041"><code>1f84e9b</code></a>
Fix release verion bumper</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/46b318260d89f1da5f95962d262b09f25fb0d56c"><code>46b3182</code></a>
Add hooks for trame (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/775">#775</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/4324d79432311672d7fb6970266e9b63fe3780ff"><code>4324d79</code></a>
Add hooks for ITK and MONAI (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/778">#778</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/7e6c20f983aae10f3750766adc2efc89bc100c42"><code>7e6c20f</code></a>
Update hook for pyexcel_ods (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/779">#779</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/28151eae3bc6f026c26469e0960e4aad5d689b17"><code>28151ea</code></a>
Add hook for pydicom (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/776">#776</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/3bec1611b2a49976973dc5e8b526cbd88b977c2e"><code>3bec161</code></a>
Scheduled weekly dependency update for week 31 (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/774">#774</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/39e1cdd75f71a6b89c297f1f6ace9bb942a21020"><code>39e1cdd</code></a>
Add hook for tzwhere (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/771">#771</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/c0d694c8b9b83fffb9d5d308e9ef6b851ca7179f"><code>c0d694c</code></a>
Scheduled weekly dependency update for week 30 (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/770">#770</a>)</li>
<li><a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/commit/cd3e5e25247d4ae6225b2458872087a3557f1a62"><code>cd3e5e2</code></a>
Add hook for cmocean (<a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/issues/769">#769</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pyinstaller/pyinstaller-hooks-contrib/compare/2024.7...v2024.8">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.7&new-version=2024.8)](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>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unknown error message
2 participants