Releases: ClericPy/morebuiltins
Releases · ClericPy/morebuiltins
1.3.5
1.3.5 (2025-10-15)
- fix writer.wait_closed() ConnectionResetError in ipc.py, proxy_checker.py, log_server.py
- add
morebuiltins.funcs.debouncedecorator to debounce function calls. - add
separg tomorebuiltins.utils.gen_idto customize the separator between date and time. - add
LoggerStreamtomorebuiltins.logsto redirect sys.stdout/sys.stderr with prefix.- Use
sys.stdout = LoggerStream()to redirect all stdout to LoggerStream, which sends logs to the logging system / file / custom writer. LoggerStream.replace_print_ctx: A context manager to temporarily replace the print function within a block of code.- add time prefix to each print line.
- Use
- add
nofmtextra field support tomorebuiltins.cmd.log_serverto skip formatting for high-frequency/thinking logs. - add
scriptsentry topyproject.tomlformorebuiltinscommand line tool.- now you can run
uvx morebuiltins morebuiltins.cmd.log_serverto start log server with uvx.
- now you can run
1.3.4
1.3.4 (2025-09-17)
- fix
morebuiltins.utils.gen_idwrong length issue. - fix
morebuiltins.funcs.LineProfilerto handle nested function calls correctly. - update
morebuiltins.cmd.log_serverto support close idle file handlers after 300 seconds. - add
get_loggertomorebuiltins.cmd.log_serverto get a singleton logger withSocketHandlerto send logs toLogServer. - [Compatibility Warnings] Refactor of
morebuiltins.cmd.log_server:- use
LogSettingstruct instead of untyped dict, client send dict withLogSettingstructure. - add
level_specsfilter to specify log levels of files, like[logging.ERROR, logging.CRITICAL]. - add cache file for log settings, readable by both server and human.
- THIS IS A BREAKING CHANGE, old clients may not work with new server.
- use
1.3.3
1.3.3 (2025-09-01)
- add
morebuiltins.logs.LogHelper.handle_crashto log uncaught exceptions. - fix
morebuiltins.logs.LogHelper.bind_handlerto avoid adding duplicate queue handlers. - update default format of
morebuiltins.logs.LogHelperto"%(asctime)s | %(levelname)-5s | %(filename)+8s:%(lineno)+3s - %(message)s".
1.3.2
1.3.2 (2025-08-02)
- fix typing-hint for
morebuiltins.funcs.threadsdecorator, now it returnsCallable[..., Future]. - add force kill methods to
morebuiltins.shared_memory.PLock:- add
force_signumtomorebuiltins.shared_memory.PLock, to specify the signal number to force kill the process if it exists. - add
is_freetomorebuiltins.shared_memory.PLock, to check if the lock is free. - add
kill_with_nametomorebuiltins.shared_memory.PLock, to kill the process with the given name and signal number.
- add
- add
morebuiltins.logs.LogHelperto quickly bind a logging handler to a logger, with a StreamHandler or SizedTimedRotatingFileHandler. - Compatibility Warnings:
- move
async_logger,AsyncQueueListener,LogHelper,RotatingFileWriter, andSizedTimedRotatingFileHandlerfrommorebuiltins.funcstomorebuiltins.logs.
- move
- add
ContextFilterfor logging, to add context variables to log records. - add
queuearg tomorebuiltins.logs.LogHelper.bind_handler, to enable async logging withAsyncQueueListener. (like loguru's queue=True)
1.3.1
1.3.1 (2025-06-19)
- add
check_recursiontomorebuiltins.funcs, to check if a function is recursive. - add
SharedBytestomorebuiltins.shared_memory, a shared memory for bytes, similar tomultiprocessing.shared_memory.SharedMemorywith a header for size. - add
line_profilerdecorator tomorebuiltins.funcs, to profile function execution time line by line.
1.3.0
1.3.0 (2025-03-08)
- Compatibility Warning. rename
morebuiltins.functoolstomorebuiltins.funcsto avoid conflict withfunctoolsin python standard library. - add
key_typearg tosqlite.KV, to supportintkey. - add
utils.cut_fileto cut file witha+bmode to limit the file size - add recheck for
utils.set_pid_file - add
shared_memory.PLockfor singleton process withmultiprocessing.shared_memory, support linux and windows. - add
--StandardOutputand--StandardErrortomorebuiltins.cmd.systemd.service, and update--Environmentto list type. - add
is_port_freetomorebuiltins.ipc.
1.2.3
1.2.2
1.2.1
1.1.8 & 1.1.9
1.1.9 (2025-01-16)
- add
snippets.sql.SqliteSQLas Sqlite SQL generator - add
cmd.parse_depsto parse dependencies of a project directory, and find circular dependencies. - add
cmd.os.linux.systemd.serviceandcmd.os.linux.systemd.timer - add
functools.to_thread, same asasyncio.to_threadin python 3.9+. - add
functools.AsyncQueueListenerfor asyncio non-block logging. - fix systemd.timer typing hint error
1.1.8 (2024-12-11)
- add
utils.i2bandutils.b2i, integer and fixed-length byte strings conversion. - add
--compresstocmd.log_server - add
snippets.event.EventTemplate