Skip to content

fix(python): support bytes() on generic and bool arrays - #4961

Merged
MangelMaxime merged 1 commit into
mainfrom
fix/python-guid-generic-array
Sep 10, 2026
Merged

fix(python): support bytes() on generic and bool arrays#4961
MangelMaxime merged 1 commit into
mainfrom
fix/python-guid-generic-array

Conversation

@MangelMaxime

Copy link
Copy Markdown
Member

No description provided.

__bytes__ returned NotImplemented for generic and bool storage, and since
bytes() rejects a non-bytes result instead of falling back to the iterable
protocol, Guid(byte[]), Convert.ToBase64String and Encoding.GetString all
failed whenever the array came from a generic function.
@github-actions

Copy link
Copy Markdown
Contributor

Python Type Checking Results (Pyright)

Metric Value
Total errors 34
Files with errors 4
Excluded files 4
New errors ✅ No
Excluded files with errors (4 files)

These files have known type errors and are excluded from CI. Remove from pyrightconfig.ci.json as errors are fixed.

File Errors Status
temp/tests/Python/test_hash_set.py 18 Excluded
temp/tests/Python/test_applicative.py 12 Excluded
temp/tests/Python/test_nested_and_recursive_pattern.py 2 Excluded
temp/tests/Python/fable_modules/thoth_json_python/encode.py 2 Excluded

@MangelMaxime
MangelMaxime merged commit 94b5929 into main Sep 10, 2026
76 of 78 checks passed
@MangelMaxime
MangelMaxime deleted the fix/python-guid-generic-array branch September 10, 2026 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant