From 3e0979564d8162d8a6dd80feea10f5a3a0aa6924 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sun, 15 Sep 2024 14:16:35 +0200 Subject: Update the Guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- guide/_sources/helper.rst.txt | 4 ++ guide/_sources/pytest.rst.txt | 53 ----------------- guide/_static/alabaster.css | 115 +++++++++++-------------------------- guide/any.html | 28 ++++----- guide/basic.html | 28 ++++----- guide/buildsys.html | 28 ++++----- guide/concept.html | 28 ++++----- guide/depend.html | 28 ++++----- guide/distutils-legacy.html | 28 ++++----- guide/distutils.html | 28 ++++----- guide/eclass.html | 28 ++++----- guide/expert-multi.html | 28 ++++----- guide/genindex.html | 34 +++++------ guide/helper.html | 32 ++++++----- guide/index.html | 29 +++++----- guide/interpreter-maintenance.html | 28 ++++----- guide/interpreter.html | 28 ++++----- guide/migration.html | 28 ++++----- guide/multi.html | 28 ++++----- guide/package-maintenance.html | 28 ++++----- guide/porting.html | 28 ++++----- guide/preface.html | 28 ++++----- guide/pypi.html | 28 ++++----- guide/pytest.html | 81 +++++--------------------- guide/qawarn.html | 28 ++++----- guide/search.html | 7 ++- guide/searchindex.js | 2 +- guide/single.html | 28 ++++----- guide/test.html | 28 ++++----- 29 files changed, 387 insertions(+), 530 deletions(-) (limited to 'guide') diff --git a/guide/_sources/helper.rst.txt b/guide/_sources/helper.rst.txt index dccb27c..1bb84c9 100644 --- a/guide/_sources/helper.rst.txt +++ b/guide/_sources/helper.rst.txt @@ -200,6 +200,7 @@ to them can be passed to the function:: .. index:: python_get_CFLAGS .. index:: python_get_LIBS .. index:: python_get_PYTHON_CONFIG +.. index:: python_get_stdlib Querying the implementation information ======================================= @@ -219,6 +220,9 @@ The following generic getters are provided: - ``python_get_scriptdir`` that outputs the absolute path to the python-exec script directory for the implementation. +- ``python_get_stdlib`` that outputs the absolute path to the target's + standard library directory (where standard modules can be found). + The following getters are provided only for CPython targets: - ``python_get_library_path`` that outputs the absolute path diff --git a/guide/_sources/pytest.rst.txt b/guide/_sources/pytest.rst.txt index 525b5bd..bc0950b 100644 --- a/guide/_sources/pytest.rst.txt +++ b/guide/_sources/pytest.rst.txt @@ -367,59 +367,6 @@ mocker dev-python/pytest-mock =================================== ==================================== -Warnings -======== -pytest captures all warnings from the test suite by default, and prints -a summary of them at the end of the test suite run:: - - =============================== warnings summary =============================== - asgiref/sync.py:135: 1 warning - tests/test_local.py: 5 warnings - tests/test_sync.py: 12 warnings - tests/test_sync_contextvars.py: 1 warning - /tmp/asgiref/asgiref/sync.py:135: DeprecationWarning: There is no current event loop - self.main_event_loop = asyncio.get_event_loop() - [...] - -However, some projects go further and use ``filterwarnings`` option -to make (some) warnings fatal:: - - ==================================== ERRORS ==================================== - _____________________ ERROR collecting tests/test_sync.py ______________________ - tests/test_sync.py:577: in - class ASGITest(TestCase): - tests/test_sync.py:583: in ASGITest - async def test_wrapped_case_is_collected(self): - asgiref/sync.py:135: in __init__ - self.main_event_loop = asyncio.get_event_loop() - E DeprecationWarning: There is no current event loop - =========================== short test summary info ============================ - ERROR tests/test_sync.py - DeprecationWarning: There is no current event loop - !!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!! - =============================== 1 error in 0.13s =============================== - -Unfortunately, this frequently means that warnings coming from -a dependency trigger test failures in other packages. Since making -warnings fatal is relatively common in the Python world, it is -recommended to: - -1. Fix warnings in Python packages whenever possible, even if they - are not fatal to the package itself. - -2. Do not enable new Python implementations if they trigger any new - warnings in the package. - -If the warnings come from issues in the package's test suite rather than -the installed code, it is acceptable to make them non-fatal. This can -be done either through removing the ``filterwarnings`` key from -``setup.cfg``, or adding an ignore entry. For example, the following -setting ignores ``DeprecationWarning`` in ``test`` directory:: - - filterwarnings = - error - ignore::DeprecationWarning:test - - .. _custom pytest markers: https://docs.pytest.org/en/stable/example/markers.html .. _pytest-runner: https://pypi.org/project/pytest-runner/ diff --git a/guide/_static/alabaster.css b/guide/_static/alabaster.css index e3174bf..7e75bf8 100644 --- a/guide/_static/alabaster.css +++ b/guide/_static/alabaster.css @@ -1,5 +1,3 @@ -@import url("basic.css"); - /* -- page layout ----------------------------------------------------------- */ body { @@ -160,8 +158,8 @@ div.sphinxsidebar input { font-size: 1em; } -div.sphinxsidebar #searchbox input[type="text"] { - width: 160px; +div.sphinxsidebar #searchbox { + margin: 1em 0; } div.sphinxsidebar .search > div { @@ -263,10 +261,6 @@ div.admonition p.last { margin-bottom: 0; } -div.highlight { - background-color: #fff; -} - dt:target, .highlight { background: #FAF3E8; } @@ -454,7 +448,7 @@ ul, ol { } pre { - background: #EEE; + background: unset; padding: 7px 30px; margin: 15px 0px; line-height: 1.3em; @@ -485,15 +479,15 @@ a.reference { border-bottom: 1px dotted #004B6B; } +a.reference:hover { + border-bottom: 1px solid #6D4100; +} + /* Don't put an underline on images */ a.image-reference, a.image-reference:hover { border-bottom: none; } -a.reference:hover { - border-bottom: 1px solid #6D4100; -} - a.footnote-reference { text-decoration: none; font-size: 0.7em; @@ -509,68 +503,7 @@ a:hover tt, a:hover code { background: #EEE; } - -@media screen and (max-width: 870px) { - - div.sphinxsidebar { - display: none; - } - - div.document { - width: 100%; - - } - - div.documentwrapper { - margin-left: 0; - margin-top: 0; - margin-right: 0; - margin-bottom: 0; - } - - div.bodywrapper { - margin-top: 0; - margin-right: 0; - margin-bottom: 0; - margin-left: 0; - } - - ul { - margin-left: 0; - } - - li > ul { - /* Matches the 30px from the "ul, ol" selector above */ - margin-left: 30px; - } - - .document { - width: auto; - } - - .footer { - width: auto; - } - - .bodywrapper { - margin: 0; - } - - .footer { - width: auto; - } - - .github { - display: none; - } - - - -} - - - -@media screen and (max-width: 875px) { +@media screen and (max-width: 940px) { body { margin: 0; @@ -580,12 +513,16 @@ a:hover tt, a:hover code { div.documentwrapper { float: none; background: #fff; + margin-left: 0; + margin-top: 0; + margin-right: 0; + margin-bottom: 0; } div.sphinxsidebar { display: block; float: none; - width: 102.5%; + width: unset; margin: 50px -30px -20px -30px; padding: 10px 20px; background: #333; @@ -620,8 +557,14 @@ a:hover tt, a:hover code { div.body { min-height: 0; + min-width: auto; /* fixes width on small screens, breaks .hll */ padding: 0; } + + .hll { + /* "fixes" the breakage */ + width: max-content; + } .rtd_doc_footer { display: none; @@ -635,13 +578,18 @@ a:hover tt, a:hover code { width: auto; } - .footer { - width: auto; - } - .github { display: none; } + + ul { + margin-left: 0; + } + + li > ul { + /* Matches the 30px from the "ul, ol" selector above */ + margin-left: 30px; + } } @@ -705,4 +653,11 @@ nav#breadcrumbs li+li:before { div.related { display: none; } +} + +img.github { + position: absolute; + top: 0; + border: 0; + right: 0; } \ No newline at end of file diff --git a/guide/any.html b/guide/any.html index 81ca7ee..5d12d4a 100644 --- a/guide/any.html +++ b/guide/any.html @@ -7,7 +7,8 @@ python-any-r1 — build-time dependency — Gentoo Python Guide documentation - + + @@ -308,7 +309,16 @@ USE conditional blocks inside Navigation + + +

