From bbe43d83834452e7dc9d01ff3e39d697095aff1e Mon Sep 17 00:00:00 2001 From: joncrall Date: Sat, 4 Nov 2023 17:11:49 -0400 Subject: [PATCH] Doc fixes --- ubelt/util_format.py | 2 +- ubelt/util_hash.py | 10 +++++----- ubelt/util_str.py | 9 +++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ubelt/util_format.py b/ubelt/util_format.py index 3ce4aaa2b..e487b07ea 100644 --- a/ubelt/util_format.py +++ b/ubelt/util_format.py @@ -1,5 +1,5 @@ """ -This module is deprecated. Use util_repr instead. +This module is deprecated. Use :mod:`ubelt.util_repr` instead. """ from .util_repr import urepr, ReprExtensions, _REPR_EXTENSIONS diff --git a/ubelt/util_hash.py b/ubelt/util_hash.py index 03d4ccaba..cbea69ef0 100644 --- a/ubelt/util_hash.py +++ b/ubelt/util_hash.py @@ -1,13 +1,13 @@ r""" Wrappers around hashlib functions to generate hash signatures for common data. -The hashes are deterministic across python versions and operating systems. -This is verified by CI testing on Windows, Linux, Python with 2.7, 3.4, and -greater, and on 32 and 64 bit versions. +The hashes are deterministic across Python versions and operating systems. +This is verified by CI testing on 32 and 64 bit versions of Windows, Linux, and +OSX with all supported Python. Use Case #1: You have data that you want to hash. If we assume the data is in -standard python scalars or ordered sequences: e.g. tuple, list, odict, oset, -int, str, etc..., then the solution is :func:`hash_data`. +standard python scalars or ordered sequences: e.g. tuple, list, OrderedDict, +OrderedSet, int, str, etc..., then the solution is :func:`hash_data`. Use Case #2: You have a file you want to hash, but your system doesn't have a sha1sum executable (or you dont want to use Popen). The solution is diff --git a/ubelt/util_str.py b/ubelt/util_str.py index 95562b6e1..f7d846ce1 100644 --- a/ubelt/util_str.py +++ b/ubelt/util_str.py @@ -1,9 +1,6 @@ """ Functions for working with text and strings. -The :func:`ensure_unicode` function does its best to coerce Python 2/3 bytes -and text into a consistent unicode text representation. - The :func:`codeblock` and :func:`paragraph` wrap multiline strings to help write text blocks without hindering the surrounding code indentation. @@ -181,7 +178,11 @@ def hzcat(args, sep=''): def ensure_unicode(text): r""" - Casts bytes into utf8 (mostly for python2 compatibility) + Casts bytes into utf8 (mostly for python2 compatibility). + + Note: + This function is deprecated and will no longer be available in version + 2.0.0. Args: text (str | bytes):