Bump multidict from 6.9.1 to 7.1.0
Bumps multidict from 6.9.1 to 7.1.0.
Release notes
Sourced from multidict's releases.
7.1.0 is a correctness and housekeeping release. It changes what
keys()yields, fixes a long list of crashes and inconsistencies that Python code run in the middle of an operation could trigger, stores the common all-strmultidicts in half the space, and deprecatesmultidict.upstr.Behaviour changes.
keys()and iteration over a multidict yield each key once, as spelled in its first item, solen(d.keys())counts distinct keys;items(),values()andlen(d)still see every item. Astrsubclass's ownlower()is no longer called to compute the case-insensitive identity of aCIMultiDictkey.Robustness. Finalizers,
__eq__(),__repr__(),lower()and argument iterators that read or mutate the multidict in the middle of__init__(),update(),merge(),del d[key],popall(),popitem(),to_dict()orrepr()no longer crash the C extension, lose or duplicate pairs, or make the two backends disagree. Two data races against lock-free readers on the free-threaded build are gone too.Memory. A
MultiDictwhose keys are all exactstr, and aCIMultiDictwhose keys are all exactistr, are stored in a compact table without a separate identity and hash per entry, which cuts their size by about 45%.Bug fixes
Fixed building the C extension on platforms where
charis unsigned, such as ARM, PowerPC, s390x and RISC-V, and with GCC 9, which flags CPython's own headers from 3.12 on; both failed on a sign conversion warning since-Wconversiontook effect. GCC 9 builds the extension without-Wconversion-- by@asvetlov.Fixed
getversion()returning only the low 32 bits of the version on Windows and on 32-bit platforms, where two different versions could compare equal, and fixed a race in the pure-Python implementation on GIL builds that could give two multidicts mutated at the same time from different threads the same version -- by@asvetlov.
... (truncated)
Changelog
Sourced from multidict's changelog.
7.1.0
(2026-10-08)
7.1.0 is a correctness and housekeeping release. It changes what :meth:
~multidict.MultiDict.keysyields, fixes a long list of crashes and inconsistencies that Python code run in the middle of an operation could trigger, stores the common all-:class:strmultidicts in half the space, and deprecatesmultidict.upstr.Behaviour changes. :meth:
~multidict.MultiDict.keysand iteration over a multidict yield each key once, as spelled in its first item, solen(d.keys())counts distinct keys; :meth:~multidict.MultiDict.items, :meth:~multidict.MultiDict.valuesandlen(d)still see every item. A :class:strsubclass's ownlower()is no longer called to compute the case-insensitive identity of a :class:~multidict.CIMultiDictkey.Robustness. Finalizers,
__eq__(),__repr__(),lower()and argument iterators that read or mutate the multidict in the middle of__init__(),update(),merge(),del d[key], :meth:~multidict.MultiDict.popall, :meth:~multidict.MultiDict.popitem, :meth:~multidict.MultiDict.to_dictor :func:reprno longer crash the C extension, lose or duplicate pairs, or make the two backends disagree. Two data races against lock-free readers on the free-threaded build are gone too.Memory. A :class:
~multidict.MultiDictwhose keys are all exact :class:str, and a :class:~multidict.CIMultiDictwhose keys are all exact :class:~multidict.istr, are stored in a compact table without a separate identity and hash per entry, which cuts their size by about 45%.Bug fixes
Fixed building the C extension on platforms where
charis unsigned, such as ARM, PowerPC, s390x and RISC-V, and with GCC 9, which flags CPython's own headers from 3.12 on; both failed on a sign conversion warning since-Wconversiontook effect. GCC 9 builds the extension without-Wconversion-- by :user:asvetlov.Related issues and pull requests on GitHub: :issue:
1759, :issue:1760.Fixed :func:
~multidict.getversionreturning only the low 32 bits of the version on Windows and on 32-bit platforms, where two different versions could compare equal, and fixed a race in the pure-Python implementation on GIL builds that could give two multidicts mutated at the same time from different threads the same version
... (truncated)
Commits
709f260Trim the test run of the emulated wheel jobs (#1762)dbc3abaBuild(deps): Bump pypa/cibuildwheel from 4.2.1 to 4.3.0 (#1761)ef68371Build without -Wconversion on GCC 9 (#1760)e812c4fFix the C extension build where char is unsigned (#1759)f9459a1Release 7.1.0 (#1758)45552bdFold the hash chain walk into _md_update() (#1757)84c5412Move to_dict() into to_dict.h and mark only later duplicates (#1756)cfd8ea2Reserve room for update() and merge() only when keys are added (#1755)fb828e3Prefix header-local helpers with an underscore (#1753)3c3fc84Move istr_canonical() into istr_object.h (#1754)- Additional commits viewable in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Summary by cubic
Bumps multidict from 6.9.1 to 7.1.0. This major release changes keys() and iteration to yield each key only once, so len(d.keys()) now counts distinct keys while items(), values(), and len(d) still see every item. It also deprecates multidict.upstr and fixes a number of crash and consistency bugs. Review code that relies on duplicate keys from keys() and consider replacing upstr usage before updating.