### NumPy Tutorials Repository Example Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-10.md This snippet references the repository used for NumPy tutorials, highlighting a different technical setup (jupytext - text-based notebooks) and a separate structure from the main NumPy documentation. ```GitHub https://github.com/numpy/numpy-tutorials ``` -------------------------------- ### Python Devguide How-To Guides Section Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-07.md This snippet outlines the plan to add a 'How-To Guides' section to the Python developer guide, noting that it is pending the devguide reorganization and further thought on the approach. ```text Add a (How-To) Guides section to devguide Waiting for the reorg and still thinking about the best way to approach this :thinking_face: ``` -------------------------------- ### Custom Sphinx Directive for Examples Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-02.md A proposed custom Sphinx directive to create unobtrusive and recognizable links to an 'Examples' section within the documentation. This aims to improve navigation for users seeking additional examples. ```python class ExampleLinkDirective(Directive): """A custom Sphinx directive to create a link to the Examples section.""" def run(self): # Logic to create a link to the Examples section # This could involve creating a specific Sphinx node or raw HTML return [nodes.paragraph(text='See more examples.')] ``` -------------------------------- ### Sphinx Contributor Guide Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2025-05.md This link points to the Sphinx contributor guide, which provides information on how to contribute to the Sphinx documentation project. It is relevant for understanding the project's structure and contribution process. ```Python https://www.sphinx-doc.org/en/master/internals/contributing.html ``` -------------------------------- ### Asyncio Gather Example Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2025-02.md Demonstrates the use of `asyncio.gather` in Python, which is another example of an awaitable callable. This helps in clarifying the distinctions between 'async', 'awaitable', and 'coroutine' in documentation. ```Python import asyncio async def coro1(): await asyncio.sleep(1) async def coro2(): await asyncio.sleep(2) async def main(): await asyncio.gather(coro1(), coro2()) asyncio.run(main()) ``` -------------------------------- ### Python Docs Theme Release and PyPI Setup Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-09.md Discussion regarding the release of python-docs-theme version 2023.8 to fix dark theme bugs and the need for Trusted Publishers setup on PyPI for future releases. This involves coordinating with individuals who can manage releases. ```Python # No specific code provided, but refers to Python package releases and PyPI configuration. ``` -------------------------------- ### Python Devguide 'What's New' Section Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-07.md This snippet discusses the potential addition of a 'what's new' section to the Python developer guide, considering the use of blurbs and its dependency on the devguide reorganization. It references an issue for this task. ```text Add a “what's new” section to the devguide (key/important changes) [python/devguide#885](https://github.com/python/devguide/issues/885) Should we use blurb? - start simple, then move to blurb if needed Waiting for the devguide reorg ``` -------------------------------- ### Asyncio Sleep Example Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2025-02.md Provides an example of an awaitable function in Python's asyncio library, specifically `asyncio.sleep`. This is used to illustrate the concept of awaitables in the context of asynchronous programming documentation. ```Python import asyncio async def main(): await asyncio.sleep(1) asyncio.run(main()) ``` -------------------------------- ### Python Docs Build Scripts RTD Setup Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-02.md This snippet pertains to setting up Read the Docs (RTD) for previews in pull requests for the python-docs-theme. Mariatta is tasked with setting up an organization account on Read the Docs. ```Python # Setup RTD for previews in pull requests: # Related PR: https://github.com/python/python-docs-theme/pull/105 # Action: Mariatta to set up an organization account on Read the Docs. ``` -------------------------------- ### Python Devguide Reorganization Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-07.md This snippet refers to a pull request for reorganizing the Python developer guide into directories and discusses the preferred merge strategy (rebase). ```text Reorganize the devguide in directories [python/devguide#901](https://github.com/python/devguide/pull/901) Squash merge or rebase? - rebase ``` -------------------------------- ### Collections.Counter.most_common Method Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-01.md An example of a function where documenting the contract, specifically return types, was initially missing. This highlights the need for comprehensive documentation for all methods. ```Python collections.Counter.most_common ``` -------------------------------- ### Python Ellipsis Usage Example Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2025-08.md Discusses the best approach for documenting the Ellipsis object in Python, including whether to provide usage examples and explanations of its various applications. ```Python ... ``` -------------------------------- ### Update CPython Docs Previews to Read the Docs Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-05.md This snippet details the process of switching CPython documentation previews from Netlify to Read the Docs. It highlights the benefits of multiple administrators and provides an example of a preview link generated from a GitHub Pull Request. ```text Hugo switched CPython docs previews from Netlify to RtD. Main benefit: multiple admins instead of single-person bottleneck with Netlify. python/cpython#103843 GitHub action to update the link from the PR - we don't need one for Netlify GitHub action to update a link to a documentation preview on ReadTheDocs from the GitHub Pull Request page. We don't need such a preview for the current docs as published at Netlify. Example of preview link: Pull Request [#104013, **gh-104010: Separate and improve docs for typing.get_origin and typing.get_args**](https://github.com/python/cpython/pull/104013), contains a link to a preview of the documentation reflecting the Pull Request's effects, at https://cpython-previews--104013.org.readthedocs.build/en/104013/. ``` -------------------------------- ### PEP 676 Reference Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-08.md This snippet references PEP 676, used as an example in the discussion about the process of creating and approving PEPs, particularly concerning prior work and decision-making clarity. ```URL https://peps.python.org/pep-0676/ ``` -------------------------------- ### Sphinx Support Page Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2025-05.md This link leads to the Sphinx support page, which is a resource for users seeking help with Sphinx. It is relevant for finding information on how to get support and potentially for adding information about office hours. ```Python https://www.sphinx-doc.org/en/master/support.html ``` -------------------------------- ### Python CPython Porting Guide PR Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-08.md This snippet points to a pull request in the python/cpython repository concerning the Porting Guide. It is mentioned as a potential application of new approaches to documentation commits. ```Python https://github.com/python/cpython/pull/107434 ``` -------------------------------- ### Python Docs Community Issue Tracker Summary Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-02.md A summary of key issues from the Python Docs Community GitHub repository, including theme migration, application processes, switcher setup, ReadTheDocs integration, and translation sprints. ```English - Migration of theme to modern responsive theme [python/docs-community#1](https://github.com/python/docs-community/issues/1) > This is coming along, albeit slower than I'd like. I'm resisting the urge to strive for perfect but, also, I'd like to check all the boxes? [Pradyun] - Post the application process for workgroup members [python/docs-community#3](https://github.com/python/docs-community/issues/3) - Enhancing the switchers setup [python/docs-community#4](https://github.com/python/docs-community/issues/4) > This is related to #14. :P [Pradyun] - ReadTheDocs [python/docs-community#5](https://github.com/python/docs-community/issues/5) - Suggestions from Python Language Summit [python/docs-community#6](https://github.com/python/docs-community/issues/6) - Mobile friendly theme for wiki.python.org [python/docs-community#7](https://github.com/python/docs-community/issues/7) > I _think_ a new theme would be nicest, even if it's the most "costly" in terms of effort+time? None of the existing themes look particularly great. [Pradyun] - Suggestions and ideas from Typing Summit [python/docs-community#8](https://github.com/python/docs-community/issues/8) - French translation sprint [python/docs-community#9](https://github.com/python/docs-community/issues/9) - Use Sphinx for pep builds and better rendering [python/docs-community#10](https://github.com/python/docs-community/issues/10) > This seems to be progressing well mostly thanks to Adam's work; we just need to do some tweaks to the styling and appearance; main blocker is just PEP 676's approval and then getting the infra moved over to whatever we decide on (RTD, GHP, Netlify, etc.). A huge improvement and going to unlock a lot of possibilities going forward while being far more maintainable than the hacked-together legacy csystem. I'm a little unsure if this is directly within scope here, though. [CAM-Gerlach] - Is it in scope? :) - Having a "fast path" for documentation contributions [python/docs-community#13](https://github.com/python/docs-community/issues/13) - Move language selection to a dedicated page? [python/docs-community#14](https://github.com/python/docs-community/issues/14) > This seems like a good idea. :P [the-guy-who-filed-the-issue AKA Pradyun] - Docs WG monthly meeting #1 [python/docs-community#15](https://github.com/python/docs-community/issues/15) > This one is a bit self-recursive, eh? :) [CAM-Gerlach] ``` -------------------------------- ### Setup Spanish Translation Docs on Read the Docs Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-05.md This describes the process of setting up Spanish translations for Python documentation on Read the Docs. It explains how to add English documentation as a submodule and configure multi-version support. ```text Manuel set up python-docs-es.readthedocs.io, the Spanish translation on RtD. The source files aren't in the translation repo, so the English version is added as a submodule. Translations need to be added as a new project, then connected in the admin interface. For multiversion, the version switcher is injected on the bottom right. Each version is a branch or a tag, once enabled they get built. RtD is rebuilding the flyout (switcher) to make it easier to customize. Working together with Pradyun (Furo, Lutra) ``` -------------------------------- ### Python Docs Bootstrapper Repository Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-09.md A link to a GitHub repository for a new bootstrapper tool designed for starting new Python documentation translation projects. This aims to replace an older, unmaintained tool. ```Git # Repository for the new Python docs bootstrapper. # Link: https://github.com/egeakman/python-docs-bootstrapper ``` -------------------------------- ### Python Positional-Only Arguments Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-07.md Addresses the documentation of positional-only arguments in Python, indicated by a forward slash (`/`) in function signatures. The discussion points explore methods for improving user understanding, such as tooltips or links, and ensuring discoverability through search functionality. A related pull request to the Python developer guide is mentioned. ```Python def my_function(arg1, /, arg2, *, kwarg1): """This function has positional-only arguments.""" pass ``` -------------------------------- ### Clone Python Docs Community Repo Source: https://github.com/python/docs-community/blob/main/README.md Clones the python/docs-community repository from GitHub and navigates into the cloned directory. This is the first step to setting up the documentation locally. ```console git clone https://github.com/python/docs-community.git cd docs-community ``` -------------------------------- ### Build and View Python Docs Live Source: https://github.com/python/docs-community/blob/main/README.md Builds the documentation, opens it in the default web browser, and sets up live updates whenever changes are made. This command is essential for previewing documentation modifications. ```python make htmllive ``` -------------------------------- ### Improve PEP 1 and PEP 12 for Documentation Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-12.md This snippet discusses the proposed reorganization of PEP 1 and PEP 12 to improve clarity and reduce redundancy. It covers moving author-facing help to the devguide, referencing the Sphinx reST primer, and consolidating guidance. ```Python Petr suggests moving the author-facing help out of PEP 1/to the devguide CAM mentions [python/peps#2337](https://github.com/python/peps/issues/2337) which proposes referencing the Sphinx reST primer instead of duplicating information there in PEP 12 and consolidating normative process guidance in PEP 1 and author-facing info in PEP 12/the devguide @CAM-Gerlach will open a PR implementing that first step, linking the Sphinx reST primer in PEP 12 instead of duplicating that information CAM also mentions the devguide's reST primer is essentially just a less-up-to-date copy of the Sphinx one; it should be revised to link to it and focus on CPython-specific guidance. This issue was already open as [python/docs-community#57](https://github.com/python/docs-community/issues/57), which was moved to [python/devguide#1000](https://github.com/python/devguide/issues/1000), where @CAM-Gerlach will work on it ``` -------------------------------- ### Python Devguide Issue: Follow-up Procedures Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-08.md This issue in the python/devguide repository concerns the definition and documentation of procedures for following up on additional tasks identified during code reviews. ```Text https://github.com/python/devguide/issues/1359 ``` -------------------------------- ### Google LightHouse for Site Analysis Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-10.md Explores Google LightHouse as an alternative for analyzing docs.python.org performance and accessibility, following the infeasibility of Google Search Console integration. ```text https://developer.chrome.com/docs/lighthouse/overview/ ``` -------------------------------- ### python-docs-theme PyPI Release Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-10.md Information regarding the release of python-docs-theme version 2023.8 and the setup of Trusted Publishers on PyPI for streamlined releases. ```text https://pypi.org/project/python-docs-theme/2023.8/ ``` -------------------------------- ### Create Python Virtual Environment Source: https://github.com/python/docs-community/blob/main/README.md Creates a new Python virtual environment using the 'make venv' command. This isolates project dependencies and ensures a clean environment for building the documentation. ```python make venv ``` -------------------------------- ### Pillow Deprecations Documentation Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-08.md This URL shows an example of deprecations documentation for the Pillow library, which is used as a reference for improving the format and discoverability of deprecation notes in Python's documentation. ```Text https://pillow.readthedocs.io/en/stable/deprecations.html ``` -------------------------------- ### View Lutra Theme for Python Docs Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-08.md This snippet provides a link to view a sample of the Lutra theme, a new theme for 'big' documentation projects, developed by Pradyun. It contrasts with Furo, which is designed for 'smaller docs'. ```URL https://pradyunsg-cpython-lutra-testing.readthedocs.io/en/latest/ ``` -------------------------------- ### Devguide Issue for Release Cycle Chart Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-01.md This snippet refers to a GitHub issue opened for the Python devguide to add additional development phase transition dates and a table of individual minor versions to the release cycle chart. ```Python # @CAM-Gerlach opened devguide issues for adding the additional development phase transition dates [python/devguide#998] & a table of individual minor versions [python/devguide#999] ``` -------------------------------- ### Pytest Deprecations Documentation Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-08.md This URL provides an example of deprecations documentation for the Pytest library. It serves as a comparison point for enhancing the structure and content of deprecation notices within Python's official documentation. ```Text https://docs.pytest.org/en/stable/deprecations.html ``` -------------------------------- ### Displaying Sphinx Warnings in CI Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-03.md This code snippet outlines a strategy for handling Sphinx warnings during Continuous Integration (CI) builds. It details how to display warnings in changed files and how to configure them to fail the build when present in critical output like 'What's New' sections. This is aimed at improving documentation quality by catching potential issues early. ```Python # Configuration for Sphinx warnings in CI # Show Sphinx warnings in changed files (non-failing) # sphinx_config['warnings_on_changed_files'] = True # Show Sphinx warnings in required lists (e.g., What's New) and fail the build # sphinx_config['warnings_on_required_lists'] = True # sphinx_config['fail_on_warnings'] = True # Example of a CI script snippet that might use this configuration: # import subprocess # result = subprocess.run(['sphinx-build', '-b', 'html', 'source', 'build'], capture_output=True, text=True) # if 'warning:' in result.stderr and sphinx_config['fail_on_warnings']: # print("Sphinx warnings found, failing build.") # exit(1) # print(result.stdout) # print(result.stderr) ``` -------------------------------- ### Enable Intersphinx for CPython 3.12 Docs Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-10.md Discussion on enabling Intersphinx support in the CPython 3.12 documentation. This feature would allow referencing definitions from other sources like PEPs and packaging, but may impact offline builds. The proposed solution involves a PR to CPython 3.12 and a discussion thread, with a related issue to be opened in Sphinx for local inventory file referencing. ```Python python/cpython#97785 ``` -------------------------------- ### Load JSON with NaN Values in Python Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-07.md Demonstrates how to load JSON data containing NaN values using Python's `json.load` function. It highlights the use of the `parse_constant` argument to handle specific string representations of non-finite numbers like '-Infinity', 'Infinity', and 'NaN'. The example references official documentation and a Stack Overflow solution for practical implementation. ```Python import json def handler(value): # Custom handler for NaN, Infinity, -Infinity if value == 'NaN': return float('nan') elif value == 'Infinity': return float('inf') elif value == '-Infinity': return float('-inf') return value # Example usage: json_string = '{"value": "NaN"}' data = json.loads(json_string, parse_constant=handler) print(data) ``` -------------------------------- ### Add Release Cycle Chart to Python Docs Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2022-12.md This snippet details the process of adding a release cycle chart to the Python documentation. It includes merged PRs for CSV data and charts, a demo link, and follow-up actions for ensuring no JavaScript dependencies and remote hosting of Mermaid.js. ```Python Followup: @CAM-Gerlach opened devguide issues for adding the additional development phase transition dates [python/devguide#998](https://github.com/python/devguide/issues/998) & a table of individual minor versions [python/devguide#999](https://github.com/python/devguide/issues/999) Followup: Hugo will check with it no JavaScript, and the remote hosting of `https://unpkg.com/mermaid/dist/mermaid.min.js` in case it goes down -> No JS PR: [python/devguide#997](https://github.com/python/devguide/pull/997) ``` -------------------------------- ### Python Concurrency HOWTO Update Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2025-08.md References a Pull Request for updating the Python Concurrency HOWTO documentation, indicating ongoing development and improvements to this resource. ```Python # Example of a concurrency primitive (conceptual) import threading def worker(): print("Worker thread started") thread = threading.Thread(target=worker) thread.start() thread.join() print("Worker thread finished") ``` -------------------------------- ### Syncing Changelog/What's New Between Versions Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-01.md This snippet discusses the manual syncing of changelog and What's New entries between Python versions. It also suggests noting Git commands in the Release Manager checklist (PEP 101) for potential future automation. ```Python # CAM will sync things manually for now, we might want some automation in the future # Would be good to note the Git commands in the RM checklist (PEP 101) ``` -------------------------------- ### Sphinx Documentation for Code Elements Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-01.md Highlights Sphinx's capabilities for documenting code elements like arguments, return values, and raised exceptions using specific directives. This allows for structured and detailed API documentation. ```Python In addition to arguments, there are also return values and raised exceptions that [can be documented using specific Sphinx *options*](https://www.sphinx-doc.org/en/master/tutorial/describing-code.html#id5). ``` -------------------------------- ### Python Availability Directives Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2025-02.md Discusses the formatting of availability directives in Python documentation, specifically whether to use symbols like '≥' or phrases like 'version X or later' for version comparisons. This impacts how version requirements are displayed to users. ```text .. availability:: Linux >= 2.6.27 with glibc >= 2.8 ``` -------------------------------- ### Python Devguide Release Cycle Chart SVG Generation Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-02.md This snippet relates to the generation of a release cycle chart for the Python devguide, which was implemented as an SVG. It was part of a pull request to the python/devguide repository. ```Python # No specific code provided, but the context is about generating an SVG for the devguide release cycle chart. # Related PR: https://github.com/python/devguide/pull/1034 ``` -------------------------------- ### SQLite Connect Function Signature Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2024-01.md Demonstrates the use of argument lists in documentation, as seen in the sqlite3.connect function. This approach aims to provide a structured view of function parameters. ```Python sqlite3.connect(database, *, detect_types=0, isolation_level=None, check_same_thread=True, factory=sqlite3.Connection, timeout=5, cached_statements=100, uri=False, **kwargs) ``` -------------------------------- ### Python Docsbuild Scripts PR for Dark Theme Deployment Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-08.md This snippet references a pull request in the python/docsbuild-scripts repository related to the deployment of a dark theme. Merging this PR or pinning the theme in requirements.txt is necessary for deployment. ```Python https://github.com/python/docsbuild-scripts/pull/161 ``` -------------------------------- ### Sphinx Documentation Improvements Source: https://github.com/python/docs-community/blob/main/docs/monthly-meeting/2023-10.md Details on enhancements made to Sphinx's documentation, including new pages for Domains, improved make-mode documentation, and a quick reference for builders. ```text https://www.sphinx-doc.org/en/master/usage/domains/ ``` ```text https://www.sphinx-doc.org/en/master/man/sphinx-build.html#options ``` ```text https://www.sphinx-doc.org/en/master/usage/builders/index.html ```