Navigation

Contents:

  • Preface
  • @@ -351,16 +361,6 @@ USE conditional blocks inside
- - @@ -377,8 +377,8 @@ USE conditional blocks inside Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Common basics — Gentoo Python Guide documentation - + + @@ -271,7 +272,16 @@ or noxfile.pyNavigation + + +

Navigation

Contents:

  • Preface
  • @@ -313,16 +323,6 @@ or noxfile.py
- - @@ -339,8 +339,8 @@ or noxfile.pySphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Integration with build systems written in Python — Gentoo Python Guide documentation - + + @@ -664,7 +665,16 @@ build-time ${PYTHON -

Navigation

+ + +

Navigation

Contents:

  • Preface
  • @@ -705,16 +715,6 @@ build-time ${PYTHON
- - @@ -731,8 +731,8 @@ build-time ${PYTHON ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Advanced concepts — Gentoo Python Guide documentation - + + @@ -210,7 +211,16 @@ of being retired.

-

Navigation

+ + +

Navigation

Contents:

  • Preface
  • @@ -249,16 +259,6 @@ of being retired.

- - @@ -275,8 +275,8 @@ of being retired.

©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Advanced dependencies — Gentoo Python Guide documentation - + + @@ -281,7 +282,16 @@ to run them.

-

Navigation

+ + +

Navigation

Contents:

  • Preface
  • @@ -323,16 +333,6 @@ to run them.

- - @@ -349,8 +349,8 @@ to run them.

©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | distutils-r1 legacy concepts — Gentoo Python Guide documentation - + + @@ -341,7 +342,16 @@ has broken it for most of the consumers.

-

Navigation

+ + +

Navigation

Contents:

  • Preface
  • @@ -382,16 +392,6 @@ has broken it for most of the consumers.

- - @@ -408,8 +408,8 @@ has broken it for most of the consumers.

©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | distutils-r1 — standard Python build systems — Gentoo Python Guide documentation - + + @@ -1168,7 +1169,16 @@ python_install() { -

Navigation

+ + +

Navigation

Contents:

  • Preface
  • @@ -1224,16 +1234,6 @@ python_install() {
- - @@ -1250,8 +1250,8 @@ python_install() { ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Choosing between Python eclasses — Gentoo Python Guide documentation - + + @@ -182,7 +183,16 @@ For single-impl packages, Navigation + + +

Navigation

Contents:

  • Preface
  • @@ -224,16 +234,6 @@ For single-impl packages,
- - @@ -250,8 +250,8 @@ For single-impl packages, Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Expert python-r1 usage — Gentoo Python Guide documentation - + + @@ -560,7 +561,16 @@ to python_gen_any_d -

Navigation

+ + +

Navigation

Contents:

  • Preface
  • @@ -602,16 +612,6 @@ to python_gen_any_d
- - @@ -628,8 +628,8 @@ to python_gen_any_d ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Index — Gentoo Python Guide documentation - + + @@ -213,10 +214,10 @@
  • python_get_CFLAGS, [1]
  • - - + - - @@ -401,8 +403,8 @@ ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 diff --git a/guide/helper.html b/guide/helper.html index 29b6e21..7f5cf86 100644 --- a/guide/helper.html +++ b/guide/helper.html @@ -7,7 +7,8 @@ Common helper functions — Gentoo Python Guide documentation - + + @@ -200,7 +201,7 @@ to them can be passed to the function:

    -

    Querying the implementation information

    +

    Querying the implementation information

    Most of the time, various build systems manage to detect and query the Python implementation correctly for necessary build details. Ocassionally, you need to provide those values or override bad detection @@ -213,6 +214,8 @@ site-packages directory (where Python modules are installed).

    to the target-specific header directory.

  • python_get_scriptdir that outputs the absolute path to the python-exec script directory for the implementation.

  • +
  • python_get_stdlib that outputs the absolute path to the target’s +standard library directory (where standard modules can be found).

  • The following getters are provided only for CPython targets:

      @@ -274,7 +277,16 @@ helpers instead.

      -

      Navigation

      + + +

      Navigation

      Contents:

      • Preface
      • @@ -316,16 +328,6 @@ helpers instead.

    - - @@ -342,8 +344,8 @@ helpers instead.

    ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Gentoo Python Guide — Gentoo Python Guide documentation - + + @@ -170,7 +171,6 @@
  • ImportPathMismatchError
  • Failures due to missing files in temporary directories
  • fixture ‘…’ not found
  • -
  • Warnings
  • Advanced concepts
      @@ -258,7 +258,16 @@ -

      Navigation

      + + +

      Navigation

      Contents:

    - - @@ -319,8 +318,8 @@ ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Maintenance of Python implementations — Gentoo Python Guide documentation - + + @@ -325,7 +326,16 @@ dependencies will be added or vendored into flit_core.

    -

    Navigation

    + + +

    Navigation

    Contents:

    • Preface
    • @@ -366,16 +376,6 @@ dependencies will be added or vendored into flit_core.

  • - - @@ -392,8 +392,8 @@ dependencies will be added or vendored into flit_core.

    ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Python interpreters — Gentoo Python Guide documentation - + + @@ -291,7 +292,16 @@ syntax than native asyncio code.

    -

    Navigation

    + + +

    Navigation

    Contents:

    • Preface
    • @@ -335,16 +345,6 @@ syntax than native asyncio code.

    - - @@ -361,8 +361,8 @@ syntax than native asyncio code.

    ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | Migration guides — Gentoo Python Guide documentation - + + @@ -244,7 +245,16 @@ necessary and tests should work out of the box.

    -

    Navigation

    + + +

    Navigation

    Contents:

    • Preface
    • @@ -285,16 +295,6 @@ necessary and tests should work out of the box.

    - - @@ -311,8 +311,8 @@ necessary and tests should work out of the box.

    ©2020, Michał Górny, license: CC BY 4.0. | - Powered by Sphinx 7.4.7 - & Alabaster 0.7.16 + Powered by Sphinx 8.0.2 + & Alabaster 1.0.0 | python-r1 — multi-impl packages — Gentoo Python Guide documentation - + + @@ -385,7 +386,16 @@ flag, while parts affecting build time (