Changelogs >

Multidict

PyUp actively tracks 419,855 Python packages for vulnerabilities to keep your Python environments secure.

Scan your dependencies

6.0.2

==================

Bugfixes
--------

- Revert :issue:`644`, restore type annotations to as-of 5.2.0 version. (:issue:`688`)

6.0.1

==================

Bugfixes
--------

- Restored back ``MultiDict``, ``CIMultiDict``, ``MultiDictProxy``, and
``CIMutiDictProxy`` generic type arguments; they are parameterized by value type, but the
key type is fixed by container class.

``MultiDict[int]`` means ``MutableMultiMapping[str, int]``. The key type of
``MultiDict`` is always ``str``, while all str-like keys are accepted by API and
converted to ``str`` internally.

The same is true for ``CIMultiDict[int]`` which means ``MutableMultiMapping[istr,
int]``. str-like keys are accepted but converted to ``istr`` internally. (:issue:`682`)

6.0.0

==================

Features
--------

- Use ``METH_FASTCALL`` where it makes sense.

``MultiDict.add()`` is 2.2 times faster now, ``CIMultiDict.add()`` is 1.5 times faster.
The same boost is applied to ``get*()``, ``setdefault()``, and ``pop*()`` methods. (:issue:`681`)


Bugfixes
--------

- Fixed type annotations for keys of multidict mapping classes. (:issue:`644`)
- Support Multidict[int] for pure-python version.
``__class_getitem__`` is already provided by C Extension, making it work with the pure-extension too. (:issue:`678`)


Deprecations and Removals
-------------------------

- Dropped Python 3.6 support (:issue:`680`)


Misc
----

- :issue:`659`

5.2.0

=====================

Features
--------

- 1. Added support Python 3.10
2. Started shipping platform-specific wheels with the ``musl`` tag targeting typical Alpine Linux runtimes.
3. Started shipping platform-specific arm64 wheels for Apple Silicon. (:issue:`629`)


Bugfixes
--------

- Fixed pure-python implementation that used to raise "Dictionary changed during iteration" error when iterated view (``.keys()``, ``.values()`` or ``.items()``) was created before the dictionary's content change. (:issue:`620`)

5.1.0

==================

Features
--------

- Supported ``GenericAliases`` (``MultiDict[str]``) for Python 3.9+
:issue:`553`


Bugfixes
--------

- Synchronized the declared supported Python versions in ``setup.py`` with actually supported and tested ones.
:issue:`552`


----

5.0.1

==================

Bugfixes
--------

- Provided x86 Windows wheels
:issue:`550`


----

5.0.0

==================

Features
--------

- Provided wheels for ``aarch64``, ``i686``, ``ppc64le``, ``s390x`` architectures on Linux
as well as ``x86_64``.
:issue:`500`
- Provided wheels for Python 3.9.
:issue:`534`

Removal
-------

- Dropped Python 3.5 support; Python 3.6 is the minimal supported Python version.

Misc
----

- :issue:`503`


----

4.7.6

------------------

Bugfixes
^^^^^^^^

- Fixed an issue with some versions of the ``wheel`` dist
failing because of being unable to detect the license file.
:issue:`481`

4.7.5

------------------

Bugfixes
^^^^^^^^

- Fixed creating and updating of MultiDict from a sequence of pairs and keyword
arguments. Previously passing a list argument modified it inplace, and other sequences
caused an error.
:issue:`457`
- Fixed comparing with mapping: an exception raised in the
:py:func:`~object.__len__` method caused raising a SyntaxError.
:issue:`459`
- Fixed comparing with mapping: all exceptions raised in the
:py:func:`~object.__getitem__` method were silenced.
:issue:`460`

4.7.4

------------------

Bugfixes
^^^^^^^^

- ``MultiDict.iter`` fix memory leak when used iterator over
:py:mod:`multidict` instance.
:issue:`452`

4.7.3

----------------------------

Features
^^^^^^^^

- Implement ``__sizeof__`` function to correctly calculate all internal structures size.
:issue:`444`
- Expose ``getversion()`` function.
:issue:`451`


Bugfixes
^^^^^^^^

- Fix crashes in ``popone``/``popall`` when default is returned.
:issue:`450`


Improved Documentation
^^^^^^^^^^^^^^^^^^^^^^

- Corrected the documentation for ``MultiDict.extend()``
:issue:`446`

4.7.2

------------------

Bugfixes
^^^^^^^^

- Fix crashing when multidict is used pyinstaller
:issue:`432`
- Fix typing for :py:meth:`CIMultiDict.copy`
:issue:`434`
- Fix memory leak in ``MultiDict.copy()``
:issue:`443`

4.7.1

------------------

Bugfixes
^^^^^^^^

- :py:meth:`CIMultiDictProxy.copy` return object type
:py:class:`multidict._multidict.CIMultiDict`
:issue:`427`
- Make :py:class:`CIMultiDict` subclassable again
:issue:`416`
- Fix regression, multidict can be constructed from arbitrary iterable of pairs again.
:issue:`418`
- :py:meth:`CIMultiDict.add` may be called with keyword arguments
:issue:`421`


Improved Documentation
^^^^^^^^^^^^^^^^^^^^^^

- Mention ``MULTIDICT_NO_EXTENSIONS`` environment variable in docs.
:issue:`393`
- Document the fact that ``istr`` preserves the casing of argument untouched but uses internal lower-cased copy for keys comparison.
:issue:`419`

4.7.0

------------------

Features
^^^^^^^^

