- Add
last
(#651)
- Hyperscript attrs do not work in
FT
(#642)
- Add
FT.on
(#640)
list_func
not passed recursively indict2obj
(#639)
- Add FT.set (#638)
- Add
parallel_async
(#637)
- Add
BasicRepr
(#634)
- Show instance vars in
basic_repr()
(#633) - add Path to
untar
dest (#632), thanks to @hamelsmu - Nested attr supporting keys (#631), thanks to @Isaac-Flath
dict2obj does not handle
list_func` correctly or pass it recursively (#630)
- Add
Config.find
(#628)
- Falsey attrs result in doubled tags in
to_xml
(#629)
- Handle whitespace-sensitive situations in
to_xml
automatically (#626)
- str2bool does not return a bool (#625)
- Add
ft_cls
toft
(#620)
- Add module
__getattr__
tofastcore.xml
(#619)
- Curried
risinstance
fails when passedNone
(#618)
- Add
AttrDictDefault
andextract_docstrings
(#617) - Add
do_escape
toto_xml
(#617) - add markdown to doc output (#614)
- move patched methods to parent class (#612), thanks to @comhar
- add debug=True parameter to urlsend (#611), thanks to @radam9
- Add
UNSET
singleton - nullable dataclass overhaul (#607)
- Update
nullable_dc
to useUNSET
instead ofNone
- Rename
mk_dataclass
toflexiclass
flexiclass
usesUNSET
instead ofNone
- Update
- Add
asdict
, like thedataclasses
version but works on more types - Add
is_typeddict
andis_namedtuple
- Flatten nested tuples in
ft
- The FT structure has been changed so it no longer inherits from
list
(#606).list
property added so you can still destructure it__getitem__
now returns the approach child element__add__
adds children
- stringify list values in
ft
attr vals (#602) - Allow
__ft__
methods to return tuples (#596), thanks to @Rahulbeniwal26119
- Do not update
-
to_
if special chars present inft
(#601)
- Add
FT.get(k,default)
(#600) - Add
Safe
str and return it fromto_xml
(#599) - Feat: add an
indent
flag forto_xml()
(#594), thanks to @phact
- Add
valmap
toft
(#598) - Allow embedding raw HTML inside FT templates using UTF-8 encoded bytes (#597), thanks to @adamritter
- Inline flag for
to_xml()
(#594), thanks to @phact
attrmap
and hyperscript support in fastcore.xml.FT (#595)
- add
ver2tuple
(#593)
- Allow attrs to be added to
FT
using__call__
(#591) - Experimental support for
FT.__call__
, h/t @cgarciae (#590) FT
interoperability with Django and Jinja using__html__()
protocol (#589), thanks to @collinanderson
- Rename
XT
toFT
(#586)
- Add
ValEnum
<!doctype html>
should be a void tag type (#585)
flexicache
async support- Handle exceptions in
flexicache
function (#582)
- add
flexicache
, along with policiestime_policy
andmtime_policy
(#581)
- Add
timed_cache
(#580)
- Add nullable dataclass functions (#577)
- Add
void_
attr toXT
and use for skipping closing tags into_xml
(#575)
- Unwrap
NotStr
passed toNotStr.__init__
(#574) - Provide attr get/set in
XT
(#572) - Handle non-str types in
to_xml
(#571)
- Improve formatting of single child nodes in
to_xml
(#570)
- bool args incorrectly parsed in
fastcore.xml
(#569)
- Add
parse_env
to provide similar functionality todotenv
pypi lib (#568) - Add
partition
(#567) - Add return value to
result
attr inthreaded
functions (#563)
- Add HTTP functions:
tobytes
,http_response
, andrecv_once
(#562) - Convenience props for
XT
(#561) - annotations for
get_class
/mk_class
(#560)
- Add
type2str
anddataclass_src
toxtras
(#559)
- Save orig method in
patch
andpatch_to
(#558)
- add
hl_md()
(#557) - bool value handling for
xt
(#556) - Add py2pyi (#555)
- Add attr support to
nested_idx
(#554)
- add
fastcore.xml.highlight()
(#553)
- Do not add closing tags for void tag types (#551)
- Add tuple support to
to_xml
- Add
start_proc()
- Add
process
param tothreaded
(#550) - Check for
__ft__
into_xml
- Add
xml
module for XML and HTML generation (#549) - Add
NotStr
, which behaves like astr
, but is not an instance of one (#548) - Add
NS
, aSimpleNamespace
subclass that also addsiter
anddict
support (#547)
- Add deprecated python stdlib
imghdr
to fastcore, and add additional jpeg header (#546) - Add additional numpydoc sections (#545), thanks to @dsm-72
- Revert "Python 3.12 Deprecation of
pkg_resources
" (#544)
- allow docments to parse async function definitions
- expose timeout in
urlsend
- patch classmethod not supporting subclasses correctly
- extend test_eq_type (#507), thanks to @ddobrinskiy
- PyTorch 2.0 compile compatibility, thanks to @ggosline
- fix:
console_help
excludes entrypoints from the root module (#495), thanks to @seeM - Improvements to test messages (#508), thanks to @ddobrinskiy
- fix: error in IPython while handling
HTTP4xxClientError
(#486), thanks to @seeM - fix:
Config.get
returnsFalse
instead ofNone
for missingbool
keys (#482), thanks to @seeM - params overriding
delegates
ignored incall_parse
(#473)
- Delegatee docments not appearing (#485)
- UnicodeDecodeError occurs when reading
settings.ini
file containing CJK characters on Windows (#483)
- Add more information upon HTTP request failures (#479)
- fix:
Config.get
returnsFalse
instead ofNone
for missingbool
keys (#482), thanks to @seeM but
in delegates ignored indocments
(#478)
- Optional types for
Config
(#472) - Add
ret_false()
docments
using nested delegates comments incorrectly (#475)true()
defined twice; replace 2nd withret_true()
(#471)- 'method-wrapper' object has no attribute 'annotations' (#470)
- exclude
passed to {func}
from docments by passingverbose=False
todelegates
(#464), thanks to @seeM - enable meta.delegates to enforce
KEYWORD_ONLY
for kwargs from (#459), thanks to @EmbraceLife
- Add
fastcore.style
: fast styling for friendly CLIs (#460), thanks to @seeM - add
skip_folder
toxtras.walk
(#458)
- Fix scripts not executing (#449), thanks to @renato145
- layered
Config
withextra_files
;Config
repr
(#456), thanks to @seeM - in-memory
Config
by passingsave=False
(#455), thanks to @seeM - use
==
for non iterable args toall_equal
(#453) - New method:
AttrDict.copy
, to return AttrDict instead of plain python dict (#451), thanks to @Salehbigdeli - add xdg module (#450)
- add
console_help
(#448) - add module info to
basic_repr
(#447) - add
only
andnested_setdefault
collection functions (#446), thanks to @seeM - include annotations and qualname in
copy_func
(#425), thanks to @seeM
- Fix scripts not executing (#449), thanks to @renato145
- urllib opener can conflict with fork parallel on macos (#444)
- move
str2bool
tofastcore.basics
(#441)
- start mode option for
parallel
(#440)
- port to nbdev2 (#438)
- add
signature_ex
- always set
__wrapped__
incall_parse
(#435)
- Fix missing import
- use ujson if available (#432)
- new
func
param forglobtastic
(#429) - add nested parser support to
fastcore.script
(#428), thanks to @seeM
- Importing
fastcore.utils
now longer importsfastcore.net
- Move imports into functions to make import faster (#426)
- use py310 style union annotations (#421), thanks to @seeM
- repr patching broken by pep 563 (#270)
- Custom raise message helper (#419), thanks to @muellerzr
- make
docments
handle delegates (#418), thanks to @hamelsmu - Add a
nested_callable
andgetcallable
util (#417), thanks to @muellerzr - Add dataclass to docments (#413), thanks to @MarkB2
- Use docments (#387), thanks to @muellerzr
- Add initial value for product and sum on L (#406), thanks to @radekosmulski
- add ppretty print repr to AttrDict (#403), thanks to @hamelsmu
- Raise better error when a config isn't found (#394), thanks to @muellerzr
- Bugfix handle edge case when we have string in list and want to flatten (#410), thanks to @Salehbigdeli
- numpy-style docstring support for
docments
(#405)
- fix missing import for
get_source_link
(#392), thanks to @hamelsmu - fix missing import (#391), thanks to @hamelsmu
- add loop functions, thanks to @willmcgugan (#363)
- add
walk
function (#355) - add
globtastic
andcompile_re
(#354) - add
exec_new
(#350) - add
PythonKernel
(#348) - add
flatten
- avoid expansion of
%
format strings infastcore.script
(#349)
- add class init support to docments (#347)
- add timeout param to url functions (#346)
- add
L.argfirst
(#345) - add
Path.relpath
(#344) - add
full
andreturns
todocments
, and derive type from default infastcore.script
(#342) - allow use of
docments
infastcore.script.call_parse
(#341) - add
docments
(#340)
untar_dir
always extracts archive even if already exists (#337)
- Support py36 in
untar_dir
- New method:
Path.delete()
to remove a file or directory (#336) - Add
urlretrieve
, which as same asurllib.request.urlretrieve
but also works withRequest
objects (#335)
- remove fastai-specific pieces from
Config
(#334) - in
untar_dir
create a directory if there is more than one item in root of archive (#333) - allow directory
dest
inurlsave
(#327)
- make patch more compatible with classmethods (#309), thanks to @tezike
- Added order and list support for Pipeline.add (#297), thanks to @marii-moe
- support windows: only add lock if it runs parallelly (#283), thanks to @mszhanyi
- fix #304 UnicodeDecodeError while downloading git archive (#308), thanks to @pradeepbbl
- Fix saving str as bytes in urlsave (#278), thanks to @jochym
sparkline
errors when a value is given that exceedsmx
(#277)
- add
strcat
andmapt
(#273)
- add
loads_multi
(#271)
- ignored empty str
names
instore_attr
(#267) returns_none
not returning non-none type (#266)Transform
return type ignored (#265)test_eq
incorrect for pandasDataFrame
(#188), thanks to @kessido
- add
EventTimer
(#263) - Store kwargs in `store_attr (#262)
- add
truncstr
(#261) - add
sparkline
(#260) - add
autostart
for generators (#249) - dynamic fastcore.script help width (#247)
- optional override to
risinstance
to support both types and str in the same function (#191), thanks to @kessido
- delegates doesn't pull the
__init__
of a class (#217) test_eq
incorrect for pandasDataFrame
(#188), thanks to @kessido
- enum support for
call_parse
(#245) - Added obj2dict (#244)
return_headers
param forurlsend
andurlread
(#242)- add common Chrome headers (#241)
- add
utc2local
andlocal2utc
(#239) - add
Path.read_json
(#238)
*args
not handled correctly in process/thread pools (#246)
- regression in urlopen header user-agent not set (#237)
loads
incompatible with Python 3.9 (#236)- Documentation search not working (#235)
- split
parallel
andnet
modules out ofxtras
(#234) - New HTTP Exceptions hierarchy for each status code, used by
url*
functions - add
Request.summary
anddebug
paramaeter tourlsend
(#233) - Add
ImportEnum
,StrEnum
, andstr_enum
(#232) - handle encoded data in
urlrequest
(#231)
- use
__slots__
instore_attr
if exists (#226) - add
urlrequest
(#225) - add
loads
andurlsend
(#224) - add
PartialFormatter
andpartial_format
(#223) - add
stringfmt_names
(#222)
- rename
negate_func
tonot_
for consistency with other curried ops (#221) - Support empty content for
urljson
(#219) - move
patch
andpatch_to
tofastcore.basics
, and avoid clobbering existing symbols when patching (#214)
- add
startthread
(#218) - make
run
compatible with py36 (#216) reuse_addr
param tostart_server
(#215)- add rfc3986 list to
urlquote
(#213)
- quote URL paths in
urlwrap
(#211) - Add
start_server
andstart_client
for simple socket networking (#210) - new
uniqueify
andval2idx
functions, and additional params tolistify
(#209) - improve representation in
basic_repr
(#197)
- remove
log_args
(#176)
Stateful
base class/mixin for objects that should not serialize all their state (#196)- new
frame
param toargnames
(#195) - add
urlopen
anduntar_dir
(#192) SCRIPT_INFO.func
to let functions know what CLI name was called infastcore.script
(#185)- add
annotations
andargnames
functions (#179) - allow
but
param instore_attr
to be eitherlist
orstr
(#174) - add
urlvalid
(#173)
@typed
doesn't work with classes (#183) (reported by @krishnap)
- add
repr_dict
and use for display forAttrDict
(#172) - add
urlsave
,urlclean
, andrepo_details
(#171) remove_suffix
function (#170)- add
urlcheck
andurlwrap
(#168) - new
AutoInit
mixin (#165)
risinstance
fails if param is not truthy (#166)
- callable support for
Self
(#162) - add filter func to
first
(#161) maybe_open
context manager and fastimage_size
funcion (#160)
- Redundent
L.map_filter
removed (sinceL.map.filter
does the same thing)
change param name
copy_meta->
as_copyin
retain_meta` (#157)
groupby
extensions forint
andstr
instead of callables, and an optionalval
transform (#155)- add
modified_env
(#148)
- add
true
,NullType
,null
, andtonull
(#153) - add
working_directory
(#151) - move
bind
et al tofastcore.basics
(#150)
- move basic functionality into
fastcore.basics
, using minimal imports (#149) - add
anno_dict
andempty2none
inmeta
(#145)
- support
store_true
andstore_false
infastcore.script
(#137) - add function
otherwise
(#136) - add
pdb
debug flag to scripts (#133) - Update
copy_func
to include required keyword defaults (#134), thanks to @worc3131
Config
no longer magically convertsstr->Path
for any keys. Use newpath
method instead (#131)
rinstance
: Curriedisinstance
but with args reversed, suitable forpartial
(#130)- Use
_repr_pretty_
forL
(#129) open_file
to open optionally-compressed files for reading and writing, and add compression support toload_pickle
andsave_pickle
(#128)- add context manager for failed tests (#126), thanks to @hamelsmu
- Add
Request.request
support tourlread
(#132)
- runtime type checking with
typed
decorator (#125)
threaded
decorator (#124)- POST support for
urlread
(#124) - add
sorted_ex,
map_ex,
filter_ex, and
argwhere` (#122)
- Remove
Path.{read,write}
(usePath.{read_text,write_text}
instead) and changePath.{load,save}
to functionsload_pickle
andsave_pickle
(#121)
- add
L.setattrs
, inspired by Saul Pwanson (#117) - move
Config
fromnbdev
(#116) - add
nested_attr
and use it inL.attrgot
(#115)
patch_property
: usepatch(as_prop=True)
instead
- New param
cast
forstore_attr
and new decoratorwith_cast
(#114) - add
L.insert
andexec_local
(#113) - Patch decorator with optional argument (#110), thanks to @Salehbigdeli
- Make typedispatch decorator more general (#106), thanks to @Salehbigdeli
- Fix default in oper (#112), thanks to @Salehbigdeli
- Inconsistency with
cmp_instance
andtypedispatch
because of binary sort algorithm (#100)
- add
ignore_ex=False
andas_bytes=False
params torun
(#108) AttrDict
: adict
subclass that also provides access to keys as attrs; and changedict2obj
to createAttrDict
s instead ofSimpleNamespace
s (#107)
run
: flexibly run an external process and raise exception if it fails (#105)
- add
threadpool=False
param toparallel
to use threads instead of processes (#102)
- add
L.map_filter
andL.map_first
(#97)- These support some nice refactorings, like changing from this:
to this:
d = [] for c in cs: m = f(c) if not m: continue d.append(m.group(1))
d = cs.map_filter(f).map(Self.group(1))
- These support some nice refactorings, like changing from this:
- Reapply fix for #86 which was unintentionally reverted by the next commit (#91)
dict2obj
: Convert (possibly nested) dicts (or lists of dicts) toSimpleNamespace
(#90)
- add function support to
store_attr
(#85)
mp_context
keyword for initialising concurrent.futures.ProcessPoolExecutor only supported in python 3.7+ (#86)
- remove
parallel_chunked
, usechunksize
arg toparallel
instead (#81)
- move fastscript to fastcore.script (#84)
- add
run_proc
anddo_request
(#83) - added
chunksize
toparallel
, which passes toProcessPoolExecutor.map
(#82) - move metaclasses and delegates et al to new
meta
module (#80)
- Remove numpy prerequisite (#75)
- NB: fastcore's
L
and other collection features still work with numpy arrays, but they do so internally using instance methods, so numpy is no longer a prerequisite, and numpy is not loaded if not used
- NB: fastcore's
- "has default params. These will be ignored" shown when not appropriate (#74)
- Change arguments of
store_attr()
and removestore_attrs
attribute (#71)store_attr
's API has changed.self
is now the second parameter, and is optional. Previously, if no names were passed to store, names were taken from thestore_attrs
attribute; now, however, names are taken from the list of arguments to the current function.
- Initial release