Skip to content

Commit

Permalink
Prepare for 0.21.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
jab committed Sep 5, 2021
1 parent e3533c7 commit 9fcc793
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 13 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
tags:
# To publish a test release to test.pypi.org,
# create and push a tag as follows:
# git tag -a 0.21.3.dev27 -m "Tag 0.21.3.dev27 for release to test.pypi.org"
# git tag -a 0.21.3.rc1 -m "Tag 0.21.3.rc1 for release to test.pypi.org"
# git push --tags
# Go to https://github.com/jab/bidict/actions?query=workflow%3A%22Release+to+Test+PyPI%22
# and watch for a new run of this workflow to publish to test.pypi.org.
# IMPORTANT: Run the following to clean up after:
# git tag -d 0.21.3.dev27
# git push origin :0.21.3.dev27
- "[0-9]+.[0-9]+.[0-9]+.dev[0-9]+"
# git tag -d 0.21.3.rc1
# git push origin :0.21.3.rc1
- "[0-9]+.[0-9]+.[0-9]+.rc[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
__pycache__
_build
bidict.egg-info
bidict/_version.py
build
coverage.xml
dist
Expand Down
14 changes: 8 additions & 6 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,22 @@ Tip: Subscribe to releases
to be notified when new versions of ``bidict`` are released.


0.21.3 (not yet released)
-------------------------
0.21.3 (2021-09-05)
-------------------

- All bidicts now provide the :meth:`~bidict.BidictBase.equals_order_sensitive` method,
not just :class:`bidict.OrderedBidict`\s.

Since support for Python < 3.6 was dropped in v0.21.0,
bidicts that are not :class:`bidict.OrderedBidict`\s preserve a deterministic ordering
(just like dicts do in Python 3.6+), so all bidicts can now provide this method.
non-:class:`Ordered <bidict.OrderedBidict>` bidicts preserve a deterministic ordering
on all supported Python versions,
so all bidicts can now provide :meth:`~bidict.BidictBase.equals_order_sensitive`.

- Take better advantage of the fact that dicts are reversible in Python 3.8+.

This allows even non-:class:`~bidict.OrderedBidict`\s to efficiently provide a
:meth:`~bidict.BidictBase.__reversed__` implementation, which they now do.
This allows even non-:class:`Ordered <bidict.OrderedBidict>` bidicts
to efficiently provide a :meth:`~bidict.BidictBase.__reversed__` implementation,
which they now do.

As a result, if you are using Python 3.8+,
:class:`~bidict.frozenbidict` now gives you everything that
Expand Down
2 changes: 1 addition & 1 deletion bidict/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"""Define bidict package metadata."""


__version__ = '0.21.3.dev'
__version__ = '0.21.3'
__author__ = 'Joshua Bronson'
__maintainer__ = 'Joshua Bronson'
__copyright__ = 'Copyright 2009-2021 Joshua Bronson'
Expand Down
12 changes: 11 additions & 1 deletion tests/test_class_relationships.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"""Test various issubclass checks."""

import re
from collections.abc import Hashable, Mapping, MutableMapping
import sys
from collections.abc import Hashable, Mapping, MutableMapping, Reversible
from collections import OrderedDict

import pytest
Expand Down Expand Up @@ -127,3 +128,12 @@ def test_bimap_inverse_notimplemented():
# Can't instantiate a BidirectionalMapping that hasn't overridden the abstract methods of
# the interface, so only way to call this implementation is on the class.
BidirectionalMapping.inverse.fget(bidict())

def test_bidict_reversible_matches_dict_reversible():
"""Reversibility of bidict matches dict's on all supported Python versions."""
assert issubclass(bidict, Reversible) == issubclass(dict, Reversible)

@pytest.mark.skipif(sys.version_info < (3, 8), reason='reversible bidicts require Python 3.8+')
def test_bidict_reversible():
"""All bidicts are Reversible on Python 3.8+."""
assert issubclass(bidict, Reversible)

0 comments on commit 9fcc793

Please sign in to comment.