ada-url 1.19.0__cp313-cp313-macosx_11_0_arm64.whl → 1.28.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
 
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,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: ada-url
3
- Version: 1.19.0
3
+ Version: 1.28.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
6
  License: Apache 2.0
@@ -10,17 +10,15 @@ Project-URL: Repository, https://github.com/ada-url/ada-python
10
10
  Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3 :: Only
13
- Requires-Python: >=3.9
13
+ Requires-Python: >=3.10
14
14
  Description-Content-Type: text/x-rst
15
15
  License-File: LICENSE
16
16
  Requires-Dist: cffi
17
+ Dynamic: license-file
17
18
 
18
19
  ada-url
19
20
  ========
20
21
 
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
22
  This is ``ada_url``, a fast standard-compliant Python library for working with URLs based on the ``Ada`` URL
25
23
  parser.
26
24
 
@@ -44,7 +42,7 @@ Parsing URLs
44
42
  ^^^^^^^^^^^^
45
43
 
46
44
  The ``URL`` class is intended to match the one described in the
47
- `WHATWG URL spec <https://url.spec.whatwg.org/#url-class>`_:.
45
+ `WHATWG URL spec <https://url.spec.whatwg.org/#url-class>`_.
48
46
 
49
47
  .. code-block:: python
50
48
 
@@ -144,7 +142,8 @@ that it properly encodes IDNs and resolves paths:
144
142
  >>> parsed_url.pathname
145
143
  '/path2/'
146
144
 
147
- Contrast that with the Python standard library's ``urlib.parse`` module:
145
+ Contrast that with the Python standard library's ``urllib.parse`` module, which loosely
146
+ follows the older `RFC 3978 <https://datatracker.ietf.org/doc/html/rfc3978>`__ standard:
148
147
 
149
148
  .. code-block:: python
150
149
 
@@ -155,11 +154,13 @@ Contrast that with the Python standard library's ``urlib.parse`` module:
155
154
  >>> parsed_url.path
156
155
  '/./path/../path2/'
157
156
 
158
- Alternative Python bindings
159
- ---------------------------
157
+ Performance
158
+ -----------
160
159
 
161
160
  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.
161
+ the ``Ada`` C library's functions, which makes it faster than the Python standard
162
+ library's ``urllib.parse`` module for most applications.
163
+
164
+ An alternative package, `can_ada <https://github.com/tktech/can_ada>`__, uses
165
+ `pybind11 <https://pybind11.readthedocs.io/en/stable/>`__ to interact with the ``Ada``
166
+ C++ library functions, which is even faster.
@@ -0,0 +1,14 @@
1
+ docs/conf.py,sha256=cn270pOmLLUH2msNwTcHCa1uo1un0qR1_pz8WSuoRi8,636
2
+ ada_url/_ada_wrapper.abi3.so,sha256=mVM9OMDLvMPXQr4HJPJTlp4nUcCCuqAVJUB3zeBo4e4,685944
3
+ ada_url/ada_c.h,sha256=zfezAA0lMCoKPEhrrbr38gghdfShTrCY_sRWUj3XV4k,7561
4
+ ada_url/__init__.py,sha256=spKYm9if-a8MLSbi5BuqiGerwUOBangUbev4XG3jEGA,563
5
+ ada_url/ada.h,sha256=KmcgXxslj1LYWIUp8AcqceoWQuvPR9CA0XS5_M17f5Y,412098
6
+ ada_url/ada_build.py,sha256=jpg4zcFSkprqDlE4c6Vvo0zB0IGTCeaNs5NAO2nT7KE,925
7
+ ada_url/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ ada_url/ada_adapter.py,sha256=37WOSXf1b67xCIKvdhFOEXVC_59R1ExRwpbUg3XyQRw,21594
9
+ ada_url/ada.cpp,sha256=a3DdGapMWWsbbmtJ3hv2TtAaz4pAftHJAInFpHp0-Vg,975167
10
+ ada_url-1.28.0.dist-info/RECORD,,
11
+ ada_url-1.28.0.dist-info/WHEEL,sha256=KreXLeNnYSLDPpk7qnNyKd0DQEhtY-je-mdlEpkBMmo,109
12
+ ada_url-1.28.0.dist-info/top_level.txt,sha256=8YlQkS2I0hQyH611C1dxEv7gVFgeljn-aQcwaQL8qcY,49
13
+ ada_url-1.28.0.dist-info/METADATA,sha256=XGRp2qcxPwUjdLU7pSfK7Mump1yCPr9AW6ZW4OJTxk0,4825
14
+ ada_url-1.28.0.dist-info/licenses/LICENSE,sha256=9D0P_RQ1VlnPOXk6EgYFdtrLIXu1d2jtwnDnMS67qEQ,1060
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.1)
2
+ Generator: setuptools (80.9.0)
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