Commit Graph

8 Commits

Author SHA1 Message Date
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 c2cac7c0b8 Test with Python 3.9 in CI, use Focal on Travis, upgrade to latest pylint 2020-10-28 10:42:02 -04:00
jab cd73edd854 Remove Python 2 support.
Closes #97.
2019-11-03 21:54:54 -05:00
jab 46beafb51e Bump to Python 3.8 on Travis and 3.7 on AppVeyor (no 3.8 yet), update to latest pylint (2.4.3) + astroid (2.1.0) + associated code style changes to appease them 2019-10-26 11:03:09 -04:00
jab feca308818 update appveyor to "Visual Studio 2017" image 2018-12-27 21:37:27 -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 8a0460613a CI tweaks. Default to Xenial, Python 3.7, and VM env on Travis. 2018-10-06 09:51:49 -04:00