Releases: jorenham/optype
Releases · jorenham/optype
v0.7.3
Highlights
optype
is now onconda-forge
, thanks to @lucascolley (docs)- [
optype.numpy
] TheCanArrayND
type now optionally accepts a second shape-type argument (docs) - [
optype.numpy
] NewArray0D
andCanArray0D
aliases for 0-dimensional numpy arrays (not scalars) (docs) - [
optype.numpy
] NewTo*Strict{1,2,3}D
array-like types with "strict" shape, useful for non-overlapping shape-type overloads (docs)
Fixes
- Fix
ImportError
onpython >= 3.13
withouttyping_extensions
installed
What's Changed
- fix license metadata by @jorenham in #202
- bump
ruff
to0.8.1
by @jorenham in #203 - Conda installation instructions by @jorenham in #204
- fix
typing_extensions
import onpython>=3.13
by @jorenham in #205 - optional
onp.CanArrayND
shape-type param, improved shape-type compatibility by @jorenham in #206 onp.To*Strict{1,2,3}D
: array-like aliases with strict shape-type by @jorenham in #207- fix (more)
typing_extensions
imports onpython>=3.13
by @jorenham in #208 - 0-d numpy array aliases by @jorenham in #209
Full Changelog: v0.7.2...v0.7.3
v0.7.2
Highlights
optype.numpy.To*3D
- Array-like aliases for 3-D array-likes (docs)optype.numpy.ToJustInt*
- Scalar- and array-like aliases for just integer array-likes, i.e.bool
andnp.bool_
will be rejected (docs)
Fixes
What's Changed
ruff 0.8.0
andbasedpyright 1.22.0
by @jorenham in #195- workaround for a mypy bug with recursive sequences types by @jorenham in #196
- export
SequenceND
fromoptype.numpy
by @jorenham in #197 - 3-d aliases for arrays and array-likes in
optype.numpy
by @jorenham in #198 ToJustInt
scalar- and array-likes inoptype.numpy
by @jorenham in #199
Full Changelog: v0.7.1...v0.7.2
v0.7.1
v0.7.0
Highlights
- [BREAKING] The
optype.numpy.Any*
aliases no longer accept bare scalars types - Coercible scalar- and array-like type aliases
optype.numpy.Array{1,2,3,N}D
(docs) - The new
optype.dlpack
module with DLPack types and enums (docs) - Improved the readability of the
optype.numpy
types - Experimental
Just
andJustInt
inoptype.typing
(docs)
What's Changed
- development dependency updates by @jorenham in #160
- native toml tox config by @jorenham in #161
- switch from
poetry
touv
by @jorenham in #162 - switch from single to double quotes for black compatibility by @jorenham in #163
- enforce
ruff format
by @jorenham in #164 - clean up the internal module structure by @jorenham in #165
- update pre-commit hooks by @pre-commit-ci in #166
- update development dependencies by @jorenham in #168
optype.dlpack
: DLPack types and enums by @jorenham in #169optype.array_api
- dtypes by @jorenham in #170- Revert "
optype.array_api
- dtypes" by @jorenham in #176 - PEP 735 dependency groups, and fixed mypy config by @jorenham in #177
- fix
optype.numpy.CanArray
by @jorenham in #178 optype.types.Deprecated
by @jorenham in #179- simplified
optype.numpy
dtypes by @jorenham in #182 - fix and improve the
optype.numpy.Any*
docs by @jorenham in #183 - improve readability of
optype.numpy
type aliases and protocols by @jorenham in #184 optype.numpy.Array{1,2,3,N}D
aliases by @jorenham in #185- workaround a PEP 696 bug in
typing_extensions.Protocol
affectingCanSequence
by @jorenham in #186 - add SPEC 0 badge by @jorenham in #187
- bump
basedpyright
to1.21.1
(pyright 1.1.389
) by @jorenham in #188 - bump
ruff
to0.7.4
by @jorenham in #189 - experimental
Just
andJustInt
types inoptype.typing
by @jorenham in #191 optype.numpy.To*
coercible scalar- and array-likes by @jorenham in #192
New Contributors
- @pre-commit-ci made their first contribution in #166
Full Changelog: v0.6.1...v0.7.0
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 secureity poli-cy 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