Commit Graph

50 Commits

Author SHA1 Message Date
Hynek Schlawack 108c792ec8 Fix long description 2020-11-20 10:13:38 +01:00
Hynek Schlawack 06d0f8eda6 Add funding URLs to metadata 2020-11-05 10:42:13 +01:00
Hynek Schlawack 0343927ecd Fix theme dependency 2020-10-05 06:39:48 +01:00
Paul Ganssle dfb2ee284d
Make `zope` a semi-optional test dependency (#685) 2020-09-03 06:56:17 +02:00
Hynek Schlawack 2cf05a9368 Add 3.9 2020-08-24 09:26:22 +02:00
Hynek Schlawack 2f6fd8516c
Add on_setattr hooks to attr.s and attr.ib (#660)
* Add on_setattr hooks to attr.s and attr.ib

Signed-off-by: Hynek Schlawack <hs@ox.cx>

* Add PR newsfragment

* Fix attr.s doc sig

* Make _DisableType private

* Mark setters.frozen as NoReturn

* Rename setters.DISABLE to setters.NO_OP to clarify its purpose

DISABLE sounds less purposeful and doesn't convey its meaning as well.

* Fix type

* Loosen up type for convert even further

* Tighten type a tiny bit
2020-07-20 12:43:10 +02:00
Jürgen Gmach cf0adc5d12
Fix typo in `setup.py` (#656)
This typo was noticed when copy/pasting the `read` function into my own
`setup.py`.

Thanks a lot, Hynek!

modified:   setup.py
2020-06-27 14:43:38 +02:00
Hynek Schlawack 609b10e84f Refactor docs and switch to RTD theme
Our API docs are much more readable on it.

Remove testimonials, they don't serve that much and take up space.

Slightly refactor main docs page.
2020-03-08 07:46:56 +01:00
Hynek Schlawack ac541fbe55 Add version constraints for coverage 2020-01-09 12:34:38 +01:00
Hynek Schlawack 495968281c
Officially drop Python 3.4 (#608) 2020-01-06 12:32:28 +01:00
Hynek Schlawack 6fcb759862 Put coverage config into pyproject.toml 2020-01-06 09:14:24 +01:00
Hynek Schlawack e67cc51930 Unpin coverage
The problem was fixed in coverage 5.0.2.
2020-01-06 08:45:50 +01:00
Hynek Schlawack aa55c68efd Pin coverage to <5.0 for now
Getting

```
Coverage.py warning: Module attr was previously imported, but not measured (module-not-measured)
```

and missing coverage for some reason. Google is not helpful.
2020-01-03 11:17:20 +01:00
Hynek Schlawack b7814c6b1f Get rid of packaging sections in setup.cfg
License files are automatically collected by pep517.
2019-10-16 20:04:20 +02:00
Hynek Schlawack 686ee940fd We totally support 3.8 2019-10-02 17:07:02 +02:00
Hynek Schlawack 55f71b9ec3
Ensure Windows users can install dev versions (#564)
* Ensure Windows users can install dev versions

* Update azure-pipelines.yml

* add forgotten ?
2019-08-19 20:55:46 +02:00
Hynek Schlawack 729681b5a8
[WIP] Set up CI with Azure Pipelines (#510)
* Set up CI with Azure Pipelines

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update azure-pipelines.yml

* Update setup.py

* Update tox.ini

* Update setup.py

* Update azure-pipelines.yml

* Update setup.py

* Update azure-pipelines.yml

* Update azure-pipelines.yml for Azure Pipelines

* Delete .travis.yml

* Update README.rst

* Update azure-pipelines.yml

* Update azure-pipelines.yml
2019-05-08 16:13:55 -04:00
Hynek Schlawack 4fe28966e8 Fix pytest dependency pytest 2019-03-07 11:40:45 +01:00
Hynek Schlawack 34efa98e92 add long_description_content_type
fixes `twine check` warning
2019-03-04 20:25:51 +01:00
William Jamir Silva 1a095d1620 Add python_requires in setup.py (#454)
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 =)
2018-10-25 12:50:37 +02:00
Hynek Schlawack 4202dcbce0 Unpin pytest, pacify new flake8 2018-10-24 12:13:44 +02:00
Hynek Schlawack 290cf2a3f0 Quench a bunch of warnings 2018-10-19 10:48:09 +02:00
Hynek Schlawack 0121f3b23c RTD supports https for external domains now! 2018-08-20 06:48:51 +02:00
Chad Dombrova de104e016b Add PEP484 stubs (#238)
* Add PEP484 stubs

* Deploy .pyi stubs alongside .py files.

This is the recommended approach for 3rd party stubs.
See: https://github.com/python/typing/issues/84#issuecomment-317217346

* Add support for the new type argument.

* Add tests for stubs and address a few issues.

* Improve declaration of private vs public objects in stubs

* More stub tests

* Separate the stub tests into their own tox env

it does not make sense to test the stubs in multiple python *runtime* environments (e.g. python 3.5, 3.6, pypy3) because the results of static analysis wrt attrs is not dependent on the runtime.  Moreover, mypy is not installing correctly in pypy3 which has nothing to do with attrs.

* Update the manifest with stub files

* Remove mypy from the dev requirements

* Allow _CountingAttr to be instantiated, but not Attribute.

* Incorporate defaults into attr.ib typing

* Fix a bug with validators.and_

* Add more tests

* Remove _CountingAttr from public interface

It is crucial to ensure that make_class() works with attr.ib(), as a result we no longer have any functions that care about _CountingAttr.

* Lie about return type of Factory

this allows for an abbreviated idiom: `x: List[int] = Factory(list)`

* Add tox stubs env to travis

* used the wrong comment character in mypy tests

* Improve overloads using PyCharm order-based approach

overloads are pretty broken in mypy.  the best we can do for now is target PyCharm, which is much more forgiving.

* Remove features not yet working in mypy. Document remaining issues.

* Test stubs against euresti fork of mypy with attrs plugin

Copied the pytest plugin from mypy for testing annotations: It is not an officially supported API and using the plugin from mypy could break after any update.

* Add some types and TypeVars to some types. Make tests pass

* Suppress warnings about named attribute access from fields()

e.g.  fields(C).x
Eventually it would be good to add support for returning NamedTuple from the mypy plugin

* Add WIP mypy-doctest plugin

* Deal with a few remaining type issues in the docs

* sphinx doctest: don't turn warnings into errors.

doing so makes the tests abort after the first failed group.

* Update "type: ignore" comments to reflect issues fixed in mypy plugin

* doctest2: improve output formatting

* Update manifest

* static tests: use inline error declarations

* More tests

* Tests passing (with notes about remaining issues)

* Attempt to get latest plugin from euresti working

* Issues fixed.

Had to place calls to attr.ib under a class definition.

* Deal with a PyCharm bug

* Minor test improvements

* Make tests prettier

* Use 2 decorators instead of 3

* doctest2: add support for skipping mypy tests

* Add tests for inheritance, eq, and cmp

* Add fixmes and todos

* Rename convert to converter

* Attribute.validator is always a single validator

* Conform stubs to typeshed coding style

And add auto_attrib kw

* backport style fixes from typeshed

* Add test cases to cover forward references and Any

* Add fixes for forward references and Any

* Address typeshed review notes

* Use Sequence instead of List/Tuple for validator arg

list and tuple are invariant and so prevent passing subtypes of _ValidatorType

* backports changes from typeshed #1914

* backport changes from typeshed #1933

* Prevent mypy tests from getting picked up

Evidently the discovery rules changed recently for pytest.

* make our doctest extension compatible with latest sphinx

* Adjustments to the tests

* Fix flake and manifest tests (hopefully)

* Fix tests on pypy3 (hopefully)

* Update stubs from typeshed

Also update tests.

* Make PEP 561-compliant

* minor cleanup

* Consolidate stub support files into stub directory

In preparation for removing them from the pyi_stubs branch.

* Get tests passing

This is a final test of the current stubs before moving the stub tests to a new branch.

* Revert stub test additions

Replace with a simple mypy pass/fail test

* get pre-commit passing

* Address review feedback

* Move typing test up in tox envlist
2018-07-12 12:19:24 +02:00
Hynek Schlawack 8707eee437 Janitor packaging 2018-06-23 11:50:49 +02:00
Hynek Schlawack a372d51b7b
Fade to Black (#392) 2018-06-10 19:40:07 +02:00
Hynek Schlawack 93eb1e4d21 Our CI pases on 3.7 2018-02-05 12:40:24 +01:00
Hynek Schlawack c601faf994 Use extras_require instead of dev-requirements.txt (#318)
* Use extras_require instead of dev-requirements.txt

* Better phrasing

* Make names reflects dir names, add docs

Keep docs-requirements.txt for now, but the plan is to get rid of it.

* Explain docs building
2017-12-29 16:11:47 +01:00
Hynek Schlawack ef9a062022
Use isort so we can stop thinking about imports (#297) 2017-11-26 22:18:07 +01:00
Hynek Schlawack 303b2f627f Activate warnings (#201) 2017-06-01 13:12:19 +02:00
Hynek Schlawack d7cdc97a2a Move version into a global variable
Simplifies scripting of releases.
2016-05-23 13:16:53 +02:00
Hynek Schlawack dfea064fa1 Meta 2016-02-20 09:34:45 +01:00
Hynek Schlawack 89b542331d Drop support for legacy Python versions
Keep 2.7 and PyPy though.
2016-02-17 12:51:02 +01:00
Hynek Schlawack 1f66134c0e Janitoring 2015-12-19 13:05:30 +01:00
Hynek Schlawack 5d66e482d8 Repo janitoring 2015-12-08 15:47:03 +01:00
Hynek Schlawack e6f9e9fac3 Simplify setup.py 2015-10-18 12:15:06 +02:00
Hynek Schlawack 4c39a185ad Move package into src directory
Prevents accidental imports when running tests.
2015-10-16 15:11:10 +02:00
Hynek Schlawack c855b08e5d Factor out more meta data 2015-09-22 14:46:57 +02:00
Hynek Schlawack f0b142382b Add Python 3.5 2015-09-22 10:41:38 +02:00
Hynek Schlawack 4855ad3651 Clean up setup.py 2015-08-11 11:16:21 +02:00
Hynek Schlawack fcd6e19932 Don't use setup.py test & pytest-cov
Mainly because the former doesn't use pip to install it's dependencies which
makes stuff potentially slow (no wheel caching) and litters the current directory.
2015-07-26 13:06:57 +02:00
Hynek Schlawack 0149b538ab Fix tests on Python 2.6
Fixes #14 and #15.
2015-07-03 11:30:53 +02:00
Hynek Schlawack fda6eddada Move keywords out of __init__ 2015-04-16 07:40:08 -04:00
Hynek Schlawack 2bd4f9d056 Start 15.1.0 cycle 2015-04-15 18:01:10 -04:00
Hynek Schlawack 46cbd75411 Consistency 2015-02-21 14:14:47 +01:00
Hynek Schlawack 3fee5ea5c6 Dedup setup.py, add more meta data 2015-02-21 14:08:36 +01:00
Hynek Schlawack 1f5513e098 Shorten creed 2015-02-21 11:36:08 +01:00
Hynek Schlawack 8bb430cf18 Add basic support for zope.interface 2015-01-29 19:04:23 +01:00
Hynek Schlawack 211bd02b97 Officially start the 15.0.0 cycle 2015-01-28 16:05:13 +01:00
Hynek Schlawack 9560908555 Initial commit
Docs aren't there yet
2015-01-27 17:53:17 +01:00