Skip to content

Commit 93482a8

Browse files
authored
Release 6.3.0 (#1109)
- [x] Production test 1 - [x] Production test 2 - [x] test against aiohttp master - [x] test against aiohttp 3.11 - [x] test against yarl master - [x] read over diff and look for anything obvious wrong <img width="547" alt="Screenshot 2025-03-31 at 7 12 28 AM" src="https://github.com/user-attachments/assets/f85bd344-128f-4429-84ca-61fc2f3f166d" /> <img width="536" alt="Screenshot 2025-03-31 at 7 12 35 AM" src="https://github.com/user-attachments/assets/64fc14e4-12ce-4057-a1b1-ebe6231f296e" /> <img width="544" alt="Screenshot 2025-03-31 at 7 12 43 AM" src="https://github.com/user-attachments/assets/caefb711-3e23-400d-af03-2ec7a94a1118" /> <img width="498" alt="Screenshot 2025-03-31 at 7 12 47 AM" src="https://github.com/user-attachments/assets/590de9fa-b1c4-4620-8741-e44c9e7a025c" />
1 parent 5d022e9 commit 93482a8

17 files changed

+169
-84
lines changed

CHANGES.rst

+168
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,174 @@ Changelog
1414

1515
.. towncrier release notes start
1616
17+
6.3.0
18+
=====
19+
20+
*(2025-03-31)*
21+
22+
23+
Bug fixes
24+
---------
25+
26+
- Set operations for ``KeysView`` and ``ItemsView`` of case-insensitive multidicts and their proxies are processed in case-insensitive manner.
27+
28+
*Related issues and pull requests on GitHub:*
29+
:issue:`965`.
30+
31+
- Rewrote :class:`multidict.CIMultiDict` and it proxy to always return
32+
:class:`multidict.istr` keys. ``istr`` is derived from :class:`str`,
33+
thus the change is backward compatible.
34+
35+
The performance boost is about 15% for some operations for C Extension,
36+
pure Python implementation have got a visible (15% - 230%) speedup as well.
37+
38+
*Related issues and pull requests on GitHub:*
39+
:issue:`1097`.
40+
41+
- Fixed a crash when extending a multidict from multidict proxy if C Extensions were used.
42+
43+
*Related issues and pull requests on GitHub:*
44+
:issue:`1100`.
45+
46+
47+
Features
48+
--------
49+
50+
- Implemented a custom parser for ``METH_FASTCALL | METH_KEYWORDS`` protocol
51+
-- by :user:`asvetlov`.
52+
53+
The patch re-enables fast call protocol in the :py:mod:`multidict` C Extension.
54+
55+
Speedup is about 25%-30% for the library benchmarks for Python 3.12+.
56+
57+
*Related issues and pull requests on GitHub:*
58+
:issue:`1070`.
59+
60+
- The C-extension no longer pre-allocates a Python exception object in
61+
lookup-related methods of :py:class:`~multidict.MultiDict` when the
62+
passed-in *key* is not found but *default* value is provided.
63+
64+
Namely, this affects :py:meth:`MultiDict.getone()
65+
<multidict.MultiDict.getone>`, :py:meth:`MultiDict.getall()
66+
<multidict.MultiDict.getall>`, :py:meth:`MultiDict.get()
67+
<multidict.MultiDict.get>`, :py:meth:`MultiDict.pop()
68+
<multidict.MultiDict.pop>`, :py:meth:`MultiDict.popone()
69+
<multidict.MultiDict.popone>`, and :py:meth:`MultiDict.popall()
70+
<multidict.MultiDict.popall>`.
71+
72+
Additionally, the :py:class:`~multidict.MultiDict` comparison with
73+
regular :py:class:`dict`\ ionaries is now about 60% faster
74+
on Python 3.13+ in the fallback-to-default case.
75+
76+
*Related issues and pull requests on GitHub:*
77+
:issue:`1078`.
78+
79+
- Implemented ``__repr__()`` for C Extension classes in C.
80+
81+
The speedup is about 2.5 times.
82+
83+
*Related issues and pull requests on GitHub:*
84+
:issue:`1081`.
85+
86+
- Made C version of :class:`multidict.istr` pickleable.
87+
88+
*Related issues and pull requests on GitHub:*
89+
:issue:`1098`.
90+
91+
- Optimized multidict creation and extending / updating if C Extensions are used.
92+
93+
The speedup is between 25% and 70% depending on the usage scenario.
94+
95+
*Related issues and pull requests on GitHub:*
96+
:issue:`1101`.
97+
98+
- :meth:`multidict.MultiDict.popitem` is changed to remove
99+
the latest entry instead of the first.
100+
101+
It gives O(1) amortized complexity.
102+
103+
The standard :meth:`dict.popitem` removes the last entry also.
104+
105+
*Related issues and pull requests on GitHub:*
106+
:issue:`1105`.
107+
108+
109+
Contributor-facing changes
110+
--------------------------
111+
112+
- Started running benchmarks for the pure Python implementation in addition to the C implementation -- by :user:`bdraco`.
113+
114+
*Related issues and pull requests on GitHub:*
115+
:issue:`1092`.
116+
117+
- The the project-wide Codecov_ metric is no longer reported
118+
via GitHub Checks API. The combined value is not very useful
119+
because one of the sources (MyPy) cannot reach 100% with the
120+
current state of the ecosystem. We may want to reconsider in
121+
the future. Instead, we now have two separate
122+
“runtime coverage” metrics for library code and tests.
123+
They are to be kept at 100% at all times.
124+
And the “type coverage” metric will remain advisory, at a
125+
lower threshold.
126+
127+
The default patch metric check is renamed to “runtime”
128+
to better reflect its semantics. This one will also require
129+
100% coverage.
130+
Another “typing” patch coverage metric is now reported
131+
alongside it. It's considered advisory, just like its
132+
project counterpart.
133+
134+
When looking at Codecov_, one will likely want to look at
135+
MyPy and pytest flags separately. It is usually best to
136+
avoid looking at the PR pages that sometimes display
137+
combined coverage incorrectly.
138+
139+
The change additionally disables the deprecated GitHub
140+
Annotations integration in Codecov_.
141+
142+
Finally, the badge coloring range now starts at 100%.
143+
144+
145+
.. image:: https://codecov.io/gh/aio-libs/multidict/branch/master/graph/badge.svg?flag=pytest
146+
:target: https://codecov.io/gh/aio-libs/multidict?flags[]=pytest
147+
:alt: Coverage metrics
148+
149+
150+
-- by :user:`webknjaz`
151+
152+
*Related issues and pull requests on GitHub:*
153+
:issue:`1093`.
154+
155+
156+
Miscellaneous internal changes
157+
------------------------------
158+
159+
- Synchronized :file:`pythoncapi_compat.h` with the latest available version.
160+
161+
*Related issues and pull requests on GitHub:*
162+
:issue:`1063`.
163+
164+
- Moved registering ABCs for C Extension classes from C to Python.
165+
166+
*Related issues and pull requests on GitHub:*
167+
:issue:`1083`.
168+
169+
- Refactored the internal ``pair_list`` implementation.
170+
171+
*Related issues and pull requests on GitHub:*
172+
:issue:`1084`.
173+
174+
- Implemented views comparison and disjoints in C instead of Python helpers.
175+
176+
The performance boost is about 40%.
177+
178+
*Related issues and pull requests on GitHub:*
179+
:issue:`1096`.
180+
181+
182+
----
183+
184+
17185
6.2.0
18186
======
19187

CHANGES/1063.misc

-1
This file was deleted.

CHANGES/1070.feature

-6
This file was deleted.

CHANGES/1078.feature

-15
This file was deleted.

CHANGES/1081.feature

-3
This file was deleted.

CHANGES/1083.misc

-1
This file was deleted.

CHANGES/1084.misc

-1
This file was deleted.

CHANGES/1092.contrib

-1
This file was deleted.

CHANGES/1093.contrib.rst

-34
This file was deleted.

CHANGES/1096.misc

-3
This file was deleted.

CHANGES/1097.bugfix

-6
This file was deleted.

CHANGES/1098.feature

-1
This file was deleted.

CHANGES/1100.bugfix

-1
This file was deleted.

CHANGES/1101.feature

-3
This file was deleted.

CHANGES/1105.feature

-6
This file was deleted.

CHANGES/965.bugfix

-1
This file was deleted.

multidict/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"getversion",
2323
)
2424

25-
__version__ = "6.2.0"
25+
__version__ = "6.3.0"
2626

2727

2828
if TYPE_CHECKING or not USE_EXTENSIONS:

0 commit comments

Comments
 (0)