Releases: jorenham/optype
Releases · jorenham/optype
v0.6.1
This is a bugfix release with no breaking changes.
However, because optype
now uses less typing.Any
, which could cause type-checkers to report errors that were previously hidden.
Highlights
- Stricter type-checking with basedmypy.
- Removed almost all
typing.Any
uses. See numpy/numpy#27211 for whyAny
is evil. - Fixed several typing errors with numpy 2.1.
What's Changed
- Farewell git-flow by @jorenham in #151
- Add security policy by @jorenham in #152
- Add a sponsor button by @jorenham in #153
- basedmypy by @jorenham in #154
- Bump NumPy to 2.1.0 by @jorenham in #155
- basedmypy badge by @jorenham in #156
- optype 0.6.1 by @jorenham in #157
Full Changelog: v0.6.0...v0.6.1
v0.6.0
Highlights
- Mypy support (strict mode)
- Beartype support
- New standard library modules
- Improvements to
optype.numpy
(it's still optional)- NumPy 2.1 support
- Improved docs
- Shape type aliases`
- Support for
numpy.dtypes.StringDType
(numpy >= 2
) - Reworked
Any*Array
andAny*DType
Breaking changes
- Increased the minimum Python version from 3.10.0 to 3.10.1
- Increased the minimum
typing_extensions
version from 4.7 to 4.8 - Moved
CanCopy
,CanDeepcopy
andCanReplace
fromoptype._
tooptype.copy._
- Moved
HasDataclassFields
fromoptype._
tooptype.dataclasses._
- Moved
CanGetnewargs[Ex]
,CanReduce[Ex]
, andCan{Get,Set}state
fromoptype._
tooptype.pickle._
Any*Array
andAny*DType
forint_
,float64
andcomplex128
don't includeint
,float
, andcomplex
anymore. See numpy/numpy#27032 (comment) for why this was done.
Full Changelog: v0.5.0...v0.6.0
v0.5.0
Release highlights
optype.numpy
: (optional) NumPy (1 & 2) typing protocols and aliases, see the docs the details- Implement PEP 696 type parameter defaults
*Self
aliases for the context managerCan*
interfaces*Self
aliases for the inplace operandCanI*
interfaces- Many documentation fixes & improvements
- Simplified local development using Tox
Breaking changes
typing_extensions
is now required for all Python versions <3.13
What's Changed
- bump basedpyright to 1.10.2 by @jorenham in #49
- bump ruff to 0.4.0 by @jorenham in #50
- bump basedpyright to 1.10.3 by @jorenham in #51
- bump ruff to 0.4.1 by @jorenham in #52
- use
repo-review
andtox
by @jorenham in #53 - Fix example code formatting issues in README.md by @jorenham in #54
- Bump ruff from 0.4.1 to 0.4.2 by @dependabot in #56
- Bump basedpyright from 1.10.3 to 1.10.4 by @dependabot in #57
- Bump sp-repo-review from 2024.3.10 to 2024.4.23 by @dependabot in #58
- Bump pytest from 8.1.1 to 8.2.0 by @dependabot in #59
- Bump tox from 4.14.2 to 4.15.0 by @dependabot in #60
- Update development dependencies by @jorenham in #77
- Bump basedpyright to 1.12.6 by @jorenham in #79
- Improved pre-commit & markdownlint config by @jorenham in #80
- Use pre-commit within tox by @jorenham in #81
- Bump scientific-python/repo-review from 0.10.6 to 0.11.0 by @dependabot in #63
- Defaults for generic type parameters by @jorenham in #78
- Add
*Self
aliases for the augmented binopCanI*
interfaces by @jorenham in #82 - Add missing overloads to
DoesI*
inplace binary operator callable protocols by @jorenham in #83 - Bump ruff to 0.4.9 by @jorenham in #84
*Self
aliases for the unary arithmetic operand interfaces by @jorenham in #85- add
*Self
aliases for context manager interfaces by @jorenham in #86 - Prefer
typing_extensions
imports forProtocol
andruntime_checkable
by @jorenham in #87 - Test using beartype by @jorenham in #88
- bump basedpyright to 1.13.0 by @jorenham in #91
optype.numpy
: interfaces and type-aliases for numpy by @jorenham in #55- Use the new basedpyright pre-commit hook by @jorenham in #92
- Bump ruff to 0.4.10 by @jorenham in #93
- Add the
optype.inspect
module by @jorenham in #94
Full Changelog: v0.4.0...v0.5.0
v0.4.0
The minimum required Python version has been lowered from 3.12 to 3.10.
What's Changed
- Bump
basedpyright
to 1.10.0 by @jorenham in #41 - basedpyright badge by @jorenham in #42
- bump ruff to 0.3.7 and basedpyright to 1.10.1 by @jorenham in #43
- Add pypi classifiers and project urls by @jorenham in #44
- Add
CONTRIBUTING.md
andCODE_OF_CONDUCT.md
by @jorenham in #45 - Run markdownlint in the CI workflow by @jorenham in #46
- Support for Python 3.11 and 3.13 by @jorenham in #47
- Support for Python 3.10 by @jorenham in #48
Full Changelog: v0.3.1...v0.4.0
v0.3.1
v0.3.0
What's Changed
- Fix
CanAIterSelf
not being anAsyncGenerator
subtype by @jorenham in #17 - upgrade pyright to 1.1.355 by @jorenham in #18
- several doc fixes and improvements by @jorenham in #27
- add ops for
__reversed__
and__missing__
by @jorenham in #28CanSequence[I: CanIndex, V]
(combinesCanLen
andCanGetitem[I, V]
)do_reversed: DoesReversed
(type-corrected alias forbuiltins.reversed
)do_missing: DoesMissing
(calls.__missing__()
)
- Interfaces for the
copy
standard library by @jorenham in #29CanCopy[T]
andCanCopySelf
CanDeepcopy[T]
andCanDeepcopySelf
CanReplace[T, V]
andCanReplaceSelf[V]
- Interfaces for the
pickle
standard library by @jorenham in #30CanReduce[R: str | tuple]
CanReduceEx[R: str | tuple]
CanGetState[S]
CanSetState[S]
CanGetnewargs[*Args]
CanGetnewargsEx[*Args, Kw]
- upgrade to ruff 0.3.4 by @jorenham in #31
- Interfaces for the
dataclasses
standard library by @jorenham in #32HasDataclassFields
Full Changelog: v0.2.2...v0.3.0
v0.2.2
What's Changed
- fix incorrect
optype.do_ne
annotation by @jorenham in #10 - fix incorrect
optype.DoesIMod
annotation by @jorenham in #11 - upgrade to ruff 0.3.3 by @jorenham in #12
- add docstrings for some
Can*
types by @jorenham in #13 - add
CanIterSelf[+V]
andCanAIterSelf[+V]
by @jorenham in #14 - add typed ops for
__len__
and__length_hint__
by @jorenham in #15
Full Changelog: v0.2.1...v0.2.2
v0.2.1
What's Changed
- Bump pytest from 8.0.2 to 8.1.1 by @dependabot in #5
- Bump pyright to 1.1.354 by @jorenham in #6
- Configure markdownlint by @jorenham in #7
- Builtin type constructor operators by @jorenham in #8
do_bool: DoesBool
do_int: DoesInt
do_float: DoesFloat
do_complex: DoesComplex
do_bytes: DoesBytes
do_str: DoesStr
- Examples & integration tests by @jorenham in #9
- See the
examples/
directory
- See the
New Contributors
- @dependabot made their first contribution in #5
Full Changelog: v0.2.0...v0.2.1
v0.2.0
What's Changed
- add 72 operators as
optype.do_*
, so thatoptype
>operator
- add callback protocols for the 72 operators as
optype.Does*
- Many documentation improvements
- [BREAKING] renamed the async
CanA{name}
types asCanA{Name}
, improving readability - Fixed several minor typing issues
- Improved code quality of the tests
- Streamlined the CI workflow
- Upgrade ruff to 0.3.2, and tightened some rules
- Upgrade pyright to 1.1.353
Full Changelog: v0.1.0...v0.2.0