On Fri, 31 Aug 2018 at 13:33 Xavier Fernandez
Le ven. 31 août 2018 à 9:25 PM, Brett Cannon
a écrit : OK, so let's look at what we're trying to support. If we have pure Python code there's very likely going to be a bottom Python version that's supported and then forward-compatibility is assumed. This is specified today through python-requires, so having a specific Python version in the wheel itself isn't totally critical. So 'py3-none-any' combined with python-requires takes care of this the vast majority of the time.
Hello,
while python-requires is indeed nice, it is only usable by pip to select a wheel file with a fully compliant PEP 503 repository. Otherwise, like in a local wheelhouse (wheel files in a directory), it is invisible to pip until pip tries to install the wheel so a more precise python tag can still be somewhat useful... (I agree that pip could access the wheel metadata to check the python-requires without needing to unzip the whole file).
You can make your pure Python wheel have a py3-cp36m-* wheel name and you get the version specification you want; there is nothing saying a wheel must have extension modules if it specifies an ABI tag. But more importantly, pip still has to resolve what version of a package to use, so regardless of what's cached in your wheelhouse there will be a check against python-requires somewhere, else you're no worse off than just installing the wheel directly. IOW your wheelhouse isn't going to short-circuit pip's resolver, it's just going to save you from having to download some bits from somewhere else (unless I understand how pip utilizes the wheelhouse on disk).