Commit Graph

126 Commits

Author SHA1 Message Date
Joshua Bronson c56b882c82 Declare support for Python 3.11. 2022-10-29 19:11:37 -04:00
Joshua Bronson 025fcd8199 Add refurb to pre-commit hooks 2022-10-01 12:32:33 -04:00
Joshua Bronson b5c9f346ce (c) 2022-02-15 15:37:25 -05:00
Joshua Bronson 6dd2a25fb4 Minor tweaks to setup.py 2022-02-08 09:52:16 -05:00
Joshua Bronson 1c9d7bec53 Minor code and docs changes. 2022-02-07 11:42:09 -05:00
Joshua Bronson f86ba703e4 Update copyright notices for 2022. 2022-01-01 12:59:11 -05:00
Joshua Bronson d9f988bb64 Upgrade to mypy 0.930 from 0.920 2021-12-27 11:55:17 -05:00
Joshua Bronson 1dfff770ca Upgrade dev dependencies, drop support for py36 2021-12-22 17:22:03 -05:00
Joshua Bronson 367a37110d Improve internal type hints, declare support for Python 3.10 2021-10-10 12:30:12 -04:00
Joshua Bronson e3533c77eb All bidicts provide __reversed__ in Python 3.8+ 2021-09-05 10:57:07 -04:00
Joshua Bronson 3b2833cc3e rm setuptools_scm from setup_requires 2021-09-03 11:05:34 -04:00
Joshua Bronson b6275c1750 Drop setuptools_scm. 2021-09-02 10:16:54 -04:00
Joshua Bronson bd4e652ae4 master -> main 2021-03-29 14:05:22 -04:00
Joshua Bronson bc8c9984fc Update copyright notices for 2021. 2021-01-01 12:14:24 -05:00
Joshua Bronson a9fcf2cdf6 Add Trove classifiers for Py 3.9 and type hints 2020-12-19 09:58:33 -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
jab e69ff402a9 Prefer include_package_data=True over package_data=... 2020-09-07 20:00:26 -04:00
jab aaeff8c906 Fix py.typed missing from distributions, prepare for v0.21.2 release.
Also update MANIFEST.in
and remove logo.pxm.
2020-09-07 12:06:10 -04:00
Joshua Bronson 0ad5284f75 Finish first pass at adding type hints.
Fixes #93.
2020-08-12 10:22:25 -04:00
Joshua Bronson e62d85d933 Begin adding type hints, drop Python 3.5, rm bidict.compat 2020-08-01 09:31:15 -04:00
Joshua Bronson 2efdc0e7b8 Upgrade dependencies for various extras, precommit hooks, CI
Use a single job that runs all precommit hooks in CI
rather than separate jobs for flake8, pylint, pydocstyle, etc.
2020-07-29 21:59:45 -04:00
Joshua Bronson e2514160ec Add MutableBidirectionalMapping ABC 2020-07-26 16:33:25 -04:00
jab c1e297c824 minor improvements to docs, CI, setuptools_scm pin 2020-07-01 09:27:28 -04:00
jab d2b5adcce3 Happy 2020 🎉 2019-12-31 18:14:38 -05:00
jab fdffda2cc2 Abort if PY2 detected in setup.py. Loosen python_requires to '>=3'. Better warning for PY3 < 3.5. 2019-11-12 21:55:10 -05: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 daab54a0a3 Add Python 3.8 Trove classifier. 2019-10-20 15:52:13 -04:00
jab 7a1069c35c Small improvements to tests, CI, docs + upgrades 2019-09-02 15:51:36 -04:00
jab 210fe8f984 Work around sphinx-doc/sphinx#6594.
Sphinx's docutils pin has no upper bound. Pin to 0.14 pending sphinx-doc/sphinx#6594.
Without this we'd pull 0.15 and "make doctest" would break with SyntaxError under Python 2.7.
2019-07-21 17:06:50 -04:00
jab 3f8282b782 pin to hypothesis<5 instead of <4 (latest is now 4.14.2) 2019-03-31 15:04:50 -04:00
jab 48886a5bb1 pin to exact versions of pylint and astroid, which do not follow semver 2019-03-17 12:55:42 -04:00
jab 23b72434ec Pin to astroid 2.1.0 pending PyCQA/pylint#2774 2019-02-27 20:12:35 -05:00
jab d5e44c6cc0 setup.py + .travis.yml refactor 2019-02-25 00:20:36 -05:00
jab 5f9cab9acf drop Py3.4 from Travis, update to latest flake8 + pydocstyle, improve lint_src spelling 2019-01-30 23:53:50 -05:00
Jake Waksbaum 638babdde5 Remove hypothesis-pytest dependency
According to https://pypi.org/project/hypothesis-pytest
hypothesis-pytest is deprecated and its functionality is included in
hypothesis.
2019-01-18 18:59:27 -05:00
jab 40378027bb update to pytest 4.1 and pytest-benchmark 3.2.0 which now supports it 2019-01-07 22:24:14 -05:00
jab 2e4a9be91c pin to pytest < 4.1 pending ionelmc/pytest-benchmark#124 2019-01-06 20:19:55 -05:00
jab ba1cba8523 happy 2019 2019-01-01 13:51:46 -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 6ec9a4a2e2 add comment explaining pylint<2.2 pin 2018-12-11 13:21:18 -05:00
jab d13fd9bb8a resurrect delegating mixins instead of __delegate__ + other refinements
e.g. s/__repr_delegate__/_repr_delegate

Also
- update
- update from pytest 3 to 4
- add CII best practices badge
- prepare for 0.17.5 release
2018-11-19 09:37:38 -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
Bernat Gabor 0d0c91fc75
use pyproject.toml to specify build dependencies 2018-09-14 20:56:28 +01:00
jab 764310e2fe small improvements to supporting files 2018-08-13 13:57:07 -04:00
jab a7bc83f05a pin to latest pylint 2018-08-01 21:13:43 -04:00
jab e2e55c1b50 appease pylint 2018-07-20 07:57:29 -04:00
jab 20e1c18af1 update to latest pylint (2.0.0) and appease it 2018-07-16 20:26:36 -04:00
jab cb1d80c97c tweak docs, setup.py, travis, and hypothesis tests
- improve basic usage and "Why can't I just use a dict?" docs
- rename _static -> assets
- use forward declarations of custom rst interpreted text roles we use that
  sphinx defines and that PyPI and GitHub couldn't handle otherwise (e.g.
  :doc:), rather than stripping them out in setup.py
- move __keywords__ and __url__ from setup.py into bidict/metadata.py
- add __version_info__ metadata attribute
- import bidict/metadata.py in setup.py rather than `exec`ing it
- add back Python 3.4 to Travis test matrix
- improve hypothesis settings for max_examples_5000 profile
  (used in nightly CI builds)
- suppress hypothesis's hung_test health check for max_examples_5000 profile
  to prevent flaky tests caused by failed health checks. Avoids errors like:

    E   hypothesis.errors.FailedHealthCheck: Your test has been running for
        at least five minutes. This is probably not what you intended, so by
        default Hypothesis turns it into an error.
    E   See https://hypothesis.readthedocs.io/en/latest/healthchecks.html for
        more information about this. If you want to disable just this health
        check, add HealthCheck.hung_test to the suppress_health_check settings
        for this test.
2018-04-19 15:52:02 +07:00