Skip to content

Commit 7c6c82d

Browse files
authored
Merge branch 'main' into uv
2 parents 1a7d4f6 + 08fbcf7 commit 7c6c82d

22 files changed

+9369
-3784
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "pip"
4+
directory: "/requirements"
5+
schedule:
6+
interval: "monthly"
7+
- package-ecosystem: "pip"
8+
directory: "/docs"
9+
schedule:
10+
interval: "monthly"

.github/workflows/build.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,50 +16,67 @@ on:
1616
types:
1717
- published
1818

19+
env:
20+
PIP_BREAK_SYSTEM_PACKAGES: 1
21+
1922
concurrency:
2023
group: ${{ github.workflow }}-${{ github.ref }}
2124
cancel-in-progress: true
2225

2326
jobs:
2427
build_wheels:
2528
strategy:
29+
fail-fast: false
2630
matrix:
2731
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
2832

2933
runs-on: ${{ matrix.os }}
3034
steps:
31-
- uses: actions/checkout@v3
35+
- uses: actions/checkout@v4
3236
- run: make ci_requirements
3337
- name: Set up QEMU # Needed to build aarch64 wheels
3438
if: runner.os == 'Linux'
35-
uses: docker/setup-qemu-action@v2
39+
uses: docker/setup-qemu-action@v3
3640
with:
3741
platforms: all
38-
- uses: pypa/cibuildwheel@v2.16.5
39-
- uses: actions/upload-artifact@v3
42+
- uses: pypa/cibuildwheel@v2.22.0
43+
- uses: actions/upload-artifact@v4
4044
with:
45+
name: artifact-wheel-${{ matrix.os }}
4146
path: wheelhouse/*.whl
4247

4348
make_sdist:
4449
runs-on: "ubuntu-latest"
4550
steps:
46-
- uses: actions/checkout@v3
51+
- uses: actions/checkout@v4
4752
- run: |
4853
make ci_requirements
4954
python -m build --no-isolation --sdist
50-
- uses: actions/upload-artifact@v3
55+
- uses: actions/upload-artifact@v4
5156
with:
57+
name: artifact-sdist
5258
path: dist/*.tar.gz
5359

54-
upload_all:
60+
merge:
61+
runs-on: ubuntu-latest
5562
needs: [build_wheels, make_sdist]
63+
steps:
64+
- name: Merge Artifacts
65+
uses: actions/upload-artifact/merge@v4
66+
with:
67+
name: artifact
68+
pattern: artifact-*
69+
delete-merged: true
70+
71+
upload_all:
72+
needs: merge
5673
runs-on: "ubuntu-latest"
5774
environment: release
5875
if: github.event_name == 'release' && github.event.action == 'published'
5976
permissions:
6077
id-token: write
6178
steps:
62-
- uses: actions/download-artifact@v3
79+
- uses: actions/download-artifact@v4
6380
with:
6481
name: artifact
6582
path: dist

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121
lint:
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
- name: Set up Python
26-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2727
with:
28-
python-version: "3.8"
28+
python-version: "3.9"
2929
- name: Install dependencies
3030
run: |
3131
make requirements

.github/workflows/unit-tests.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,26 @@ on:
1616
concurrency:
1717
group: ${{ github.workflow }}-${{ github.ref }}
1818
cancel-in-progress: true
19+
20+
21+
env:
22+
MACOSX_DEPLOYMENT_TARGET: "10.15"
1923

2024
jobs:
2125
build_test:
2226
strategy:
27+
fail-fast: false
2328
matrix:
24-
os: ["ubuntu-20.04", "macos-11"]
29+
os: ["ubuntu-latest", "macos-latest"]
2530

2631
runs-on: ${{ matrix.os }}
2732

2833
steps:
29-
- uses: actions/checkout@v3
30-
- name: Set up Python 3.8
31-
uses: actions/setup-python@v4
34+
- uses: actions/checkout@v4
35+
- name: Set up Python 3.9
36+
uses: actions/setup-python@v5
3237
with:
33-
python-version: "3.8"
38+
python-version: "3.9"
3439
- name: Install dependencies
3540
run: |
3641
make requirements

MANIFEST.in

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include ada_url/*.c
2+
include ada_url/*.cpp
3+
include ada_url/*.h
4+
exclude ada_url/*.o
5+
exclude ada_url/_ada_wrapper.*

Makefile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@ ci_requirements:
66
.PHONY: requirements
77
requirements:
88
python3 -m pip install uv
9-
python3 -m uv pip install -r requirements/development.txt
9+
python -m uv pip install -U -r requirements/development.txt ${req_args}
1010

1111
.PHONY: check
1212
check:
13-
black --check .
14-
ruff .
13+
ruff check .
1514

1615
.PHONY: format
1716
format:
18-
black .
17+
ruff format .
1918

2019
.PHONY: coverage
2120
coverage:
@@ -38,11 +37,7 @@ clean:
3837
$(RM) ada_url/_ada_wrapper.abi3.so
3938
$(RM) ada_url/ada.o
4039

41-
.PHONY: c_lib
42-
c_lib:
43-
$(CXX) -c "ada_url/ada.cpp" -fPIC -std="c++17" -O2 -o "ada_url/ada.o" $(ARCHFLAGS)
44-
4540
.PHONY: package
46-
package: c_lib
41+
package:
4742
python -m build --no-isolation
4843
twine check dist/*

README.rst

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
ada-url
22
========
33

4-
This is ``ada_url``, a Python library for working with URLs based on the ``Ada`` URL
4+
The `urlib.parse` module in Python does not follow the legacy RFC 3978 standard nor
5+
does it follow the newer WHATWG URL specification. It is also relatively slow.
6+
7+
This is ``ada_url``, a fast standard-compliant Python library for working with URLs based on the ``Ada`` URL
58
parser.
69

710
* `Documentation <https://ada-url.readthedocs.io>`__
@@ -134,3 +137,12 @@ Contrast that with the Python standard library's ``urlib.parse`` module:
134137
'www.googlé.com'
135138
>>> parsed_url.path
136139
'/./path/../path2/'
140+
141+
Alternative Python bindings
142+
---------------------------
143+
144+
This package uses `CFFI <https://github.com/ada-url/ada-python/>`__ to call
145+
the ``Ada`` library's functions, which has a performance cost.
146+
The alternative `can_ada <https://github.com/tktech/can_ada>`__ (Canadian Ada)
147+
package uses `pybind11 <https://pybind11.readthedocs.io/en/stable/>`__ to generate a
148+
Python extension module, which is more performant.

0 commit comments

Comments
 (0)