Skip to content

Releases: aio-libs/multidict

6.6.3

30 Jun 15:49
dbd686f
Compare
Choose a tag to compare

Bug fixes

  • Fixed inconsistencies generated by the C implementation of _md_shrink() which might later lead to assertion failures and crash -- by :user:Romain-Geissler-1A.

    Related issues and pull requests on GitHub:
    #1229.


6.6.2

28 Jun 14:34
v6.6.2
8ea6942
Compare
Choose a tag to compare

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.

    Related issues and pull requests on GitHub:
    #1221, #1222.

  • Fixed format string compilation errors in debug builds on 32-bit platforms by using portable %zd format specifiers for Py_ssize_t values instead of %ld -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    #1225, #1226.

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.

    Related issues and pull requests on GitHub:
    #1225, #1227.


6.6.1

28 Jun 09:31
v6.6.1
ba4d428
Compare
Choose a tag to compare

Bug fixes

  • If :meth:multidict.MultiDict.extend, :meth:multidict.MultiDict.merge, or :meth:multidict.MultiDict.update raises 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 setuptools deprecation 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

27 Jun 09:47
b9764dd
Compare
Choose a tag to compare

Features

  • Added :meth:multidict.MultiDict.merge which 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_t structure 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.getall now 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.update to don't use RST/markdown markup.

    Related issues and pull requests on GitHub:
    #1203.

  • Improved documentation for :meth:multidict.MultiDict.extend and :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 the cibuildwheel invocation -- by :user:webknjaz.

    Related issues and pull requests on GitHub:
    #1199.

  • Set up PYTHONHASHSEED for benchmarks execution to make measured times stable -- by :user:asvetlov.

    Related issues and pull requests on GitHub:
    #1202.


6.5.1

24 Jun 22:12
df0379f
Compare
Choose a tag to compare

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] becomes test_keys_view_xor[ci-py] -- by :user:asvetlov.

    Related issues and pull requests on GitHub:
    #1192.

  • The :file:reusable-cibuildwheel.yml workflow has been refactored to
    be more generic and :file:ci-cd.yml now holds all the configuration
    toggles -- by :user:webknjaz.

    Related issues and pull requests on GitHub:
    #1193.


6.5.0

17 Jun 14:11
df5b5db
Compare
Choose a tag to compare

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:dict from 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.add and :class:~multidict.MultiDict.extend are 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 the reusable-build-wheel.yml
    template has been modified to allow for
    an os value (windows-11-arm) which
    does not end with the -latest postfix.

    Related issues and pull requests on GitHub:
    #1167.


6.4.4

19 May 14:12
v6.4.4
e77793a
Compare
Choose a tag to compare

Bug fixes

  • Fixed a segmentation fault when calling :py:meth:multidict.MultiDict.setdefault with 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:TypeError with 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.MultiDictProxy was refactored to rely only on
    :class:multidict.MultiDict public 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.MultiDict API and don't touch any implementation
    details.

    Related issues and pull requests on GitHub:
    #1152.

  • Dropped internal _Impl class 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

10 Apr 22:16
v6.4.3
5f64e68
Compare
Choose a tag to compare

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_BUILD in the environment -- by :user:bdraco.

    Related issues and pull requests on GitHub:
    #1145.


6.4.2

09 Apr 23:14
v6.4.2
fe79f97
Compare
Choose a tag to compare

Bug fixes

  • Fixed a segmentation fault when creating subclassed :py:class:~multidict.MultiDict objects on Python < 3.11 -- by :user:bdraco.

    The problem first appeared in 6.4.0

    Related issues and pull requests on GitHub:
    #1141.


6.4.1

09 Apr 19:51
v6.4.1
2c0d458
Compare
Choose a tag to compare

No change release of 6.4.0 since the attestations failed to upload to GitHub