- Replace Cython optimization with pure C
:issue:`249`
- Implement ``__length_hint__()`` for iterators
:issue:`310`
- Support the MultiDict[str] generic specialization in the runtime.
:issue:`392`
- Embed pair_list_t structure into MultiDict Python object
:issue:`395`
- Embed multidict pairs for small dictionaries to amortize the memory usage.
:issue:`396`
- Support weak references to C Extension classes.
:issue:`399`
- Add docstrings to provided classes.
:issue:`400`
- Merge ``multidict._istr`` back with ``multidict._multidict``.
:issue:`409`


Bugfixes
^^^^^^^^

- Explicitly call ``tp_free`` slot on deallocation.
:issue:`407`
- Return class from __class_getitem__ to simplify subclassing
:issue:`413`

4.6.1

------------------

Bugfixes
^^^^^^^^

- Fix PyPI link for GitHub Issues badge.
:issue:`391`

4.6.0

------------------

Bugfixes
^^^^^^^^

- Fix GC object tracking.
:issue:`314`
- Preserve the case of `istr` strings.
:issue:`374`
- Generate binary wheels for Python 3.8.

4.5.2

------------------

* Fix another memory leak introduced by 4.5.0 release
:issue:`307`

4.5.1

------------------

* Fix a memory leak introduced by 4.5.0 release
:issue:`306`

4.5.0

------------------

* Multidict views ported from Cython to C extension
:issue:`275`

4.4.2

------------------

* Restore Python 3.4 support
:issue:`289`

4.4.1

------------------

* Fix type annotations
:issue:`283`)

* Allow to install the library on systems without compilation toolset
:issue:`281`

4.4.0

------------------

* Rewrite C implementation to use C pair list.

* Fix update order when both ``arg`` and ``kwargs`` are used.

4.3.1

------------------

* Fix a typo in multidict stub file.

4.3.0

------------------

* Polish type hints, make multidict type definitions generic.

4.2.0

------------------

* Publish ``py.typed`` flag for type hinting analyzers (``mypy`` etc).

4.1.0

------------------

* Fix key casing in Pure Python implementation of
:py:class:`CIMultiDict`
:issue:`202`

4.0.0

------------------

* Accept multiple keys in :py:meth:`MultiDict.update` and
:py:meth:`CIMultiDict.update`
:issue:`199`

3.3.2

------------------

* Fix tarball (again)

3.3.1

------------------

* Include .c files in tarball
:issue:`181`

3.3.0

------------------

* Introduce abstract base classes
:issue:`102`

* Publish OSX binary wheels
:issue:`153`

3.2.0

------------------

* Fix pickling
:issue:`134`

* Fix equality check when other contains more keys
:issue:`124`

* Fix :py:class:`CIMultiDict <multidict.CIMultiDict>` copy
:issue:`107`

3.1.3

------------------

* Fix build

3.1.2

------------------

* Fix type annotations

3.1.1

------------------

* Remove memory leak in :py:func:`istr <multidict.istr>` implementation
:issue:`105`

3.1.0

------------------

* Raise :py:exc:`RuntimeError` on :py:class:`dict` iterations if the dict was changed (:issue:`99`)

* Update ``__init__.pyi`` signatures

3.0.0

------------------

* Refactor internal data structures: main dict operations are about
100% faster now.

* Preserve order on multidict updates

Updates are ``md[key] = val`` and ``md.update(...)`` calls.

Now **the last** entry is replaced with new key/value pair, all
previous occurrences are removed.

If key is not present in dictionary the pair is added to the end

:issue:`68`

* Force keys to :py:class:`str` instances
:issue:`88`

* Implement :py:func:`.popall(key[, default]) <multidict.MultiDict.popall>`
:issue:`84`

* :py:func:`.pop() <multidict.MultiDict.pop>` removes only first occurrence,
:py:func:`.popone() <multidict.MultiDict.popone>` added
:issue:`92`

* Implement dict's version
:issue:`86`

* Proxies are not pickable anymore
:issue:`77`

2.1.7

------------------

* Fix import warning on Python 3.6
:issue:`79`

2.1.6

------------------

* Rebuild the library for fixing missing ``__spec__`` attribute
:issue:`79`

2.1.5

------------------

* Build Python 3.6 binary wheels

2.1.4

------------------

* Remove ``LICENSE`` filename extension ``MANIFEST.in`` file
:issue:`31`

2.1.3

------------------

* Add a fastpath for multidict extending by multidict

2.1.2

------------------

* Fix :py:func:`CIMultiDict.update <multidict.CIMultiDict.update>` for case of accepting
:py:func:`istr <multidict.istr>`

2.1.1

------------------

* Fix :py:class:`CIMultiDict <multidict.CIMultiDict>` constructor for case of accepting
:py:func:`istr <multidict.istr>` :issue:`11`

2.1.0

------------------

* Allow to create proxy from proxy

* Add type hints (:pep:`484`)

2.0.1

------------------

* Don't crash on ``{} - MultiDict().keys()`` and similar operations
:issue:`6`

2.0.0

------------------

* Switch from uppercase approach for case-insensitive string to
:py:func:`str.title() <str.title>`
:issue:`5`

* Deprecate :py:func:`upstr <multidict.upstr>` class in favor of :py:func:`istr <multidict.istr>` alias.

1.2.2

------------------

* Don't crash on ``{} - MultiDict().keys()`` and similar operations
:issue:`6`

1.2.1

------------------

* Don't expose ``multidict.__version__``

1.2.0

------------------

* Make ``upstr(upstr('abc'))`` much faster

1.1.0

------------------

* Don't double-iterate during :py:class:`MultiDict <multidict.MultiDict>` initialization
:issue:`3`

* Fix :py:func:`CIMultiDict.pop <multidict.CIMultiDict.pop>`: it is case insensitive now
:issue:`1`

* Provide manylinux wheels as well as Windows ones

1.0.3

------------------

* Add missing MANIFEST.in

1.0.2

------------------

* Fix setup build

1.0.0

------------------

* Initial implementation