Commit Graph

327 Commits

Author SHA1 Message Date
jab f5792224f0 add pip-wheel-metadata to gitignore 2019-09-02 13:28:11 -04:00
jab fe0673baac disable Travis fast_finish 2019-08-18 17:30:02 -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
Joshua Bronson eba62b29b9
Create FUNDING.yml 2019-07-03 20:46:40 -04:00
jab 8600253254 Fix `UnboundLocalError: local variable 'ref' referenced before assignment` on Travis 2019-06-02 20:47:13 -04:00
jab 1a1ba97586 add some missing entries to .gitignore 2019-04-20 14:42:33 -04:00
jab 1e34ae0a24 Use ItemsView in _bidict_and_mapping_from_items when not same_items for portability.
e.g. on PyPy:

    >>>> b = bidict({1: 2, 3: 4})
    >>>> b.items()
    [(1, 2), (3, 4)]
    >>>> m = {3: 4, 1: 2}
    >>>> m.items()
    [(3, 4), (1, 2)]
    >>>> b.items() == m.items()
    False
    >>>> ItemsView(b) == ItemsView(m)
    True
2019-04-14 17:16:15 -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 7fa729b0d0 mention py34 now end-of-life in changelog 2019-03-31 14:58:00 -04:00
jab ed475d5727 fix example generation for hypothesis test namedbidict_raises_on_invalid_name 2019-03-22 13:46:19 -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 d63712571b update "learning" docs 2019-03-04 11:19:11 -05:00
jab 1eb330ae34 Fix `assume` for BIDICT_AND_MAPPING_FROM_DIFFERENT_ITEMS hypothesis strategy.
Should not be order-sensitive.

Must now suppress `too_slow` health check for `test_unequal_to_mapping_with_different_items()`
2019-03-03 14:36:54 -05: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 b90821e365 small optimization in OrderedBidictBase.__iter__ 2019-02-24 21:07:33 -05:00
jab 47abda458c update "learning" docs 2019-02-24 20:56:12 -05:00
jab 5c76421886 fix allow_failures on Travis 2019-02-23 03:44:07 -05:00
jab b65e976d6f add rc scout to docs 2019-02-23 02:56:20 -05:00
jab b6bce43175 update "learning" docs 2019-02-23 02:28:43 -05:00
jab 4c81ab9da2 update copyright dates in .LICENSE_HEADER 2019-02-18 16:39:45 -05:00
jab dd81c83c3f fix typo 2019-02-13 22:59:12 -05:00
jab 060a9c4039 prepare for v0.18.0 release 2019-02-13 20:05:15 -05:00
jab ce345d49ba Rename .inv to .inverse and add an alias for .inv.
bidict.BidirectionalMapping.__subclasshook__ now requires an ``inverse`` attribute
rather than an ``inv`` attribute for a class to qualify as a virtual subclass.

Closes #86.
2019-02-13 19:50:22 -05:00
jab e9e1c41c28 [docs] update thanks, codefund 2019-02-03 20:00:32 -05:00
jab e05785458a [docs] enable next/previous links in bottom relbar 2019-02-03 19:56:49 -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 0a468172b8 pass -U --upgrade-strategy=eager to pip install 2019-01-08 07:46:38 -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 a3fd16b6f7 Travis build improvements. 2018-12-30 15:03:42 -05:00
jab 36e28358dc improve hypothesis tests and .travis.yml, add compat.collections_abc and namedbidict.{_keyname,_valname} 2018-12-29 13:13:06 -05: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 5afd8e8a75 tweaks to build-docs script 2018-12-27 20:30:29 -05:00
jab cc31a47bb1 build universal wheels (for python 2 and 3)
closes #83
2018-12-11 13:22:17 -05:00
jab 6ec9a4a2e2 add comment explaining pylint<2.2 pin 2018-12-11 13:21:18 -05:00
jab e443b0fe18 Clarify language about __hash__ with custom __eq__
Closes #82.
2018-12-08 13:05:58 -05:00
jab abaa483ddd Travis: allow_failures for docs-linkcheck
Otherwise flaky linked sites break the build too often.
2018-11-22 20:36:17 -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 e70816c6fa prepare for v0.17.4 release 2018-11-13 21:51:15 -05:00
jab ba6e1fff13 Add tests for better bidict.compat.{iter,view}* compatibility
No longer assume the target object implements these methods on Python 2.
Update compat autodocs.
2018-11-13 21:38:59 -05:00
jab 3a8339d29c OrderedBidict optimizations and code improvements.
Use bidicts for the backing ``_fwdm`` and ``_invm`` mappings,
obviating the need to store key and value data in linked list nodes.

Also drop the unnecessary ^ from the namedtuple identifier regexes.
2018-11-06 16:10:03 -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 204486026b include referral query params in tidelift urls 2018-10-17 11:21:45 -04:00
jab cec2d51de2 docs tweaks, tidelift 2018-10-17 11:16:43 -04:00
jab 55e5de3633 docs tweaks, incl. donate badge in sidebar 2018-10-06 10:47:03 -04:00
jab 8a0460613a CI tweaks. Default to Xenial, Python 3.7, and VM env on Travis. 2018-10-06 09:51:49 -04:00