<div dir="ltr"><div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On 15 Feb 2017 23:40, "Nathaniel Smith" <<a href="mailto:njs@pobox.com" target="_blank">njs@pobox.com</a>> wrote:<br type="attribution"><blockquote class="m_5020033451459969570quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div class="m_5020033451459969570elided-text"><div><div class="gmail_extra"><div class="gmail_quote">On Feb 15, 2017 07:41, "Nick Coghlan" <<a href="mailto:ncoghlan@gmail.com" target="_blank">ncoghlan@gmail.com</a>> wrote:<blockquote class="m_5020033451459969570m_6378060040373184791quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_5020033451459969570m_6378060040373184791quoted-text"><br></div></blockquote></div></div></div><div dir="auto"><br></div></div><div dir="auto">Ah-hah, this does make sense as a problem, thanks!</div><div dir="auto"><br></div><div dir="auto">However, your solution seems very odd to me :-).</div><div dir="auto"><br></div><div dir="auto">If the goal is to put an "are you sure/yes I'm sure" UX barrier between users and certain version settings, then why make a distinction that every piece of downstream software has to be aware of and ignore? Pypi seems like a funny place in the stack to be implementing this. It would be much simpler to implement this feature at the build system level, like e.g. setuptools could require that dependencies that you think are over strict be specified in an install_requires_yes_i_really_<wbr>mean_it= field, without requiring any metadata changes.</div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">If you're publishing to a *private* index server then version pinning should be allowed by default and you shouldn't get a warning.</div><div dir="auto"><br></div><div dir="auto">It's only when publishing to PyPI as a *public* index server that overly restrictive dependencies become a UX problem.</div><div dir="auto"><br></div><div dir="auto">The simplest way of modelling this that I've come up with is a boolean "allow pinned dependencies" flag - without the flag, "==" and "===" would emit warnings or errors when releasing to a public index server, with it they wouldn't trigger any complaints.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_5020033451459969570quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"></div><div dir="auto">Basically it sounds like you're saying you want to extend the metadata so that it can represent both broken and non-broken packages, so that both can be created, passed around, and checked for. And I'm saying, how about instead we do that checking when creating the package in the first place.</div></div></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Build time isn't right, due to this being a perfectly acceptable thing to do when building solely for private use. It's only you make the "I'm going to publish this for the entire community to use" that the intent needs to be clarified (as at that point you're switching from "I'm solving to my own problems" to "My problems may be shared by other people, and I'd like to help them out if I can").<br></div><div dir="auto"></div><div dir="auto"></div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_5020033451459969570quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"></div><div dir="auto">(Of course I can't see any way to do any of this that won't break existing sdists, but I guess you've already decided you're OK with that. I guess I should say that I'm a bit dubious that this is so important in the first place; I feel like there are lots of legitimate use cases for == dependencies and lots of kinds of linting we might want to apply to try and improve the level of packaging quality.)<br><br><br><span class="sewi8y5lu57ry9i"></span><span class="sewmdeg2shva9c"></span><br><br><br><br><br></div><div class="m_5020033451459969570quoted-text"><div dir="auto"><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="m_5020033451459969570m_6378060040373184791quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Either way, PyPI will believe your answer, it's just refusing the<br>
temptation to guess that using "==" or "===" in the requires section<br>
is sufficient to indicate that you're deliberately publishing a<br>
pre-integrated project.<br>
<div class="m_5020033451459969570m_6378060040373184791quoted-text"><br>
> There's certainly a distinction to be made between the abstract<br>
> dependencies and the exact locked dependencies, but to me the natural<br>
> way to model that distinction is by re-using the distinction we<br>
> already have been source packages and binary packages. The build<br>
> process for this placeholder wheel is to "compile down" the abstract<br>
> dependencies into concrete dependencies, and the resulting wheel<br>
> encodes the result of this compilation. Again, no new concepts needed.<br>
<br>
</div>Source vs binary isn't where the distinction applies, though. For<br>
example, it's legitimate for PyObjC to have pinned dependencies even<br>
when distributed in source form, as it's a metapackage used solely to<br>
integrate the various PyObjC subprojects into a single "release".<br></blockquote></div></div></div><div dir="auto"><br></div></div><div dir="auto">?? So that means that some packages have a loosely specified source that compiles down to a more strictly specified binary, and some have a more strictly specified source that compiles down to an equally strictly specified binary. That's... an argument in favor of my way of thinking about it, isn't it? That it can naturally express both situations?</div><div dir="auto"><br></div><div dir="auto">My point is that *for the cases where there's an important distinction between Pipfile and Pipfile.lock*, we already have a way to think about that distinction without introducing new concepts.</div><font color="#888888"><div dir="auto"><br></div><div dir="auto">-n</div></font></div>
</blockquote></div><br></div></div></div>
</div>