pax_global_header 0000666 0000000 0000000 00000000064 15244322466 0014522 g ustar 00root root 0000000 0000000 52 comment=65b67269dceb0b6758f865b1f1476b0c463e934a python-readme-renderer-46.0/ 0000775 0000000 0000000 00000000000 15244322466 0016033 5 ustar 00root root 0000000 0000000 python-readme-renderer-46.0/.devcontainer/ 0000775 0000000 0000000 00000000000 15244322466 0020572 5 ustar 00root root 0000000 0000000 python-readme-renderer-46.0/.devcontainer/Dockerfile 0000664 0000000 0000000 00000003254 15244322466 0022570 0 ustar 00root root 0000000 0000000 FROM ghcr.io/astral-sh/uv:trixie-slim # uv writes to UV_PYTHON_INSTALL_DIR/.temp and UV_CACHE_DIR during install # operations, and the runtime user has to be able to write there too. We # can't chown to a fixed UID — devcontainer's `updateRemoteUserUID` remaps # vscode to the host user's UID at start — so the parent dirs get sticky-bit # world-write, the UID-agnostic version of /tmp. # # /opt locations are chosen because: # - UV_TOOL_DIR: the uv image defaults to /root/.local/share/uv/tools, # which is unreadable to non-root users (/root is mode 700). # - UV_CACHE_DIR: lives somewhere devcontainer.json can persist via a # named Docker volume across rebuilds. ENV UV_PYTHON_INSTALL_DIR=/opt/python \ UV_TOOL_DIR=/opt/uv/tools \ UV_CACHE_DIR=/opt/uv/cache # Pre-install the CPython interpreters the tox matrix uses, plus tox # itself (with tox-uv for fast env creation). --default makes 3.14 the # system `python` / `python3`. # # PyPy is intentionally omitted: nh3's Rust extension has no prebuilt # PyPy wheel for aarch64 and source builds fail. CI still tests PyPy # on x86_64 where wheels exist. ARG PYTHON_VERSIONS="3.10 3.11 3.12 3.13 3.14" RUN uv python install --default 3.14 \ && uv python install ${PYTHON_VERSIONS} \ && uv tool install tox --with tox-uv \ # The build populated /opt/python/.temp and /opt/uv/cache as root. # Clear both: uv recreates .temp at runtime under the new perms, and # an empty cache lets the named volume initialize cleanly on first # mount (otherwise root-owned wheels get copied into it). && rm -rf /opt/python/.temp /opt/uv/cache \ && mkdir -p /opt/uv/cache \ && chmod 1777 /opt/python /opt/uv/cache python-readme-renderer-46.0/.devcontainer/devcontainer-lock.json 0000664 0000000 0000000 00000000525 15244322466 0025076 0 ustar 00root root 0000000 0000000 { "features": { "ghcr.io/devcontainers/features/common-utils:2": { "version": "2.5.9", "resolved": "ghcr.io/devcontainers/features/common-utils@sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a", "integrity": "sha256:cb0c4d3c276f157eed17935747e364178d75fee17f55c4e129966f64633deb3a" } } } python-readme-renderer-46.0/.devcontainer/devcontainer.json 0000664 0000000 0000000 00000002312 15244322466 0024144 0 ustar 00root root 0000000 0000000 { "name": "readme_renderer", "build": { "dockerfile": "Dockerfile" }, "features": { "ghcr.io/devcontainers/features/common-utils:2": {} }, "mounts": [ "source=readme-renderer-uv-cache,target=/opt/uv/cache,type=volume" ], "remoteEnv": { "PATH": "/home/vscode/.local/bin:${containerEnv:PATH}" }, "remoteUser": "vscode", "postCreateCommand": "bash .devcontainer/post-create.sh", "customizations": { "vscode": { "extensions": [ "EditorConfig.EditorConfig", "ms-python.python", "ms-python.mypy-type-checker", "tamasfe.even-better-toml" ], "settings": { "python.defaultInterpreterPath": "${containerWorkspaceFolder}/.venv/bin/python", "python.terminal.activateEnvInCurrentTerminal": true, "python.testing.pytestEnabled": true, "python.testing.unittestEnabled": false, "python.testing.pytestArgs": ["tests"], "python.analysis.typeCheckingMode": "strict", "python.analysis.diagnosticMode": "workspace" } } } } python-readme-renderer-46.0/.devcontainer/post-create.sh 0000664 0000000 0000000 00000000524 15244322466 0023355 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash set -e # Local dev venv for IDE completion, running the package, etc. # tox + tox-uv are pre-installed in the image. uv venv --clear # Mirror tox.ini's [testenv] deps so the IDE's Test Explorer and # `Debug current pytest file` launch config can import pytest. uv pip install -e ".[md]" pytest pytest-cov pytest-icdiff python-readme-renderer-46.0/.github/ 0000775 0000000 0000000 00000000000 15244322466 0017373 5 ustar 00root root 0000000 0000000 python-readme-renderer-46.0/.github/CONTRIBUTING.md 0000664 0000000 0000000 00000002302 15244322466 0021621 0 ustar 00root root 0000000 0000000 # Contributing Thanks for considering a contribution. Bug reports, fixes, and additions are all welcome. ## Development setup ### Devcontainer (recommended) This repo ships a [devcontainer](https://containers.dev/) config in `.devcontainer/`. Open the project in any tool that understands the spec — VS Code's Dev Containers extension, GitHub Codespaces, etc. — and you get a container with [`uv`](https://docs.astral.sh/uv/), `tox` (with `tox-uv`), and CPython 3.10–3.14 already installed. GitHub Codespaces availability depends on your account or org's billing. ### Manual If you'd rather set things up yourself: 1. Fork and clone the repo. 1. Install whichever Python versions you want to test against. 1. Install `tox`. Depending on your platform you may need extra build tools — `nh3` and `comrak` are Rust extensions and normally install from prebuilt wheels, but source builds need a Rust toolchain. ## Running tests `tox -l` lists the available environments. Run one with `tox -e py313` (or whatever), or `tox` alone to run them all. Parallel run across all CPUs: ``` tox -p auto ``` See the [tox parallel mode docs](https://tox.wiki/en/latest/user_guide.html#parallel-mode) for details. python-readme-renderer-46.0/.github/dependabot.yml 0000664 0000000 0000000 00000001313 15244322466 0022221 0 ustar 00root root 0000000 0000000 # To get started with Dependabot version updates, you'll need to specify which # package ecosystems to update and where the package manifests are located. # Please see the documentation for all configuration options: # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates version: 2 updates: - package-ecosystem: github-actions directory: / schedule: interval: "monthly" groups: actions: patterns: - "*" cooldown: default-days: 7 - package-ecosystem: pip directory: / schedule: interval: "monthly" groups: python: patterns: - "*" cooldown: default-days: 7 python-readme-renderer-46.0/.github/workflows/ 0000775 0000000 0000000 00000000000 15244322466 0021430 5 ustar 00root root 0000000 0000000 python-readme-renderer-46.0/.github/workflows/ci.yml 0000664 0000000 0000000 00000004165 15244322466 0022554 0 ustar 00root root 0000000 0000000 name: CI on: push: branches: - main pull_request: permissions: {} jobs: test: name: Test - ${{ matrix.python-version }} runs-on: ubuntu-latest strategy: matrix: python-version: - "pypy-3.11" - "3.10" - "3.11" - "3.12" - "3.13" - "3.14" steps: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: ${{ matrix.python-version }} check-latest: true cache: 'pip' - name: Install dependencies run: python -m pip install tox - name: Run tests run: | python -m tox -e py python -m tox -e noextra lint: name: Lint runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" check-latest: true cache: 'pip' - name: Install dependencies run: python -m pip install tox - name: Run linting run: python -m tox -e pep8 -e ruff - name: Run mypy run: python -m tox -e mypy packaging: name: Packaging runs-on: ubuntu-latest steps: - name: Check out repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Install Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" check-latest: true cache: 'pip' - name: Install dependencies run: python -m pip install tox - name: Test packaging run: python -m tox -e packaging python-readme-renderer-46.0/.github/workflows/release.yml 0000664 0000000 0000000 00000002403 15244322466 0023572 0 ustar 00root root 0000000 0000000 name: Release on: release: types: [published] permissions: {} jobs: build: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false ref: ${{ github.event.release.tag_name }} - name: Set up Python uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 with: python-version: "3.x" check-latest: true - name: Install build dependencies run: pip install -U setuptools wheel build - name: Build run: python -m build . - name: Upload distribution artifacts uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: dist path: dist/ publish: needs: build runs-on: ubuntu-latest permissions: # IMPORTANT: this permission is mandatory for trusted publishing id-token: write steps: - name: Download distribution artifacts uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 with: name: dist path: dist/ - name: Publish uses: pypa/gh-action-pypi-publish@ba38be9e461d3875417946c167d0b5f3d385a247 # v1.14.1 python-readme-renderer-46.0/.github/workflows/zizmor.yml 0000664 0000000 0000000 00000001172 15244322466 0023506 0 ustar 00root root 0000000 0000000 name: GitHub Actions Security Analysis with zizmor 🌈 on: push: branches: ["main"] pull_request: branches: ["**"] permissions: {} jobs: zizmor: name: Run zizmor 🌈 runs-on: ubuntu-latest permissions: security-events: write # Required for upload-sarif (used by zizmor-action) to upload SARIF files. steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: Run zizmor 🌈 uses: zizmorcore/zizmor-action@6fc4b006235f201fdab3722e17240ab420d580e5 # v0.6.1 python-readme-renderer-46.0/.gitignore 0000664 0000000 0000000 00000000300 15244322466 0020014 0 ustar 00root root 0000000 0000000 __pycache__/ _build/ build/ dist/ htmlcov/ .tox/ .venv/ .cache/ .coverage *.egg-info/ *.egg *.eggs *.py[co] .pytest_cache/ .python-version venv/ .venv/ .idea/ .vscode/* !.vscode/launch.json python-readme-renderer-46.0/.vscode/ 0000775 0000000 0000000 00000000000 15244322466 0017374 5 ustar 00root root 0000000 0000000 python-readme-renderer-46.0/.vscode/launch.json 0000664 0000000 0000000 00000001176 15244322466 0021546 0 ustar 00root root 0000000 0000000 { "version": "0.2.0", "configurations": [ { "name": "Render README.rst", "type": "debugpy", "request": "launch", "module": "readme_renderer", "args": ["${workspaceFolder}/README.rst"], "console": "integratedTerminal", "justMyCode": false }, { "name": "Debug current pytest file", "type": "debugpy", "request": "launch", "module": "pytest", "args": ["${file}", "-v"], "console": "integratedTerminal", "justMyCode": false } ] } python-readme-renderer-46.0/CHANGES.rst 0000664 0000000 0000000 00000017737 15244322466 0017654 0 ustar 00root root 0000000 0000000 Changes ======= 46.0 (2026-08-28) ----------------- * Render Markdown GFM alerts as semantic HTML admonitions (#374, #379) * Support GitHub emoji shortcodes in Markdown (#374) * Don't drop reStructuredText's top-level heading, and render headings at their literal levels starting at ``
`` tags (#365) * Advertise support for Python 3.13 (#319), Python 3.14 (#333), pypy 3.11 (#334) * Remove support for Python 3.9, pypy 3.9, 3.10 (#342) * Remove `python3` alias from Pygments (#320) * Fix test suite for Pygments update (#325) * Fix mypy annotations (#328) * Fix test failure with docutils 0.22 (#332) * Fix package metadata (#327), (#337), (#356) * Fix ignored allowlists on ``clean()`` (#368) * Don't abort reStructuredText rendering when a ``:scale:`` image can't be sized (#359) * Disable active input controls in rendered output (#370) * Remove executable bit from tests (#329) * Update Dependabot config (#338, #358), update workflows (#343), prevent dual run (#344) * CI: security updates (#354) * Split apart build and release in CI (#363) * Speed up test execution (#349) * Fix documentation typos and formatting (#352) * Replace Gitpod with devcontainer (#326) * Convert package data config from exclude to include (#364) * Apply ruff/pyupgrade rules (UP) (#330) * Apply ruff (RUF) and tryceratops (TRY) rules (#336) * Run ruff in addition to flake8 during CI (#355) 44.0 (2024-07-08) ----------------- * Drop support for Python 3.8 (#315) * Require docutils 0.21.2 and higher (#315) * Remove HTML5 ```` tag from the list of allowed HTML tags (#315) * Test all supported CPython and PyPy versions in CI (#315) * Resolve Node 16 deprecation warnings in CI (#309) * Lint specific directories (#312) * Build a wheel once for all tox test environments (#308) * Lazy open output files, and always close them (#314) * Gitpod: Migrate to the Even Better TOML extension (#306) * check-manifest: Remove a now-default ``.gitpod.yml`` exclusion (#307) 43.0 (2024-02-26) ----------------- * Allow HTML5 ``picture`` tag through cleaner (#299) * Test against Python 3.12 (#300) 42.0 (2023-09-07) ----------------- * Migrate from ``bleach`` to ``nh3`` (#295) * Migrate from ``setup.py`` to ``pyproject.toml`` 41.0 (2023-08-18) ----------------- * Allow HTML5 ``figcaption`` tag through cleaner (#291) * Test ``README.rst`` from this project (#288) 40.0 (2023-06-16) ----------------- * Add CLI option to render package README. (#271) * Adapt tests to pygments 2.14.0 (#272) * Update release process to use Trusted Publishing (#276) * Replace usage of deprecated ``pkg_resources`` with ``importlib.metadata`` (#281) * Drop support for Python 3.7 (#282), Test against Python 3.11 (#280) 37.3 (2022-10-31) ----------------- * Allow HTML5 ``figure`` tag through cleaner (#265) 37.2 (2022-09-24) ----------------- * Allow HTML5 ``s`` tag through cleaner (#261) 37.1 (2022-09-03) ----------------- * Allow HTML5 ``nav`` tag through cleaner (#259) 37.0 (2022-08-21) ----------------- * Remove command line example from docs (#197) * Multiple pyproject.toml fixes (#251) * Confirm handling multiple inline strong (#252) * Convert RST output to HTML5 (#253) * Add Typing to classifiers (#254) * Development tweaks - coverage reporting, actions updates (#255) * Add test confirming behavior with unknown lexers (#256) 36.0 (2022-08-06) ----------------- * Enable gitpod development (#238) * Allow rst admonitions to render (#242) * Add badges to README (#243) * Update codebase for modern Python (#244) * Fix table cell spans (#245) * Allow ``math`` directive in rst (#246) * Preserve ``lang`` attribute in ``pre`` (#247) 35.0 (2022-04-19) ----------------- * Add py.typed to the built wheel (#228) * Use isolated build for tox (#229) * Fix renderer ignore (#230) * Remove legacy check command and distutils (#233) * Emit a warning when no content is rendered (#231) * Drop support for Python 3.6 (#236) * Update html attribute order in tests (#235) 34.0 (2022-03-11) ----------------- * Add static types (#225) 33.0 (2022-03-05) ----------------- * Support cmarkgfm>=0.8.0 (#224) 33.0 (2022-02-05) ----------------- * Support cmarkgfm>=0.8.0 (#224) * Support Python 3.10 32.0 (2021-12-13) ----------------- * Allow start attribute in ordered lists (#216) * No limit rendering RST one column field names (#219) 31.0 (2021-12-09) ----------------- * Render disabled checkboxes from Markdown (#217) 30.0 (2021-09-30) ----------------- * support cmarkgfm>=0.6.0 (#209) 29.0 (2021-02-22) ----------------- * Support cmarkgfm>=0.5.0 (#180) * Drop support for Python 2 and 3.5 (#188) 28.0 (2020-10-20) ----------------- * Support Python 3.9 27.0 (2020-10-09) ----------------- * Add support for align attribute rendering Markdown headers (#173) 26.0 (2020-04-22) ----------------- * Fix regression with image width/height attributes (#164) 25.0 (2020-03-14) ----------------- * Support Python 3.7 and 3.8 * Drop support for Python 3.4 * Require Pygments>=2.5.1 24.0 (2018-10-27) ----------------- * Remove dependency on ``future``. (#134) 23.0 (2018-10-22) ----------------- * Breaking change: Move the cmarkgfm dependency into an extra (#130). Users that want to render Markdown will need to install readme_render[md] instead. 22.0 (2018-09-17) ----------------- * Unify handling of SVG and other images in RST. (#113) * Support width and alignment of images in RST (#114) 21.0 (2018-05-28) ----------------- * Allow. (#105) * Add specific tests for the raw directive. (#103) * Include docinfo when rendering rst. (#99) * Make Python 3 the default lexer for highlighting Python code in Markdown (#97) * Allow align attribute on