Skip to content

Commit 5771b36

Browse files
Release v0.11.1 (#249)
* Expose the number of available CPUs for concurrent processing ([#244](#244)). The library now provides a method to determine the number of logical CPUs available for the current process, considering factors such as containerized environments where the available CPU quota may differ from the total number of CPUs present. This method checks for the availability of the `process_cpu_count` attribute, and if not available, attempts to use the `sched_getaffinity` function on Linux or falls back to the total number of CPUs in the system, defaulting to 1 if unknown. The `gather` method has been updated to utilize this new method, allowing for more accurate determination of the available CPU count and improved concurrency. Additionally, several test cases have been added to verify the correct behavior of the method, including scenarios where the count is retrieved from different sources, ensuring a reliable way to determine the available CPU count for configuring concurrent processing in downstream applications. * Improve support for reading text files that contain a Unicode BOM at the start ([#243](#243)). The library now provides enhanced support for reading text files that contain a Unicode Byte Order Mark (BOM) at the start, allowing for accurate detection and handling of the file's encoding. New methods have been introduced to detect the BOM and decode the file accordingly, including handling of decoding errors and newline characters. The `read_text` function has been added, enabling the reading of text files with a BOM prefix, and is designed to work with both seekable and non-seekable files, although specifying a read size for non-seekable files will raise an error. Additionally, the existing code for handling Workspace files has been refactored to utilize the same implementation, and improvements have been made to support non-seekable files, ensuring a more robust and reliable reading experience for text files with Unicode BOM markers.
1 parent ef4d929 commit 5771b36

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Version changelog
22

3+
## 0.11.1
4+
5+
* Expose the number of available CPUs for concurrent processing ([#244](https://github.com/databrickslabs/blueprint/issues/244)). The library now provides a method to determine the number of logical CPUs available for the current process, considering factors such as containerized environments where the available CPU quota may differ from the total number of CPUs present. This method checks for the availability of the `process_cpu_count` attribute, and if not available, attempts to use the `sched_getaffinity` function on Linux or falls back to the total number of CPUs in the system, defaulting to 1 if unknown. The `gather` method has been updated to utilize this new method, allowing for more accurate determination of the available CPU count and improved concurrency. Additionally, several test cases have been added to verify the correct behavior of the method, including scenarios where the count is retrieved from different sources, ensuring a reliable way to determine the available CPU count for configuring concurrent processing in downstream applications.
6+
* Improve support for reading text files that contain a Unicode BOM at the start ([#243](https://github.com/databrickslabs/blueprint/issues/243)). The library now provides enhanced support for reading text files that contain a Unicode Byte Order Mark (BOM) at the start, allowing for accurate detection and handling of the file's encoding. New methods have been introduced to detect the BOM and decode the file accordingly, including handling of decoding errors and newline characters. The `read_text` function has been added, enabling the reading of text files with a BOM prefix, and is designed to work with both seekable and non-seekable files, although specifying a read size for non-seekable files will raise an error. Additionally, the existing code for handling Workspace files has been refactored to utilize the same implementation, and improvements have been made to support non-seekable files, ensuring a more robust and reliable reading experience for text files with Unicode BOM markers.
7+
8+
39
## 0.11.0
410

511
* Marshalling: allow JSON-like fields ([#241](https://github.com/databrickslabs/blueprint/issues/241)). The library has undergone significant changes to improve its marshalling functionality, code readability, and maintainability. A new `JsonValue` type alias has been introduced to represent the maximum bounds of values that can be saved for an installation, and support for `Any` and `object` as type annotations on data classes has been removed. The library now issues a `DeprecationWarning` when saving raw `list` and `dict` fields, and raises a specific error during loading, instructing users to use `list[T]` or `dict[T]` instead. Various methods, including `_marshal_generic_list`, `_marshal_raw_list`, `_marshal_generic_dict`, and `_marshal_raw_dict`, have been updated to handle the serialization of lists and dictionaries, while the `_unmarshal` method now handles the deserialization of unions, lists, and dictionaries. Additionally, the library has been updated to provide more informative error messages, and several tests have been added to cover various scenarios, including generic dict and list JSON values, bool in union, and raw list and dict deprecation. The `Installation` class, `MockInstallation` class, and `Paths` class have also been updated with new methods, type hints, and custom initialization to improve code flexibility and maintainability.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.11.0"
1+
__version__ = "0.11.1"

0 commit comments

Comments
 (0)