ada-url 1.19.0__cp313-cp313-macosx_11_0_arm64.whl → 1.29.0__cp313-cp313-macosx_11_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ada_url/ada_adapter.py CHANGED
@@ -743,7 +743,7 @@ class idna:
743
743
  return _get_str(data)
744
744
 
745
745
  @staticmethod
746
- def encode(s: Union[str, bytes]) -> str:
746
+ def encode(s: Union[str, bytes]) -> bytes:
747
747
  if isinstance(s, str):
748
748
  s = s.encode()
749
749
 
@@ -754,3 +754,6 @@ class idna:
754
754
  idna_to_unicode = idna.decode
755
755
 
756
756
  idna_to_ascii = idna.encode
757
+
758
+ def get_version():
759
+ return ffi.string(lib.ada_get_version()).decode()
ada_url/ada_build.py CHANGED
@@ -9,6 +9,7 @@ compile_args = ['/std:c++20'] if platform == 'win32' else ['-std=c++20']
9
9
 
10
10
  ada_obj = Extension(
11
11
  'ada',
12
+ define_macros=[('ADA_INCLUDE_URL_PATTERN', '0')],
12
13
  language="c++",
13
14
  sources=['ada_url/ada.cpp'],
14
15
  include_dirs=[file_dir],
ada_url/ada_c.h CHANGED
@@ -184,4 +184,14 @@ ada_string_pair ada_search_params_entries_iter_next(
184
184
  bool ada_search_params_entries_iter_has_next(
185
185
  ada_url_search_params_entries_iter result);
186
186
 
187
+ // Definitions for Ada's version number.
188
+ typedef struct {
189
+ int major;
190
+ int minor;
191
+ int revision;
192
+ } ada_version_components;
193
+
194
+ const char* ada_get_version();
195
+ ada_version_components ada_get_version_components();
196
+
187
197
  #endif // ADA_C_H
@@ -1,26 +1,23 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: ada-url
3
- Version: 1.19.0
3
+ Version: 1.29.0
4
4
  Summary: URL parser and manipulator based on the WHAT WG URL standard
5
5
  Author-email: Bo Bayles <bo@bbayles.com>
6
- License: Apache 2.0
6
+ License-Expression: Apache-2.0
7
7
  Project-URL: Homepage, https://www.ada-url.com/
8
8
  Project-URL: Documentation, https://ada-url.readthedocs.io
9
9
  Project-URL: Repository, https://github.com/ada-url/ada-python
10
- Classifier: License :: OSI Approved :: Apache Software License
11
10
  Classifier: Programming Language :: Python :: 3
12
11
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Requires-Python: >=3.9
12
+ Requires-Python: >=3.10
14
13
  Description-Content-Type: text/x-rst
15
14
  License-File: LICENSE
16
15
  Requires-Dist: cffi
16
+ Dynamic: license-file
17
17
 
18
18
  ada-url
19
19
  ========
20
20
 
21
- The `urlib.parse` module in Python does not follow the legacy RFC 3978 standard nor
22
- does it follow the newer WHATWG URL specification. It is also relatively slow.
23
-
24
21
  This is ``ada_url``, a fast standard-compliant Python library for working with URLs based on the ``Ada`` URL
25
22
  parser.
26
23
 
@@ -44,7 +41,7 @@ Parsing URLs
44
41
  ^^^^^^^^^^^^
45
42
 
46
43
  The ``URL`` class is intended to match the one described in the
47
- `WHATWG URL spec <https://url.spec.whatwg.org/#url-class>`_:.
44
+ `WHATWG URL spec <https://url.spec.whatwg.org/#url-class>`_.
48
45
 
49
46
  .. code-block:: python
50
47
 
@@ -144,7 +141,8 @@ that it properly encodes IDNs and resolves paths:
144
141
  >>> parsed_url.pathname
145
142
  '/path2/'
146
143
 
147
- Contrast that with the Python standard library's ``urlib.parse`` module:
144
+ Contrast that with the Python standard library's ``urllib.parse`` module, which loosely
145
+ follows the older `RFC 3978 <https://datatracker.ietf.org/doc/html/rfc3978>`__ standard:
148
146
 
149
147
  .. code-block:: python
150
148
 
@@ -155,11 +153,13 @@ Contrast that with the Python standard library's ``urlib.parse`` module:
155
153
  >>> parsed_url.path
156
154
  '/./path/../path2/'
157
155
 
158
- Alternative Python bindings
159
- ---------------------------
156
+ Performance
157
+ -----------
160
158
 
161
159
  This package uses `CFFI <https://github.com/ada-url/ada-python/>`__ to call
162
- the ``Ada`` library's functions, which has a performance cost.
163
- The alternative `can_ada <https://github.com/tktech/can_ada>`__ (Canadian Ada)
164
- package uses `pybind11 <https://pybind11.readthedocs.io/en/stable/>`__ to generate a
165
- Python extension module, which is more performant.
160
+ the ``Ada`` C library's functions, which makes it faster than the Python standard
161
+ library's ``urllib.parse`` module for most applications.
162
+
163
+ An alternative package, `can_ada <https://github.com/tktech/can_ada>`__, uses
164
+ `pybind11 <https://pybind11.readthedocs.io/en/stable/>`__ to interact with the ``Ada``
165
+ C++ library functions, which is even faster.
@@ -0,0 +1,14 @@
1
+ ada_url-1.29.0.dist-info/RECORD,,
2
+ ada_url-1.29.0.dist-info/WHEEL,sha256=EcDbH569qIgw_MYxb6pwJQQ_P4bsG7DHk3YpehBqaHk,110
3
+ ada_url-1.29.0.dist-info/top_level.txt,sha256=8YlQkS2I0hQyH611C1dxEv7gVFgeljn-aQcwaQL8qcY,49
4
+ ada_url-1.29.0.dist-info/METADATA,sha256=-TJFW_Rzld-0PiQtI2Sd6LpDATNKA8iBlx0eaN4HyLs,4773
5
+ ada_url-1.29.0.dist-info/licenses/LICENSE,sha256=9D0P_RQ1VlnPOXk6EgYFdtrLIXu1d2jtwnDnMS67qEQ,1060
6
+ docs/conf.py,sha256=cn270pOmLLUH2msNwTcHCa1uo1un0qR1_pz8WSuoRi8,636
7
+ ada_url/_ada_wrapper.abi3.so,sha256=FRH5VZ9ssF1m3k351F39y2cBKh1yYm9v9OLoNG5FKQE,685368
8
+ ada_url/ada_c.h,sha256=zfezAA0lMCoKPEhrrbr38gghdfShTrCY_sRWUj3XV4k,7561
9
+ ada_url/__init__.py,sha256=TNvshOzbbgNsTAXd1cR6E03ht2JT_mTHY3lmyYnAnl0,599
10
+ ada_url/ada.h,sha256=5iy7v4vnZqUb_bCqh3qERBk4vgIGa6AOrq_eSRGoWz0,411661
11
+ ada_url/ada_build.py,sha256=jpg4zcFSkprqDlE4c6Vvo0zB0IGTCeaNs5NAO2nT7KE,925
12
+ ada_url/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ ada_url/ada_adapter.py,sha256=zkWq5HPzbEoy7xTCIoQVIAg0ehXxwiAKt4-mSfw9e24,21668
14
+ ada_url/ada.cpp,sha256=Jfmht15hRakfm2p3530Asu-3Y_2vQoZapsxsqbWhpik,976668
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.1)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp313-cp313-macosx_11_0_arm64
5
5
 
@@ -1,14 +0,0 @@
1
- docs/conf.py,sha256=cn270pOmLLUH2msNwTcHCa1uo1un0qR1_pz8WSuoRi8,636
2
- ada_url-1.19.0.dist-info/RECORD,,
3
- ada_url-1.19.0.dist-info/LICENSE,sha256=9D0P_RQ1VlnPOXk6EgYFdtrLIXu1d2jtwnDnMS67qEQ,1060
4
- ada_url-1.19.0.dist-info/WHEEL,sha256=8vhi9qEIW9KcLGAGpqOVXdnT_ofydMx5BjiGmJYHOAE,109
5
- ada_url-1.19.0.dist-info/top_level.txt,sha256=8YlQkS2I0hQyH611C1dxEv7gVFgeljn-aQcwaQL8qcY,49
6
- ada_url-1.19.0.dist-info/METADATA,sha256=a0r_J-WCl1dfB_Yj2qiSTx-HPunP33rJ6Vi3nUEG20o,4823
7
- ada_url/_ada_wrapper.abi3.so,sha256=BN5-IeRQoLdTp5cbIXeNw4PgEknGhdNGc6pGeV1NqOU,715384
8
- ada_url/ada_c.h,sha256=lkVK8vQs1woICCDOp_S9aw2_Y4Y7THRiTFBrkCYKnFI,7349
9
- ada_url/__init__.py,sha256=spKYm9if-a8MLSbi5BuqiGerwUOBangUbev4XG3jEGA,563
10
- ada_url/ada.h,sha256=59RJ2nRvTcio-9K6kkk32GmfTB_KLUng9BiO0hjcTX4,383592
11
- ada_url/ada_build.py,sha256=TeKl_0pJDjjtOJe7p5gxuNA1w-GVCRxanzBsf2ysxkE,871
12
- ada_url/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- ada_url/ada_adapter.py,sha256=27hiXpbI5rRSbzMvcKBmF_Ifps-IYEG5Qt5cAIhKbIo,21592
14
- ada_url/ada.cpp,sha256=dE1aP-5q0zQFhZmqyKigCuaRdisTe_SMTzg_0fncepE,947536