Skip to content

Sync to main attrs repo #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Oct 31, 2018
Merged

Sync to main attrs repo #1

merged 29 commits into from
Oct 31, 2018

Conversation

gabbard
Copy link
Owner

@gabbard gabbard commented Oct 31, 2018

Pull Request Check List

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!

  • Added tests for changed code.
  • New features have been added to our Hypothesis testing strategy.
  • Changes or additions to public APIs are reflected in our type stubs (files ending in .pyi).
  • Updated documentation for changed code.
  • Documentation in .rst files is written using semantic newlines.
  • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.
  • Changes (and possible deprecations) have news fragments in changelog.d.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

Ryan Gabbard and others added 29 commits August 20, 2018 06:46
* First stab at implementing hashcode caching (#423)

Currently all existing tests pass but no cache_hash tests have yet
been added.

* Existing hash tests now pass on cache_hash classes

* Add towncrier change log

* Add documentation for cache_hash

* Fixes bug with check that init=True if cache_hash=True

* Fix long lines

* Fix documentation issues

* Add test for cache_hash requiring init

* Improve test coverage

* Remove now unnecessary 'pass'

* Add periods to the end of exception strings

* Add test docstrings for cache_hash tests

* Clarify documentation of cache_hash

* Recommend that hashable classes be frozen

* Fix test references for exception messages
* Allow attributes to be called property and itemgetter

* Add newsfragment
* Add weakref parameter to attr.s()

#325

* Add weakref to simple_classes() strategy

* Rename changelog file with actual PR (420.change.rst)

* Add test_weakref_does_not_add_a_field()

* Add docstrings to new weakref tests

* Add missing blank line

* Correct weakref handling of __weakref__ attributes or an inherrited slot

* Correct typos and terms

* Rename to weakref_slot

* Parametrize more tests against weakref_slot True/False to expose trouble

* Check if __weakref__ has been inherited via a __dict__

* Correct copy/pasted comment

* Change weakref_slot default to True

* Tidy and correct weakref -> weakref_slot
* Allow to override class vars of super classes w/ annotations

Fixes #427

* Add newsfragment
* Make _Nothing a singleton

* Satisfy linter

* Correct rst syntax
Thanks to ABCs, "base class" is more Python than "superclass" and the latter is
also slightly confusing by alluding to "super" and/or being judgy.
- mention that attr.s() has to be updated by hand
- encourage to tick boxes that do not apply
This removes errors in attrs library when using
mypy setting: `disallow_any_generics = True`

Fixes #441
This PR adds `python_requires` into `setup.py` to prevent `pip` from installing `attrs` in unsupported python versions.

I know that currently `attrs` supports a wide range of python versions but I think that it's always good to have some sanity check =)
@gabbard gabbard merged commit 3cdeda6 into gabbard:master Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.