Repository navigation
What's Changed
- Add parentheses to repr of compound predicates by @mrijk in #256
- Resolve postponed annotations in spec and instrumentation (#260) by @mrijk in #271
- Add SpecViolationError for spec failures (#267) by @mrijk in #272
- Support 'raises' in exercise and add InvalidSpecError (#264) by @mrijk in #273
- Instrument staticmethods and classmethods in instrument_class (#261) by @mrijk in #275
- Cap pre rejection sampling in exercise and drop legacy error bases (#266) by @mrijk in #276
- Add is_valid_spec_p predicate (#274) by @mrijk in #277
- Handle Never, NoReturn and LiteralString in annotation_to_predicate (#278) by @mrijk in #279
- Accept int for float annotations in annotation_to_predicate (#278) by @mrijk in #280
- Add ret_name to Spec to avoid fn clash with a 'ret' parameter (#262) by @mrijk in #281
- Check *args/**kwargs annotations per element in instrument (#259) by @mrijk in #282
- Clearer error when exercise can't derive a spec from annotations (#268) by @mrijk in #285
- Pass *args and positional-only params positionally in exercise (#284) by @mrijk in #286
- Add generators for generic aliases, Signature and type; fix generated-lambda crash (#284) by @mrijk in #287
- Add missing annotations to public functions (#284) by @mrijk in #288
- Derive spec predicates from annotations the same way in instrument and exercise (#265) by @mrijk in #289
- Fix generator and annotation bugs found by exercising the package (#290) by @mrijk in #291
- Add generator for enum types (#295) by @mrijk in #297
- Add generators for bytes, date, time, timedelta and paths (#293) by @mrijk in #298
- Add generators for Decimal, typing.Supports*, Sized and re.Pattern (#300) by @mrijk in #301
- Compute signature once, deduplicate sync/async wrappers, name failing parameter in instrument (#270) by @mrijk in #302
- Add a global switch to disable instrumentation (#269) by @mrijk in #303
- Add is_named_tuple_p and generators for NamedTuple classes (#305) by @mrijk in #307
- Fix exercise failures from #290 that don't need a spec by @mrijk in #308
- Check tuple[int, ...] item types and empty tuple[()] (#278) by @mrijk in #309
- Check collections.abc generic item types and generate values for them (#278) by @mrijk in #310
- Pin pytest below 9.2 until pytest-benchmark supports it by @mrijk in #319
- Treat object annotations like Any so exercise can generate values (#312) by @mrijk in #318
- Resolve names imported only under TYPE_CHECKING in exercise and instrument (#292) by @mrijk in #325
- Fix TYPE_CHECKING name resolution for partial from-imports and rewritten module (#327, #329) by @mrijk in #328
- Resolve quoted names inside type aliases imported from another module (#333) by @mrijk in #334
- Add generators for slice, range, struct_time, tzinfo, exceptions, ForwardRef and CodeType by @mrijk in #335
- Skip unannotated *args and **kwargs when deriving a spec from function annotations (#320) by @mrijk in #337
- Support type[TypeVar], typing.IO annotations and TypeVars defined under TYPE_CHECKING by @mrijk in #338
- Resolve string TypeVar bounds, type[None], type[Generic[...]] and type[A | B] by @mrijk in #340
- Use TypeVar bounds for plain T and support type[NamedTuple] / type[TypedDict] by @mrijk in #341
- Add generators for asyncio event loops, ast nodes, LogRecord and Logger by @mrijk in #342
- Check TypedDict annotations per key instead of with isinstance (#283) by @mrijk in #344
- Treat annotations that can't be evaluated at runtime as Any, with a warning (#292) by @mrijk in #345
- Unwrap NewType, Annotated and PEP 695 type aliases in annotation_to_predicate (#278) by @mrijk in #346
- Use the Any fallback for TypeVar bounds and TypedDict / NamedTuple fields too (#292) by @mrijk in #347
- Generate Iterator / Generator values and skip private parameters with a default by @mrijk in #348
- Check **kwargs typed with Unpack[TypedDict] against the TypedDict (#343) by @mrijk in #349
- Generate concrete Predicate subclasses in exercise by @mrijk in #351
- Generate instances of classes from their fully annotated init (#305) by @mrijk in #352
- Generate a concrete subclass for an abstract class annotation (#354) by @mrijk in #355
- Generate subclasses of informal abstract base classes (#358) by @mrijk in #359
- Build predicate classes without a dedicated generator from their init by @mrijk in #360
- Generate Parameter and IP network values, name generated callables by @mrijk in #361
- Check hashability with hash() before building a set in generate_all_p by @mrijk in #363
- Make 13 module-internal helpers private by @mrijk in #364
- Support callables without name in instrument and exercise (#362) by @mrijk in #367
- Fix RecursionError from optimizer rewrite rules that undo each other by @mrijk in #368
- Generate the empty collection once, not at the start of every stream (#356) by @mrijk in #370
- Let match_p work with any single-item predicate by @mrijk in #371
- Generate Iterable[X] values with items of type X (#372) by @mrijk in #373
- Optimize any_p(always_true_p) to is_not_empty_p, not always_true_p (#369) by @mrijk in #374
- Generate collections of a type variable with items of one type (#375) by @mrijk in #376
- Generate Callable[[A], R] arguments that return values of type R (#296) by @mrijk in #377
- Pass no keywords for a plain **kwargs in exercise, unless the spec names it (#306) by @mrijk in #379
- Generate values for not_in_p with an empty set by @mrijk in #381
- Generate nothing for empty ranges instead of hanging by @mrijk in #382
- Generate existing classes for a metaclass annotation (#357) by @mrijk in #383
- Check and generate annotated-types constraints in Annotated[T, ...] (#384) by @mrijk in #385
- Generate AsyncIterable[T] and Awaitable[T] values (#315) by @mrijk in #386
- Run the body of generator functions in exercise (#380) by @mrijk in #387
- Dont generate negative lengths by @mrijk in #389
- Implement autowrap callables by @mrijk in #390
- feat: add is_partial_p predicate by @ShahadatTest in #392
- Implement #238 by @mrijk in #393
- Feat/258 bind type variables by @mrijk in #394
- Add complexipy by @mrijk in #396
New Contributors
- @ShahadatTest made their first contribution in #392
Full Changelog: v1.10.0...v1.11.0