Skip to content
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

Sync up to attrs master #2

Merged
merged 18 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ You don't need to install ``towncrier`` yourself, you just have to abide by a fe
- For each pull request, add a new file into ``changelog.d`` with a filename adhering to the ``pr#.(change|deprecation|breaking).rst`` schema:
For example, ``changelog.d/42.change.rst`` for a non-breaking change that is proposed in pull request #42.
- As with other docs, please use `semantic newlines`_ within news fragments.
- Wrap symbols like modules, functions, or classes into double backticks so they are rendered in a monospace font.
- Wrap arguments into asterisks like in autodocs: *these* or *attributes*.
- Wrap symbols like modules, functions, or classes into double backticks so they are rendered in a ``monospace font``.
- Wrap arguments into asterisks like in docstrings: *these* or *attributes*.
- If you mention functions or other callables, add parentheses at the end of their names: ``attr.func()`` or ``attr.Class.method()``.
This makes the changelog a lot more readable.
- Prefer simple past tense or constructions with "now".
Expand Down Expand Up @@ -237,7 +237,7 @@ Thank you for considering contributing to ``attrs``!
.. _`backward compatibility`: https://www.attrs.org/en/latest/backward-compatibility.html
.. _tox: https://tox.readthedocs.io/
.. _pyenv: https://github.com/pyenv/pyenv
.. _reStructuredText: http://www.sphinx-doc.org/en/stable/rest.html
.. _reStructuredText: https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html
.. _semantic newlines: http://rhodesmill.org/brandon/2012/one-sentence-per-line/
.. _examples page: https://github.com/python-attrs/attrs/blob/master/docs/examples.rst
.. _Hypothesis: https://hypothesis.readthedocs.io/
Expand Down
18 changes: 12 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,25 @@ repos:
rev: 18.9b0
hooks:
- id: black
language_version: python3.6
language_version: python3.7
# override until resolved: https://github.com/ambv/black/issues/402
files: \.pyi?$
types: []

- repo: https://github.com/asottile/seed-isort-config
rev: v1.2.0
rev: v1.5.0
hooks:
- id: seed-isort-config
language_version: python3.6

- repo: https://github.com/pre-commit/mirrors-isort
rev: v4.3.4
hooks:
- id: isort
language_version: python3.6
language_version: python3.7

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: debug-statements
- id: flake8
language_version: python3.7
43 changes: 24 additions & 19 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dist: trusty
dist: xenial
group: travis_latest
sudo: false
cache:
directories:
- $HOME/.cache/pip
Expand All @@ -12,7 +11,18 @@ matrix:
fast_finish: true

include:
# lint
- python: "3.7"
stage: lint
env: TOXENV=lint
- python: "3.7"
env: TOXENV=manifest
- python: "3.7"
env: TOXENV=typing

# test
- python: "2.7"
stage: test
env: TOXENV=py27
- python: "3.4"
env: TOXENV=py34
Expand All @@ -22,35 +32,30 @@ matrix:
env: TOXENV=py36
- python: "pypy"
env: TOXENV=pypy
dist: trusty
- python: "pypy3"
env: TOXENV=pypy3
dist: trusty
- python: "3.7"
env: TOXENV=py37
dist: xenial
sudo: true

# Prevent breakage by a new releases
- python: "3.6-dev"
env: TOXENV=py36
# Prevent breakage by new releases
- python: "3.7-dev"
env: TOXENV=py37

# Meta
- python: "3.6"
env: TOXENV=lint
- python: "3.6"
env: TOXENV=manifest
- python: "3.6"
# Docs
- python: "3.5"
stage: docs
env: TOXENV=docs
- python: "3.6"
env: TOXENV=readme
- python: "3.6"
- python: "3.7"
stage: doctest
env: TOXENV=doctest
- python: "3.7"
env: TOXENV=pypi-description
- python: "3.7"
env: TOXENV=changelog
- python: "3.6"
env: TOXENV=typing

allow_failures:
- python: "3.6-dev"
- python: "3.7-dev"


Expand Down
7 changes: 2 additions & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
include LICENSE *.rst *.toml .readthedocs.yml .pre-commit-config.yaml

# Don't package GitHub-specific files.
exclude .github/*.md .travis.yml codecov.yml
include LICENSE *.rst *.toml *.yml *.yaml
graft .github

# Stubs
include src/attr/py.typed
Expand All @@ -10,7 +8,6 @@ recursive-include src *.pyi
# Tests
include tox.ini .coveragerc conftest.py
recursive-include tests *.py
recursive-include .github *.rst

# Documentation
include docs/Makefile docs/docutils.conf
Expand Down
9 changes: 9 additions & 0 deletions changelog.d/425.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Add ``is_callable``, ``deep_iterable``, and ``deep_mapping`` validators.

* ``is_callable``: validates that a value is callable
* ``deep_iterable``: Allows recursion down into an iterable,
applying another validator to every member in the iterable
as well as applying an optional validator to the iterable itself.
* ``deep_mapping``: Allows recursion down into the items in a mapping object,
applying a key validator and a value validator to the key and value in every item.
Also applies an optional validator to the mapping object itself.
2 changes: 1 addition & 1 deletion changelog.d/443.change.rst
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fixes stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option.
Fixed stub files to prevent errors raised by mypy's ``disallow_any_generics = True`` option.
1 change: 1 addition & 0 deletions changelog.d/450.change.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Attributes with ``init=False`` now can follow after ``kw_only=True`` attributes.
2 changes: 1 addition & 1 deletion docs/_static/attrs_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading