Releases: aio-libs/multidict
6.7.0
6.6.4
Bug fixes
-
Fixed
MutliDict&CIMultiDictmemory leak when deleting values or clearing them
-- by :user:VizonexRelated issues and pull requests on GitHub:
#1233.
Contributor-facing changes
-
The type preciseness coverage report generated by
MyPy <https://mypy-lang.org>__ is now uploaded toCoveralls <https://coveralls.io/github/aio-libs/multidict>__ and
will not be included in theCodecov views <https://app.codecov.io/gh/aio-libs/multidict>__ going forward
-- by :user:webknjaz. -
Added memory leak test for popping or deleting attributes from a multidict to prevent future issues or bogus claims.
-- by :user:VizonexRelated issues and pull requests on GitHub:
#1233.
6.6.3
6.6.2
Bug fixes
-
Fixed a memory corruption issue in the C implementation of
_md_shrink()that could lead to segmentation faults and data loss when items were deleted from a :class:~multidict.MultiDict. The issue was an edge case in the pointer arithmetic during the compaction phase -- by :user:bdraco. -
Fixed format string compilation errors in debug builds on 32-bit platforms by using portable
%zdformat specifiers forPy_ssize_tvalues instead of%ld-- by :user:bdraco.
Packaging updates and notes for downstreams
-
Re-enabled 32-bit Linux wheel builds that were disabled by default in cibuildwheel 3.0.0 -- by :user:
bdraco.
6.6.1
Bug fixes
-
If :meth:
multidict.MultiDict.extend, :meth:multidict.MultiDict.merge, or :meth:multidict.MultiDict.updateraises an exception, now the multidict internal state is correctly restored.
Patch by :user:asvetlov.Related issues and pull requests on GitHub:
#1215.
Contributor-facing changes
-
Fixed
setuptoolsdeprecation warning about the license specification -- by :user:asvetlov.Related issues and pull requests on GitHub:
#1216. -
Fix compiler warnings and convert them to errors -- by :user:
asvetlov.Related issues and pull requests on GitHub:
#1217.
6.6.0
Features
-
Added :meth:
multidict.MultiDict.mergewhich copies all items from arguments if its key
not exist in the dictionary -- by :user:asvetlov.Related issues and pull requests on GitHub:
#292. -
Stopped reallocating memory for the internal
htkeys_tstructure when inserting new items if the
multidict has deleted items and it could be collapsed in-place. Removal of
malloc()/free()improves the performance slightly.The change affects C implementation only, pure Python code is not changed.
Patch by :user:
asvetlov.Related issues and pull requests on GitHub:
#1200. -
C implementation of :class:
multidict.MultiDict.getallnow is slightly faster if it returns nothing -- by :user:asvetlov.Related issues and pull requests on GitHub:
#1212.
Improved documentation
-
Replaced docstring for :meth:
multidict.MultiDict.updateto don't use RST/markdown markup.Related issues and pull requests on GitHub:
#1203. -
Improved documentation for :meth:
multidict.MultiDict.extendand :meth:multidict.MultiDict.update-- by :user:asvetlov.Related issues and pull requests on GitHub:
#1205.
Contributor-facing changes
-
When building wheels, the source distribution is now passed directly
to thecibuildwheelinvocation -- by :user:webknjaz.Related issues and pull requests on GitHub:
#1199. -
Set up
PYTHONHASHSEEDfor benchmarks execution to make measured times stable -- by :user:asvetlov.Related issues and pull requests on GitHub:
#1202.
6.5.1
Bug fixes
-
Fixed a bug in C implementation when multidict is resized and it has deleted slots.
The bug was introduced by multidict 6.5.0 release.
Patch by :user:
asvetlov.Related issues and pull requests on GitHub:
#1195.
Contributor-facing changes
-
A pair of code formatters for Python and C have been configured in the pre-commit tool.
Related issues and pull requests on GitHub:
#1123. -
Shorted fixture parametrization ids.
For example,
test_keys_view_xor[case-insensitive-pure-python-module]becomestest_keys_view_xor[ci-py]-- by :user:asvetlov.Related issues and pull requests on GitHub:
#1192. -
The :file:
reusable-cibuildwheel.ymlworkflow has been refactored to
be more generic and :file:ci-cd.ymlnow holds all the configuration
toggles -- by :user:webknjaz.Related issues and pull requests on GitHub:
#1193.
6.5.0
Features
-
Replace internal implementation from an array of items to hash table.
algorithmic complexity for lookups is switched from O(N) to O(1).The hash table is very similar to :class:
dictfrom CPython but it allows keys duplication.The benchmark shows 25-50% boost for single lookups, x2-x3 for bulk updates, and x20 for
some multidict view operations. The gain is not for free:
:class:~multidict.MultiDict.addand :class:~multidict.MultiDict.extendare 25-50%
slower now. We consider it as acceptable because the lookup is much more common
operation that addition for the library domain.Related issues and pull requests on GitHub:
#1128.
Contributor-facing changes
-
Builds have been added for arm64 Windows
wheels and thereusable-build-wheel.yml
template has been modified to allow for
an os value (windows-11-arm) which
does not end with the-latestpostfix.Related issues and pull requests on GitHub:
#1167.
6.4.4
Bug fixes
-
Fixed a segmentation fault when calling :py:meth:
multidict.MultiDict.setdefaultwith a single argument -- by :user:bdraco.Related issues and pull requests on GitHub:
#1160. -
Fixed a segmentation fault when attempting to directly instantiate view objects
(multidict._ItemsView,multidict._KeysView,multidict._ValuesView) -- by :user:bdraco.View objects now raise a proper :exc:
TypeErrorwith the message "cannot create '...' instances directly"
when direct instantiation is attempted.View objects should only be created through the proper methods: :py:meth:
multidict.MultiDict.items,
:py:meth:multidict.MultiDict.keys, and :py:meth:multidict.MultiDict.values.Related issues and pull requests on GitHub:
#1164.
Miscellaneous internal changes
-
:class:
multidict.MultiDictProxywas refactored to rely only on
:class:multidict.MultiDictpublic interface and don't touch any implementation
details.Related issues and pull requests on GitHub:
#1150. -
Multidict views were refactored to rely only on
:class:multidict.MultiDictAPI and don't touch any implementation
details.Related issues and pull requests on GitHub:
#1152. -
Dropped internal
_Implclass from pure Python implementation, both pure Python and C
Extension follows the same design internally now.Related issues and pull requests on GitHub:
#1153.
6.4.3
Bug fixes
-
Fixed building the library in debug mode.
Related issues and pull requests on GitHub:
#1144. -
Fixed custom
PyType_GetModuleByDef()when non-heap type object was passed.Related issues and pull requests on GitHub:
#1147.
Packaging updates and notes for downstreams
-
Added the ability to build in debug mode by setting :envvar:
MULTIDICT_DEBUG_BUILDin the environment -- by :user:bdraco.Related issues and pull requests on GitHub:
#1145.