Clarification on string arguments in PEP 517 hooks

Paul Moore <[email protected]>
Newsgroups gmane.comp.python.distutils.devel
Message-ID <CACac1F8UNTavMZhgKvGCczmXc3XpzipsZ_9OYpQ1qbfzz=hzdw@mail.gmail.com>
I'm in the process of implementing PEP 517 for pip, and I've hit a
question. I'm pretty sure I know the answer, but I want to be clear,
as whatever the answer is will require some fixing up.

The various hooks take directory paths as arguments, and typically
return a filename (e.g., build_wheel). The returned filename is always
explicitly noted as being *a unicode string*. However, argumnents
(metadata_directory in build_wheel/prepare_metadata_for_build_wheel)
are *not* explicitly mandated to be Unicode.

My assumption is that the intent is that *all* strings, whether
arguments or return values, must be Unicode.

The reason that I've hit this is that the current setuptools PEP 517
backend passes the metadata_directory direct to distutils which, on
Python 2, checks for a (non-Unicode) string type and errors if Unicode
is supplied. Fixing that is going to be annoyingly tricky, so I want
to be sure that's the requirement before I start making fixes to
setuptools.

Paul
--
Distutils-SIG mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/mm3/archives/list/[email protected]/message/WW44ZRHKD3VDDEWODBPRPZWWENVJNGW5/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.