Skip to content

Commit 98877bb

Browse files
author
Documenter.jl
committed
build based on 6aeeba0
1 parent 5caae33 commit 98877bb

12 files changed

Lines changed: 32 additions & 32 deletions

File tree

dev/.documenter-siteinfo.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"documenter":{"documenter_version":"1.17.0","generation_timestamp":"2026-05-24T13:59:03","julia_version":"1.12.6"}}
1+
{"documenter":{"documenter_version":"1.17.0","generation_timestamp":"2026-05-24T15:12:13","julia_version":"1.12.6"}}

dev/compat/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dev/conversion-to-julia/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dev/conversion-to-python/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dev/faq/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717

1818
using PythonCall
1919

20-
np = pyimport(&quot;numpy&quot;)</code></pre><h2 id="What-versions-of-Python-and-Julia-do-you-support?"><a class="docs-heading-anchor" href="#What-versions-of-Python-and-Julia-do-you-support?">What versions of Python and Julia do you support?</a><a id="What-versions-of-Python-and-Julia-do-you-support?-1"></a><a class="docs-heading-anchor-permalink" href="#What-versions-of-Python-and-Julia-do-you-support?" title="Permalink"></a></h2><p>Each release of PythonCall and JuliaCall will support and require:</p><ul><li>Any currently supported version of Python, <a href="https://devguide.python.org/versions/">see here</a>. Currently 3.10+.</li><li>The current Julia LTS version and newer, <a href="https://julialang.org/downloads/#long_term_support_release">see here</a>. Currently 1.10+.</li></ul><p>Only the latest patch release within each minor version is supported.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../compat/">« Compatibility Tools</a><a class="docs-footer-nextpage" href="../releasenotes/">Release Notes »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Sunday 24 May 2026 13:59">Sunday 24 May 2026</span>. Using Julia version 1.12.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
20+
np = pyimport(&quot;numpy&quot;)</code></pre><h2 id="What-versions-of-Python-and-Julia-do-you-support?"><a class="docs-heading-anchor" href="#What-versions-of-Python-and-Julia-do-you-support?">What versions of Python and Julia do you support?</a><a id="What-versions-of-Python-and-Julia-do-you-support?-1"></a><a class="docs-heading-anchor-permalink" href="#What-versions-of-Python-and-Julia-do-you-support?" title="Permalink"></a></h2><p>Each release of PythonCall and JuliaCall will support and require:</p><ul><li>Any currently supported version of Python, <a href="https://devguide.python.org/versions/">see here</a>. Currently 3.10+.</li><li>The current Julia LTS version and newer, <a href="https://julialang.org/downloads/#long_term_support_release">see here</a>. Currently 1.10+.</li></ul><p>Only the latest patch release within each minor version is supported.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../compat/">« Compatibility Tools</a><a class="docs-footer-nextpage" href="../releasenotes/">Release Notes »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Sunday 24 May 2026 15:12">Sunday 24 May 2026</span>. Using Julia version 1.12.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

dev/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dev/juliacall-reference/index.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dev/juliacall/index.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dev/pythoncall-reference/index.html

Lines changed: 19 additions & 19 deletions
Large diffs are not rendered by default.

