#TIL when creating a python project, and using some==2.2.0 to "pin" your requirements isn't actually pinning them, as the package owner (or anyone with access) may upload version 2.2.0-1, 2.2.0-2, etc. which will match the "==2.2.0".
@diazona Or are the --build-number=1 and ".post1" also the same thing? For some reason pip installs the wheel with version "2.2.0-1" instead of "2.2.0" if that's available, even if you specify "package==2.2.0".
I wonder if the build tags are the way to go if you use readthedocs and want to just update the documentation. Or would you rather move the git tag and force rebuild in ReadTheDocs..?
@hugovk @diazona
For docs-only-change (typo, link fix, etc.) for version X.Y.Z I have just checked out with the git tag X.Y.Z, made changes, and moved the git tag X.Y.Z to the new commit, and forced doc rebuild for git tag X.Y.Z in the RTD web ui. But seems that giving the new commit tag X.Y.Z.post1 would be a better way. I wonder if that's still shown as X.Y.Z in RTD for the users..?
@driscollis yet another thing in the #python standard library I've never seen or used. I wonder when one would use the functools.singledispatch over a set of if isinstance(..) elif isinstance(..)? The singledispatch feels like a bit of magic since going to the definition of the function does not show what it does and one has to go to Ctrl-F for all the @func.register's to find the implementation 🤔
@driscollis One use case perhaps for library makers to give possibility for their users to extend their library to new types. Let's say there is somefunc which is used on many places within the library. That supports few types.
To support sometype, user could add an implementation in their own code with:
Inspired by @fcodvpt post about current popularity of build backends, I investigated how the popularity of build backends used in pyproject.toml evolved over time since PEP-0517 introduced them in 2015:
@venthur@fcodvpt nice stats! I would have expected flit to have higher percentage. The python packaging is still in the middle of changes and it's interesting to see where this is going and what kind of tools we will be using in five years from now.
Do you use the PEP634 match + case statements to replace if-elif-elif-elif-else.. ? How do you decide to use if statements or the structural pattern matching?
@bouncing I've never found myself from a situation where I would have liked to use the match statement. But I'm curious to hear from other devs if they found it better than if statements in some situation.