[Distutils] Re: Clarification on string arguments in PEP 517 hooks

2018-08-28 Thread Paul Moore
On Tue, 28 Aug 2018 at 07:56, Nick Coghlan  wrote:
>
> On Mon., 20 Aug. 2018, 11:54 pm Paul Moore,  wrote:
>>
>> My assumption is that the intent is that *all* strings, whether
>> arguments or return values, must be Unicode.
>
> Handling bytes paths correctly cross-platform is a pain, so I think requiring 
> frontends to always pass in Unicode makes sense.

That's what I went for (and I've submitted a change to setuptools to
fix their backend to follow that rule). I should probably also submit
a PR to the PEP to clarify the intention :-)

Paul
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/3M2AZZZKTQ7IPK2FPVQLZD4ND6HBPJIA/


[Distutils] Re: Clarification on string arguments in PEP 517 hooks

2018-08-28 Thread Nick Coghlan
On Mon., 20 Aug. 2018, 11:54 pm Paul Moore,  wrote:

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

Handling bytes paths correctly cross-platform is a pain, so I think
requiring frontends to always pass in Unicode makes sense.

Cheers,
Nick.



>
>
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/RLX7PK3475YIWJSAACSZFACX2SUQUJA3/


[Distutils] Re: Clarification on string arguments in PEP 517 hooks

2018-08-20 Thread Paul Moore
On Mon, 20 Aug 2018 at 18:54, Thomas Kluyver  wrote:
>
> On Mon, Aug 20, 2018, at 2:52 PM, Paul Moore wrote:
> > 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.
>
> I'd say we should handle all paths the same way, i.e. unicode. If it's a 
> serious obstacle, we could alter the specification. But I would be surprised 
> if the required changes to the setuptools backend are so tricky that they 
> warrant a workaround in the specification.

The required change to setuptools is pretty simple. What's tricky is
getting pip (in this case the test suite) to pick up an unreleased
version of setuptools so that I can continue work on pip's PEP 517
support. That's why I wanted to confirm that my assumption was
correct, so I could get a change into setuptools quickly.

Paul

Paul
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/MHYCKEWIEU6GTQKHW5AKWEX5QZMAGZRC/


[Distutils] Re: Clarification on string arguments in PEP 517 hooks

2018-08-20 Thread Thomas Kluyver
On Mon, Aug 20, 2018, at 2:52 PM, Paul Moore wrote:
> 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.

I'd say we should handle all paths the same way, i.e. unicode. If it's a 
serious obstacle, we could alter the specification. But I would be surprised if 
the required changes to the setuptools backend are so tricky that they warrant 
a workaround in the specification.

Thomas
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/mm3/archives/list/distutils-sig@python.org/message/Y4OHE2D24DHVCBZVJZ5OGXOFGBZKA3YQ/