Skip to content

API: Make encoding=None the default in loadtxt#25158

Merged
charris merged 3 commits intonumpy:mainfrom
seberg:loadtxt-encoding
Nov 16, 2023
Merged

API: Make encoding=None the default in loadtxt#25158
charris merged 3 commits intonumpy:mainfrom
seberg:loadtxt-encoding

Conversation

@seberg
Copy link
Member

@seberg seberg commented Nov 15, 2023

This has been a very long wart that encoding=bytes was always the default, which means that custom converters get bytes passed which is rather tedious.

Now, changing this of course breaks some custom converters (luckily Python allow some simple things like float() for byte strings also.

There is an odd deprecationwarning, but for now most (not all) test failures are fixed by passing encoding="bytes" explicitly.


This one is for @rossbar to review and make a decision on.

This has been a very long wart that `encoding=bytes` was always
the default, which means that custom converters get bytes passed
which is rather tedious.

Now, changing this of course breaks some custom converters
(luckily Python allow some simple things like `float()` for byte
strings also.

There is an odd deprecationwarning, but for now most (not all)
test failures are fixed by passing `encoding="bytes"` explicitly.
@seberg seberg requested a review from rossbar November 15, 2023 21:55
Since I noticed them in the text loading docs (removes all though)
@charris charris merged commit 32fad57 into numpy:main Nov 16, 2023
@charris
Copy link
Member

charris commented Nov 16, 2023

Thanks Sebastian, let's see how it plays.

@seberg seberg deleted the loadtxt-encoding branch November 17, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants