Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

chore: drop Python 3.7 & use uv #398

Merged
merged 5 commits into from
Oct 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -58,32 +58,31 @@ jobs:
3.10
3.11
3.13
pypy3.7
pypy3.8
pypy3.9
pypy3.10
3.12
check-latest: true
allow-prereleases: true
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.7 pypy3.8 pypy3.9 pypy3.10'
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10'
sccache: "true"
manylinux: auto
- uses: actions/upload-artifact@v4
with:
name: wheels-linux-${{ matrix.target }}
path: dist
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: pytest
if: ${{ !startsWith(github.ref, 'refs/tags/') && matrix.target == 'x86_64-unknown-linux-gnu' }}
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install --force-reinstall --find-links ../dist --disable-pip-version-check pyromark
pip install -U --disable-pip-version-check -r ../requirements-tests.txt
pytest
uv sync --no-install-project --frozen
uv pip install --find-links ../dist --no-index pyromark
uv run --no-sync pytest
working-directory: ./tests
windows:
runs-on: windows-latest
@@ -100,7 +99,6 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: |
3.7
3.8
3.9
3.10
@@ -109,26 +107,26 @@ jobs:
3.12
architecture: ${{ matrix.architecture }}
check-latest: true
allow-prereleases: true
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12 3.13'
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13'
sccache: "true"
- uses: actions/upload-artifact@v4
with:
name: wheels-windows-${{ matrix.target }}
path: dist
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: pytest
if: ${{ !startsWith(github.ref, 'refs/tags/') && matrix.target == 'x86_64-pc-windows-msvc' }}
shell: bash
run: |
set -e
python3 -m venv .venv
source .venv/Scripts/activate
pip install --force-reinstall --find-links ../dist --disable-pip-version-check pyromark
pip install -U --disable-pip-version-check -r ../requirements-tests.txt
pytest
uv sync --no-install-project --frozen
uv pip install --find-links ../dist --no-index pyromark
uv run --no-sync pytest
working-directory: ./tests
macos:
runs-on: ${{ matrix.runner }}
@@ -145,42 +143,44 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: |
${{ matrix.target == 'x86_64-apple-darwin' && '3.7' || '' }}
3.8
3.9
3.10
3.11
3.13
${{ matrix.target == 'x86_64-apple-darwin' && 'pypy3.7' || '' }}
pypy3.8
pypy3.9
pypy3.10
3.12
check-latest: true
allow-prereleases: true
- uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist --interpreter '3.7 3.8 3.9 3.10 3.11 3.12 3.13 pypy3.7 pypy3.8 pypy3.9 pypy3.10'
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13 pypy3.8 pypy3.9 pypy3.10'
sccache: "true"
- uses: actions/upload-artifact@v4
with:
name: wheels-macos-${{ matrix.target }}
path: dist
- uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: pytest
if: ${{ !startsWith(github.ref, 'refs/tags/') && matrix.target == 'x86_64-apple-darwin' }}
run: |
set -e
python3 -m venv .venv
source .venv/bin/activate
pip install --force-reinstall --find-links ../dist --disable-pip-version-check pyromark
pip install -U --disable-pip-version-check -r ../requirements-tests.txt
pytest
uv sync --no-install-project --frozen
uv pip install --find-links ../dist --no-index pyromark
uv run --no-sync pytest
working-directory: ./tests
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
check-latest: true
- uses: PyO3/maturin-action@v1
with:
command: sdist
13 changes: 5 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -2,12 +2,9 @@ version: 2
build:
os: ubuntu-lts-latest
tools:
python: "3.12"
rust: latest
python:
install:
- requirements: requirements-docs.txt
- method: pip
path: .
mkdocs:
configuration: mkdocs.yml
commands:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv run --frozen --no-cache --python 3.12 mkdocs build -d $READTHEDOCS_OUTPUT/html
12 changes: 10 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ description = "Blazingly fast Markdown parser"
readme = "README.md"
keywords = ["converter", "html"]
authors = [{ name = "monosans", email = "hsyqixco@protonmail.com" }]
requires-python = ">=3.7"
requires-python = ">=3.8"
classifiers = [
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
@@ -17,7 +17,6 @@ classifiers = [
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
@@ -36,3 +35,12 @@ scripts.pyromark = "pyromark.__main__:main"
[tool.maturin]
python-source = "python"
module-name = "pyromark._pyromark"

[tool.uv]
dev-dependencies = [
"mkdocs-material==9.5.39",
"mkdocs-minify-html-plugin==0.2.3",
"mkdocstrings==0.26.1",
"mkdocstrings-python==1.11.1",
"pytest==8.3.3",
]
4 changes: 0 additions & 4 deletions requirements-docs.txt

This file was deleted.

1 change: 0 additions & 1 deletion requirements-tests.txt

This file was deleted.

986 changes: 986 additions & 0 deletions uv.lock

Large diffs are not rendered by default.