Skip to content

Commit edd08e8

Browse files
authored
Prepare to release v0.4.3 (#129)
Clean up release notes and make some minor docs tweaks before releasing v0.4.3.
1 parent 2d7f999 commit edd08e8

File tree

2 files changed

+28
-18
lines changed

2 files changed

+28
-18
lines changed

docs/source/release-history.rst

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,32 @@
22
Release History
33
===============
44

5-
In Development
6-
--------------
7-
8-
Breaking Changes
9-
^^^^^^^^^^^^^^^^
5+
v0.4.3 (2023-09-26)
6+
-------------------
107

11-
N/A
8+
This is mainly a compatibility releae: it adds support for urllib3 v2.x and the next upcoming major release of Python, v3.12.0. It also adds support for multiple filters in :meth:`wayback.WaybackClient.search`. There are no breaking changes.
129

1310

1411
Features
1512
^^^^^^^^
1613

17-
- You can now apply multiple filters to a search by using a list or tuple for the ``filter_field`` parameter of :meth:`wayback.WaybackClient.search`. (:issue:`119`)
14+
You can now apply multiple filters to a search by using a list or tuple for the ``filter_field`` parameter of :meth:`wayback.WaybackClient.search`. (:issue:`119`)
1815

19-
For example, to search for all captures at ``nasa.gov`` with a 404 status and “feature” somewhere in the URL:
16+
For example, to search for all captures at ``nasa.gov`` with a 404 status and “feature” somewhere in the URL:
2017

21-
.. code-block:: python
18+
.. code-block:: python
2219
23-
client.search('nasa.gov/',
24-
match_type='prefix',
25-
filter_field=['statuscode:404',
26-
'urlkey:.*feature.*'])
20+
client.search('nasa.gov/',
21+
match_type='prefix',
22+
filter_field=['statuscode:404',
23+
'urlkey:.*feature.*'])
2724
2825
2926
Fixes & Maintenance
3027
^^^^^^^^^^^^^^^^^^^
3128

3229
- Add support for Python 3.12.0. (:issue:`123`)
33-
- Add support for urllib3 v2.x. (:issue:`116`)
30+
- Add support for urllib3 v2.x (urllib3 v1.20+ also still works). (:issue:`116`)
3431

3532

3633
v0.4.3a1 (2023-09-22)

wayback/_client.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,23 @@ def search(self, url, *, match_type=None, limit=1000, offset=None,
605605
assumed to be in UTC.
606606
filter_field : str or list of str or tuple of str, optional
607607
A filter or list of filters for any field in the results. Equivalent
608-
to the ``filter`` argument in the CDX API. To apply multiple
609-
filters, use a list of strings instead of a single string. Format:
610-
``[!]field:regex``, e.g. ``'!statuscode:200'`` to select only
611-
captures with a non-200 status code.
608+
to the ``filter`` argument in the CDX HTTP API. Format:
609+
``[!]field:regex`` or ``~[!]field:substring``, e.g.
610+
``'!statuscode:200'`` to select only captures with a non-2xx status
611+
code, or ``'~urlkey:feature'`` to select only captures where the
612+
SURT-formatted URL key has "feature" somewhere in it.
613+
614+
To apply multiple filters, use a list or tuple of strings instead of
615+
a single string, e.g. ``['statuscode:200', 'urlkey:.*feature.*']``.
616+
617+
Regexes are matched against the *entire* field value. For example,
618+
``'statuscode:2'`` will never match, because all ``statuscode``
619+
values are three characters. Instead, to match all status codes with
620+
a "2" in them, use ``'statuscode:.*2.*'``. Add a ``!`` at before the
621+
field name to negate the match.
622+
623+
Valid field names are: ``urlkey``, ``timestamp``, ``original``,
624+
``mimetype``, ``statuscode``, ``digest``, ``length``.
612625
collapse : str, optional
613626
Collapse consecutive results that match on a given field. (format:
614627
`fieldname` or `fieldname:N` -- N is the number of chars to match.)

0 commit comments

Comments
 (0)