dev/pythoncall/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,4 +159,4 @@
159159
bar() = @pyconst(pyimport(&quot;foo&quot;).bar)()
160160
end</code></pre><h3 id="Dependencies"><a class="docs-heading-anchor" href="#Dependencies">Dependencies</a><a id="Dependencies-1"></a><a class="docs-heading-anchor-permalink" href="#Dependencies" title="Permalink"></a></h3><p>If your package depends on some Python packages, you must generate a <code>CondaPkg.toml</code> file. See <a href="#python-deps">Installing Python packages</a>.</p><h2 id="jl-multi-threading"><a class="docs-heading-anchor" href="#jl-multi-threading">Multi-threading</a><a id="jl-multi-threading-1"></a><a class="docs-heading-anchor-permalink" href="#jl-multi-threading" title="Permalink"></a></h2><div class="admonition is-warning" id="Warning-515ca28cb059d818"><header class="admonition-header">Warning<a class="admonition-anchor" href="#Warning-515ca28cb059d818" title="Permalink"></a></header><div class="admonition-body"><p>Multi-threading support is experimental and can change without notice.</p></div></div><p>From v0.9.22, PythonCall supports multi-threading in Julia and/or Python, with some caveats.</p><p>Most importantly, you can only call Python code while Python&#39;s <a href="https://docs.python.org/3/glossary.html#term-global-interpreter-lock">Global Interpreter Lock (GIL)</a> is locked by the current thread. Ordinarily, the GIL is locked by the main thread in Julia, so if you want to run Python code on any other thread, you must unlock the GIL from the main thread and then re-lock it while running any Python code on other threads.</p><p>This is made possible by the macros <a href="../pythoncall-reference/#PythonCall.GIL.@unlock"><code>PythonCall.GIL.@unlock</code></a> and <a href="../pythoncall-reference/#PythonCall.GIL.@lock"><code>PythonCall.GIL.@lock</code></a> or the functions <a href="../pythoncall-reference/#PythonCall.GIL.unlock"><code>PythonCall.GIL.unlock</code></a> and <a href="../pythoncall-reference/#PythonCall.GIL.lock"><code>PythonCall.GIL.lock</code></a> with this pattern:</p><pre><code class="language-julia hljs">PythonCall.GIL.@unlock Threads.@threads for i in 1:4
161161
PythonCall.GIL.@lock pyimport(&quot;time&quot;).sleep(5)
162-
end</code></pre><p>In the above example, we call <code>time.sleep(5)</code> four times in parallel. If Julia was started with at least four threads (<code>julia -t4</code>) then the above code will take about 5 seconds.</p><p>Both <code>@unlock</code> and <code>@lock</code> are important. If the GIL were not unlocked, then a deadlock would occur when attempting to lock the already-locked GIL from the threads. If the GIL were not re-locked, then Python would crash when interacting with it.</p><p>With multiple Julia threads you need exactly one interactive thread, see the <a href="../faq/#faq-multi-threading">FAQ</a>.</p><p>You can also use <a href="../juliacall/#py-multi-threading">multi-threading from Python</a>.</p><h3 id="Caveat:-Garbage-collection"><a class="docs-heading-anchor" href="#Caveat:-Garbage-collection">Caveat: Garbage collection</a><a id="Caveat:-Garbage-collection-1"></a><a class="docs-heading-anchor-permalink" href="#Caveat:-Garbage-collection" title="Permalink"></a></h3><p>If Julia&#39;s GC collects any Python objects from a thread where the GIL is not currently locked, then those Python objects will not immediately be deleted. Instead they will be queued to be deleted in a later GC pass.</p><p>If you find you have many Python objects not being deleted, you can call <a href="../pythoncall-reference/#PythonCall.GC.gc"><code>PythonCall.GC.gc()</code></a> or <code>GC.gc()</code> while the GIL is locked to clear the queue.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../pythoncall-reference/">Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Sunday 24 May 2026 13:59">Sunday 24 May 2026</span>. Using Julia version 1.12.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
162+
end</code></pre><p>In the above example, we call <code>time.sleep(5)</code> four times in parallel. If Julia was started with at least four threads (<code>julia -t4</code>) then the above code will take about 5 seconds.</p><p>Both <code>@unlock</code> and <code>@lock</code> are important. If the GIL were not unlocked, then a deadlock would occur when attempting to lock the already-locked GIL from the threads. If the GIL were not re-locked, then Python would crash when interacting with it.</p><p>With multiple Julia threads you need exactly one interactive thread, see the <a href="../faq/#faq-multi-threading">FAQ</a>.</p><p>You can also use <a href="../juliacall/#py-multi-threading">multi-threading from Python</a>.</p><h3 id="Caveat:-Garbage-collection"><a class="docs-heading-anchor" href="#Caveat:-Garbage-collection">Caveat: Garbage collection</a><a id="Caveat:-Garbage-collection-1"></a><a class="docs-heading-anchor-permalink" href="#Caveat:-Garbage-collection" title="Permalink"></a></h3><p>If Julia&#39;s GC collects any Python objects from a thread where the GIL is not currently locked, then those Python objects will not immediately be deleted. Instead they will be queued to be deleted in a later GC pass.</p><p>If you find you have many Python objects not being deleted, you can call <a href="../pythoncall-reference/#PythonCall.GC.gc"><code>PythonCall.GC.gc()</code></a> or <code>GC.gc()</code> while the GIL is locked to clear the queue.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../">« Home</a><a class="docs-footer-nextpage" href="../pythoncall-reference/">Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Sunday 24 May 2026 15:12">Sunday 24 May 2026</span>. Using Julia version 1.12.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>

0 commit comments

Comments
 (0)