It looks like no one responded so the NEP is accepted! I'll send in a PR to
mark it as such.

On reflection, I think that we're probably too close to the NumPy 2.6
release to merge my ByteStringDType PR, with a bunch of functionality left
to be filled in per the NEP. I was hoping I'd have a month to do that
before the 2.6 branch but as usual timelines on this stuff slipped a bit.

I'm now planning to merge ByteStringDType shortly after 2.6 is branched,
leaving the 2.7 development window to do followup work in smaller chunks. I
still think it would be nice to have
https://github.com/numpy/numpy/pull/32757 in 2.6 but it's OK if we wait on
that too.

I think this is also a spot where community contributors can help out. I
intentionally implemented one of each "kind" of operation, so the remaining
work all has a template to base the work off of. Hopefully I'll be able to
share more soon about followup work here.

-Nathan

On Sun, Nov 1, 2026 at 6:45 PM Nathan <[email protected]> wrote:

> Hi all,
>
> I'm writing to propose accepting my ByteStringDType NEP, with the
> intention of including it as a new feature in NumPy 2.6.
>
> The latest NEP text is here:
> https://numpy.org/neps/nep-0058-bytestring-dtype.html
>
> The mailing list thread discussing the NEP is here:
> https://mail.python.org/archives/list/[email protected]/thread/O4BIZE4YIYAS2SYOMXIENVS7BP2NNNWI/
>
> I don't think there are any remaining substantive discussion points. Joren
> was worried about the original proposal to make the scalar type be a Python
> bytes. The latest version as a new NumPy vbytes scalar because subtyping
> bytes is much easier than subtyping str and trying to use it to represent
> UTF-8 data.
>
> Joren was also worried about the typing difficulties inherent with
> StringDType and ByteStringDType's missing data support. I argued that
> limitations of the type system shouldn't limit runtime behavior of NumPy's
> features and that it's probably worth expanding the type system to support
> behavior keyed to floating point values like nan now that there is a
> concrete use-case in NumPy. I've spoken to Joren and I think he's fine with
> the current text and ByteStringDType prototype.
>
> The prototype currently lives in a draft PR (
> https://github.com/numpy/numpy/pull/32772) which I plan to mark as ready
> to merge next week. I'm also hoping we can merge
> https://github.com/numpy/numpy/pull/32757, which deprecates implicit
> coercion of bytes to strings (e.g. np.array(["a", b"b"])). It provides
> shared machinery for dealing with this, which will let me avoid adding a
> bunch of special cases for ByteStringDType.
>
> If there are no substantive objections within 7 days from this email, then
> the NEP will be accepted; see NEP 0 for more details.
>
> Thanks for your time and consideration,
>
> -Nathan
>
_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]

Reply via email to