All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.All notable changes to this project will be documented in this file.
Bytes.split_at
Vec.split_at
Iterator.chunks
MaybeUninit.array_assume_init
MaybeUninit.array_assume_init_mut
Bytes.zeroed
Bytes.to_vec
Bytes.fill
Bytes.swap
Bytes.swap_unchecked
Bytes.truncate
Bytes.split_off
Bytes.split_first
Bytes.split_last
Bytes.remove
Bytes.swap_remove
Vec.swap
Vec.swap_unchecked
Vec.fill
Iterator.sum
Iterator.position
Iterator.fold
- Greatly improved the speed of some
Vec
methods. - Renamed
HashMap.new_mut
toHashMap.from_mut
- Specialized implementation for
iter.repeat
HashMap
Bytes.chars
Bytes.as_ptr
Iterator.collect_into
Option.insert
Option.get_or_insert
Option.get_or_insert_with
Option.ok_or
Option.ok_or_else
Option.zip
Option.zip_with
Option.inspect
- Improved performance by removing
nothing_unchecked
calls from methods that returnOption[T]
by replacing withNOTHING
constant. MaybeUninit
no longer exported to top level.Option.into_inner
renamed toOption.transpose
Lazy
andLazyFuture
now take a closure that initialize the value at first access instead of calling.set
manually.- Renamed
Bytes.as_bytes
toBytes.to_bytes
Option.as_ref
Option.as_mut
Cell
andRefCell
conversion
interfacesInto
,From
,TryInto
andTryFrom
.count
,index
andsort
methods toVec
.macos
alias todarwin
fortarget_os
.ios
support totarget_os
.- impl
Bytes
- starting from this release, all collections are moved to
collections
instead of being in top-level. of course, core implementations such asVec
are still at top level.
MaybeUninit[T]
type.Iterator
interface which representsIterator
trait in Rust- Default external adapters for
Iterator
. Vec.push_within_capacity
Vec.reserve
Some.take_if
iter.repeat
Option.take
now returnOption[T]
instead ofNone
- Stabilized
Vec.with_capacity
and its fellow methods. - Calling
RefCell.copy
now increment its ref count when called. - The repr of
Some(None)
is nowNone
instead ofSome(None)
- Passing a
list
variable when constructing aVec
now will point to that list instead of copying it. - Better documentation on
Vec
vec.vec
is renamed tovec.from_args
iter.empty
now returnsEmpty[T]
instead ofIter[Never]
with better type hinting.- Better
repr
for iterators. - Changed the default value of
Some
fromNoneType
toSome(None)
@doc
decorator.- The
Result
type includingOK
andErr
. Vec[T]
type.Error
type.Box[T]
type. This is not the same as rust'sBox
, Check the object documentation.sync
package which contains the following modules. they're object safe.lazy.Lazy[T]
andlazy.LazyFuture[T]
.once.AsyncOnce[T]
andonce.Once[T]
.
Iter.sink
method.RefCell
received two methods,increment
anddecrement
which increments the ref count of the object its holding.
- Iterating over
Iter
object withfor
doesn't returnOption[T]
anymore. - Type hint
Option
isn't required to be underTYPE_CHECKING
anymore. futures.spawn
now returnsResult[T, E]
and doesn't raise.Iter.async_for_each
now returnsResult[T, E]
and doesn't raise.ref.AsRef
is nowcell.Cell
,ref.AsMut
is nowcell.RefCell
.
Once
type.Iter.next
now returnssain.Option[T]
instead oftyping.Optional[T]
..copied
,by_ref
,.async_for_each
methods to theIter
.empty
function insain.iter
module.once
function insain.iter
module.Some.iter
method to theSome
object.option.NOTHING
default constant.
- method
Iter.discard
in favor ofIter.filter
method.
casting
parameter inIter.collect
renamed tocast
.
- New decorators defined in module
macros.py
todo
unimplemented
deprecated
futures
module which exports usefull functions forasync
programming.Some.unwrap_unchecked
method.
- Python
3.10+
is now required to install sain. - Use the
collections.abc
andbuiltins
for the standard types. - You need to import
__futures__ annotations
to useOption<T>
type hint, You also need to import it underTYPE_CHECKING
. - Project tree restructure.
- The
Drop
check is now deprecated and no longer can be used. - The standard types not do not inherit from
Default<T>
- Drop
pkg_resources
module for__import__
duringrequires_modules
attrs check..
- The
Drop
protocol from top-level.
- Examples
- Proper documentation.
Drop
protocol anddrop
function.RefMut
type andas_mut
.- Tests
Default
is now slotted.pyi
stubs.
- The
Some
type__str__
now returnsSome(repr(value))
instead of justrepr(value)
. Ref
now supports__hash__
.target_os
no acceptswindows
as an alias towin32
.
Some.is_none_and
method since it made no sense.
sain.cfg()
wasn't working correctly.
- A type alias
Option[T]
forSome[T]
.
- Export modules to top level.
-
First push
-
Added target arch + python impl options.
-
Some[T], Default[T], Ref[T], Iter[T] types.
- requires_modules option now accepts a sequence instead of tuple.
- Fixed a bug where
cfg
was always returningTrue
.