* Allow converter.optional to take a converter such as converter.pipe as its argument
* Only turn optional into a Converter if needed
* Move call to Converter constructor to the end of optional()
The constructor consumes __annotations__, so move the constructor call to after those have been set on the optional_converter function
* Update tests/test_converters.py
* Update tests/test_converters.py
---------
Co-authored-by: Hynek Schlawack <hs@ox.cx>
* allow __suppress_context__ to be mutated on frozen exceptions
* add changelog
* and __notes__! lets' not forget that.
* add notes to news
* add tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* fix improt
* fix test
* fix tests again
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Document how to handle class variables/constants in typed syntax
This is mentioned very briefly in the API docs for `auto_attrib` but
it's not easy to find if you don't already know about `typing.ClassVar`.
* Fix typo
* 2 empty lines before headers
---------
Co-authored-by: Hynek Schlawack <hs@ox.cx>
It took me a bit to figure out what was meant by the link to the
characteristic issue and why there is no such thing as a private
argument. Incorporate (my understanding of) the meaning inline and also
provide an example of how to work around the _1 syntax error.
Some time ago, it was discovered that Git archives having
`ref-names: $Format:%D$` in `.git_archival.txt` may change when
references existing in the repository change over time [[1]]. This
means that downloading an archive for a commit from an immutable URL
may start yielding slightly different results. This hurts the ability
of downstreams to source projects from Git archive URLs.
With that in mind, modern `setuptools-scm` advises against having this
entry in the `.git_archival.txt` template [[2]]. And this patch
implements said recommendation.
[1]: https://github.com/pypa/setuptools_scm/issues/806
[2]: https://setuptools-scm.readthedocs.io/en/latest/usage/#git-archives
* Make Converter a kind of adapter, fix converters.pipe
* Fix import cycle on 3.7/8
* stray space
* Create static __call__ on Converter instantiation
* Add tests for adapters doing passing correct args
* Add news fragment
* Restore basic functionality on 3.14[sic]
Essentially switch to PEP 649 / 749 for annotations. Some tests need to
be skipped for now, but the rest is working.
Fixes#1326
* Add news fragment
* We have not 3.14 CI yet
* Use imprerative xfails instead of skips