Skip to content

Releases: ClericPy/morebuiltins

1.3.7

10 Jan 14:32

Choose a tag to compare

1.3.7 (2025-12-05)

  1. fix morebuiltins.utils.Validator while type is Union / Optional

1.3.6

10 Jan 13:54

Choose a tag to compare

1.3.6 (2025-11-26)

  1. add morebuiltins.funcs.async_call to automatically call a function asynchronously, whether it's sync or async.
  2. add morebuiltins.funcs.countdown to print a countdown timer inline in the console.
  3. update morebuiltins.utils.code_inline using zlib instead of gzip.
  4. add morebuiltins.utils.Validator string alias for bool type
    1. Validator now supports string values like "true", "false", "1", "0", "yes", "no", "on", "off" for boolean fields.

1.3.5

18 Nov 14:41

Choose a tag to compare

1.3.5 (2025-10-15)

  1. fix writer.wait_closed() ConnectionResetError in ipc.py, proxy_checker.py, log_server.py
  2. add morebuiltins.funcs.debounce decorator to debounce function calls.
  3. add sep arg to morebuiltins.utils.gen_id to customize the separator between date and time.
  4. add LoggerStream to morebuiltins.logs to redirect sys.stdout/sys.stderr with prefix.
    1. Use sys.stdout = LoggerStream() to redirect all stdout to LoggerStream, which sends logs to the logging system / file / custom writer.
    2. LoggerStream.replace_print_ctx: A context manager to temporarily replace the print function within a block of code.
      1. add time prefix to each print line.
  5. add nofmt extra field support to morebuiltins.cmd.log_server to skip formatting for high-frequency/thinking logs.
  6. add scripts entry to pyproject.toml for morebuiltins command line tool.
    1. now you can run uvx morebuiltins morebuiltins.cmd.log_server to start log server with uvx.

1.3.4

14 Oct 18:24

Choose a tag to compare

1.3.4 (2025-09-17)

  1. fix morebuiltins.utils.gen_id wrong length issue.
  2. fix morebuiltins.funcs.LineProfiler to handle nested function calls correctly.
  3. update morebuiltins.cmd.log_server to support close idle file handlers after 300 seconds.
  4. add get_logger to morebuiltins.cmd.log_server to get a singleton logger with SocketHandler to send logs to LogServer.
  5. [Compatibility Warnings] Refactor of morebuiltins.cmd.log_server:
    1. use LogSetting struct instead of untyped dict, client send dict with LogSetting structure.
    2. add level_specs filter to specify log levels of files, like [logging.ERROR, logging.CRITICAL].
    3. add cache file for log settings, readable by both server and human.
    4. THIS IS A BREAKING CHANGE, old clients may not work with new server.

1.3.3

01 Sep 17:35

Choose a tag to compare

1.3.3 (2025-09-01)

  1. add morebuiltins.logs.LogHelper.handle_crash to log uncaught exceptions.
  2. fix morebuiltins.logs.LogHelper.bind_handler to avoid adding duplicate queue handlers.
  3. update default format of morebuiltins.logs.LogHelper to "%(asctime)s | %(levelname)-5s | %(filename)+8s:%(lineno)+3s - %(message)s".

1.3.2

31 Aug 15:22

Choose a tag to compare

1.3.2 (2025-08-02)

  1. fix typing-hint for morebuiltins.funcs.threads decorator, now it returns Callable[..., Future].
  2. add force kill methods to morebuiltins.shared_memory.PLock:
    1. add force_signum to morebuiltins.shared_memory.PLock, to specify the signal number to force kill the process if it exists.
    2. add is_free to morebuiltins.shared_memory.PLock, to check if the lock is free.
    3. add kill_with_name to morebuiltins.shared_memory.PLock, to kill the process with the given name and signal number.
  3. add morebuiltins.logs.LogHelper to quickly bind a logging handler to a logger, with a StreamHandler or SizedTimedRotatingFileHandler.
  4. Compatibility Warnings:
    1. move async_logger, AsyncQueueListener, LogHelper, RotatingFileWriter, and SizedTimedRotatingFileHandler from morebuiltins.funcs to morebuiltins.logs.
  5. add ContextFilter for logging, to add context variables to log records.
  6. add queue arg to morebuiltins.logs.LogHelper.bind_handler, to enable async logging with AsyncQueueListener. (like loguru's queue=True)

1.3.1

26 Jul 09:28

Choose a tag to compare

1.3.1 (2025-06-19)

  1. add check_recursion to morebuiltins.funcs, to check if a function is recursive.
  2. add SharedBytes to morebuiltins.shared_memory, a shared memory for bytes, similar to multiprocessing.shared_memory.SharedMemory with a header for size.
  3. add line_profiler decorator to morebuiltins.funcs, to profile function execution time line by line.

1.3.0

16 Apr 15:19

Choose a tag to compare

1.3.0 (2025-03-08)

  1. Compatibility Warning. rename morebuiltins.functools to morebuiltins.funcs to avoid conflict with functools in python standard library.
  2. add key_type arg to sqlite.KV, to support int key.
  3. add utils.cut_file to cut file with a+b mode to limit the file size
  4. add recheck for utils.set_pid_file
  5. add shared_memory.PLock for singleton process with multiprocessing.shared_memory, support linux and windows.
  6. add --StandardOutput and --StandardError to morebuiltins.cmd.systemd.service, and update --Environment to list type.
  7. add is_port_free to morebuiltins.ipc.

1.2.3

07 Mar 12:39

Choose a tag to compare

1.2.3 (2025-03-07)

  1. add sqlite.KV: A key-value store using sqlite3. Light-weight sqlitedict.

1.2.2

04 Mar 15:40

Choose a tag to compare

1.2.2 (2025-03-04)

  1. Change the default alphabet in utils.base_encode to "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", which follows the order of ASCII characters.
  2. add utils.SnowFlake for id generator