Commit Graph

17 Commits

Author SHA1 Message Date
Joshua Bronson 11567533fe Move CI to GitHub Actions, fix version typo in metadata.py 2020-12-20 10:50:41 -05:00
Joshua Bronson 8c161ca64c Improve installation, dev, and release tooling.
* Switch from install-extras to requirements.in + pip-tools for
  deterministic installation of dependencies.

* Do not use the isolated pre-commit environment for the pylint
  hook as per
  https://github.com/pre-commit/pre-commit/issues/813#issuecomment-413220498.

* Use setuptools_scm's new parentdir_prefix_version feature to fix #115.
  See pypa/setuptools_scm#477.

* Drop sphinx_autodoc_typehints; use equivalent functionality now built
  into Sphinx.
2020-11-28 10:09:31 -05:00
Joshua Bronson e62d85d933 Begin adding type hints, drop Python 3.5, rm bidict.compat 2020-08-01 09:31:15 -04:00
jab cd73edd854 Remove Python 2 support.
Closes #97.
2019-11-03 21:54:54 -05:00
jab c119d0b081 update to latest pylint and pre-commit hooks, rename + improve run_tests.py script 2018-12-27 21:27:57 -05:00
jab afdf2f4f61 Various improvements.
- Refactor proxied- (i.e. delegated-) to-``_fwdm`` logic
  for better composability and interoperability.

  Drop the ``_Proxied*`` mixin classes
  and instead move their methods
  into :class:`~bidict.BidictBase`,
  which now checks for an object defined by the
  :attr:`~bidict.BidictBase.__delegate__` attribute.
  The :attr:`~bidict.BidictBase.__delegate__` object
  will be delegated to if the method is available on it,
  otherwise a default implementation
  (e.g. inherited from :class:`~collections.abc.Mapping`)
  will be used otherwise.
  Subclasses may set ``__delegate__ = None`` to opt out.

- Consolidate ``_MutableBidict`` into :class:`bidict.bidict`
  now that the dropped mixin classes make it unnecessary.

- Change :attr:`~bidict.BidictBase.__repr_delegate__`
  to take simply a type like :class:`dict` or :class:`list`.

- Upgrade to latest major
  `sortedcontainers <https://github.com/grantjenks/python-sortedcontainers>`__
  version (from v1 to v2)
  for the :ref:`extending:Sorted Bidict Recipes`.

- ``bidict.compat.{view,iter}{keys,values,items}`` on Python2
  no longer assumes the target object implements these methods,
  as they're not actually part of the
  :class:`~collections.abc.Mapping` interface,
  and provides fallback implementations when the methods are unavailable.
  This allows the :ref:`extending:Sorted Bidict Recipes`
  to continue to work with sortedcontainers v2 on Python2.

- Test code in docs via Sphinx rather than pytest.

  Enables running Python version-dependent tests conditionally
  rather than skipping them altogether, as well as hiding import
  statements (via `testsetup`) that otherwise just add noise.

  Run tests (viz. pytest and Sphinx doctest) via a new
  run-tests.py script.
2018-11-05 15:52:59 -05:00
jab 1f5a66c355 improvements to pyproject.toml changes 2018-09-17 19:23:46 -04:00
jab 033083ca26
various code and CI improvements + dependency updates (#42) 2017-11-16 15:44:51 -05:00
jab e2acff57f6 update to latest hypothesis (3.17.0) and flake8 (3.4.1)
also enable pypy3 in tox.ini
2017-08-12 11:48:17 -04:00
jab 887e078907 squashed changes for 0.13.0
- support Python 3.6, refactor CI/test setup, increase test coverage
- refactor BidirectionalMapping, BidictBase, OrderedBidictBase,
  FrozenBidictBase, and subclasses
- move frozenorderedbidict into _frozen and looseorderedbidict into _loose
- register bidict as a virtual subclass of MutableMapping rather than
  inheriting from it directly. This makes it clearer that it does not use any
  of the concrete generic methods that MutableMapping provides.
- improve performance and flexibility of frozenbidict and
  frozenorderedbidict hashing
- docs, including new type-hierarchy.png diagram
- rm unused imap, ifilter, izip_longest from compat, add PYPY
- update to latest versions of dependencies
- restore benchmarking on travis
2017-01-09 10:37:31 -05:00
jab 79228b78e3 squashed changes for 0.12.0 2016-06-28 00:05:23 -04:00
jab c4ae97dd8b several improvements to test setup
- use latest patch releases of all python versions via pyenv
- use caching to speed up travis builds
- peg to latest versions of test deps (including hypothesis 2.0)
- set hypothesis to strict
- explicitly set average_size on strategies that accept it
- drop pypy3, not worth supporting till it catches up to cpython
- only pass --cov for python27 and 35; with other versions, it slows down
  hypothesis data generation so much, the health checks fail
- refactor tox and travis setup to use new test.sh helper script
2016-01-26 19:28:43 -05:00
jab 2074f4b0d8 implement stricter 1-to-1 checking + many fixes + improvements
See the changelog for full details.

Closes #21.
2015-12-20 22:05:22 -05:00
jab 3ac6abafda document support for python 3.3 2015-11-28 09:17:44 -05:00
jab 5f40c86694 py35 2015-09-14 10:11:56 -04:00
jab fe7e7217cb refactor, tests + docs improvements
- break up single bidict.py module into multiple separate modules inside
  "bidict" package
  - new bidict.util and bidict.compat modules
  - move/rename bidict.fancy_iteritems to bidict.util.pairs
  - move bidict.iteritems and bidict.viewitems to bidict.compat
- condense docstrings by moving more documentation into separate sphinx pages
  in "docs" dir and doctests into separate files in new "tests" dir
- initial work on property-based testing using hypothesis
- adopt pytest
- bump to 0.9.0-dev
2015-04-27 11:08:27 -04:00
jab a409c25525 moving from hg to git, cutting 0.2.1 2014-09-23 10:08:21 -04:00