me: “I know Python! I've been using it on and off for like 15 years!”

also me: <still has no real idea what `setup.py` does>

(not looking for someone to explain it to me thanks)

@b0rk I always assumed it did setuppy things.
@b0rk it's ok, you can skip that and go straight to pyproject.toml anyway. :)
@b0rk my main issue with Python is that it got into the "Everything becomes a nail when all you have is a Hammer.* thing
@b0rk Years of setup.py but still no teardown.py

@b0rk Had a 70s year old (who worked in computers his whole life) excitedly tell me he'd started learning Python, just a few days ago.
I remarked that a lot of language, nowadays, are getting awfully similar and that ChatGPT and co could probably help him make the transition from any other language in just a few hours..

.. He seemed quite frustrated at my befitting opinion on the current state of the similarity of programming languages. .. *shrugs*

@b0rk Correct state of affairs. Setup.py was a mistake.
@b0rk I don’t think I ever understood how it works but glad I’ve been able to move on from it to plainer configuration formats.
@b0rk can only speak from my experience but usually it churns for a while and then prints some errors that don't explain what went wrong and then you go looking for another way to install the package
@b0rk show me someone who's used a language for 15 years and _doesn't_ have any random gap in their knowledge for a part they've never happened to run across, and I'll show you someone who's either straight-up bluffing, or doing a just-in-time web-search every time they're asked a question they don't know the answer to :-)

@simontatham @b0rk

A true expert is someone who knows *what* to search for.

There's plenty of other more pleasant things one can stuff your brain's limited memory with!

@simontatham yea this is why I post this kind of thing, I want to show it's normal to not know stuff :)
@simontatham @b0rk Often even a very experienced and knowledgeable programmer can have big gaps in their knowledge - but they know where they are. "Oh yes, IDK anything about <feature>. I do remember that it's full of beartraps, so I avoid it and recommend that others do so too."
@Diziet @simontatham @b0rk On a slightly related note, I once half-joked to a colleague+friend who is an electrical engineer working as a (very experienced and knowledgeable) software developer, that I’d be wary of (non-software) engineers programming, and he answered in earnest that he was well aware that his programming knowledge had limits and that he took care to steer clear of them. Chapeau!

@Diziet, thanks, that’s exactly how I’m going to answer questions about C++ from now on.

@simontatham @b0rk

@simontatham @b0rk I’ve been using #git for over a decade and yesterday I learned about `git worktree` which is exactly what I’ve needed every day for the last four years.

@DrHyde @b0rk git worktree is indeed brilliant!

Sometimes I use it without even having two worktrees at all – just as a way to keep my .git directory somewhere well away from my source tree, so that it takes a much bigger accident with rm to destroy it by mistake.

@DrHyde @b0rk also, I think git is _particularly_ prone to this, because it's so broad. There are a zillion outlying git features and subcommands, and each one is useful for _something_, but a lot of them are pretty much independent of each other – you don't have to learn lots of them at once, or learn one in order to use another.

So the only way you'd ever learn all of them in advance would be by reading the entire manual … and having a _really_ good memory.

@simontatham @DrHyde @b0rk There are also quite a few commands that need to be run infrequently enough that one doesn't automatically build the muscle memory for them, but are common and time-saving enough that learning them is still useful. I have a whole file full of useful utility features to remember that I should publish at some point. (I think Neovim appears the most in that list because editors are another type of tool that lend themselves to what you're describing.)
@breakerandahalf @simontatham @b0rk one of these years I might migrate from #vim to #neovim. But not this year.

@DrHyde @simontatham @b0rk Well. that list just includes brief cheatsheets on marks, tabpages, and folding with markers, all of which are helpful but are things I don't use enough to have an innate knowledge of (yet). I think everything in that list, however, also applies to Vim because so much of the behavior of the two editors is the same.

In my experience, the differences between the two are kind of a wash unless you really want something that only Neovim has. (Although being able to write configs in Lua is nice.)

Motion - Neovim docs

Neovim user documentation

@breakerandahalf @simontatham @b0rk yeah, every time I have to even read #vimscript, let alone write it, I get a little bit ragey.
@simontatham @b0rk I was on a team writing a new interview process. We started with what we each considered fundamental knowledge...and discovered that each of us were completely ignorant of at least one other persons "fundamental' knowledge.

@b0rk this is my forever state with things.

"I know python! Let me help answer basic questions!"

\*quickly see's gaps in my knowledge base\*

"I'm going to learn when others answer this basic question!"

@b0rk I know exactly how this feels, and I've been using it nearly daily for 15 years.
@b0rk I've been writing primarily Python code for the past 8 years, and I would probably fail an interview that asked about language minutiae like this.
@b0rk I've been writing C for over 25 years. Every time I need to declare a function pointer, I still have to cut and paste it
@b0rk There are sooo many parts of languages and tools I use that I don't know. It's fun to dig in deep and learn all the things, but often I have a job to do! If I don't need to know right now I might not learn it! This is very relatable (I also don't have much understanding of setup.py while having similarly long experience using python).
@r343l @b0rk I regularly feel this way about the English language, to be honest. And I've been using it almost exclusively for decades.

@b0rk

🤓 "axkshually, you're not shupposhed to use shetup anymore. "

"let me tell you about the 15 tools we have invented to simplify things."

🤣

Packaging is weirdly simple and weirdly complicated for how simple it is, don't worry about it.

@bmaxv this is a common misconception, setup.py is very much not deprecated.

*Running* setup.py directly as a program, on the other hand, is.

@SnoopJ Ok.

Here is the official building, packaging, distribution project.

Notice how it doesn't contain setup.py?

https://github.com/pypa/sampleproject

All that's missing for the deprecation is the announcement.

GitHub - pypa/sampleproject: A sample project that exists for PyPUG's "Tutorial on Packaging and Distributing Projects"

A sample project that exists for PyPUG's "Tutorial on Packaging and Distributing Projects" - pypa/sampleproject

GitHub

@bmaxv right, if setuptools announces that it is deprecated, then it will become deprecated.

I anticipate that to happen never.

It is possible that in the future `pip` might drop support for legacy projects that predate PEP 517, but this hasn't happened yet.

@bmaxv in short:

Out of favor? Certainly.

Deprecated? Absolutely not.

@SnoopJ @bmaxv until ~2 years ago (last substantial python I did), I still occasionally saw people start *new* projects with distutils. And even more frequently, importing six for new python3 stuff.

Nothing ever dies in the python ecosystem.

@b0rk I remember so little about how to do packages in Python that I've been copying and pasting the same setup.py (and later pyproject.toml) for all of the projects I've done, for years. Nowadays editing a pyproject.toml is fine, but writing one from scratch? nope
@b0rk and the ones that only call `setup()` with no arguments are even more confusing!
@b0rk my job title is Sr Software Developer, my work is 99% Python, I still _barely_ know what setup.py does (or any of the alternative replacements for that matter).
@b0rk I've never felt like I've missed out, but maybe it solves all of my problems. Who knows! 😂

@b0rk My investigations led to the following conclusion: it hides important things in the last place you’re going to go look for them.

I once had a dependency conflict that would add files from a deprecated package to the files of the current, differently named package, and it turned out it was because I had a package with a setup.py that I also have no idea how it’s supposed to work that had the deprecated package listed as a dependency.

@b0rk the day after figuring out setup.py: "no, we use pyproject.toml now"
@b0rk Sets are something surprisingly many Python programmers never use. Another thing is for ... else.
@b0rk at some time I discovered the __init__ thing and already forgot how to use it for creating modules (or whatever it's called)
Also venv magic, no idea.
@b0rk I had this very experience yesterday as I was trying to wrap my head around pipenv, pipx, flit, hatch, pdm, build, project.toml, poetry, and about a half dozen PEPs.

@b0rk same feeling when Python came up on https://progle.net

Me: “I know Python, this can’t by Python”
Also me, 2 minutes later: “…I know nothing”

progle()

Guess todays programming language in progle(). progle() is a game where you guess a programming language based on hints about it!

@b0rk eh. I feel that. Every other day I forget that in sql I should do "is not NUL" rather than "!= NUL"

@b0rk
me: "I avoid Python 2 and stick to the latest stable Python, or at least nothing order than Python 3.10"

also me: <cannot name a single Python language change between Python 2.7 and Python 3.13>

@b0rk I don’t work with a single person who can edit a csproj file manually. And that’s probably close to 100 years of experience with csharp and dotnet.

Sometimes we don’t have to care about the nitty gritty details.

@b0rk I’m convinced that nobody actually understands python packaging and there’s just a group of BSers that pretend that they do. Utterly incomprehensible.
@b0rk #uv #pythonuv + pyproject.toml; https://github.com/astral-sh/uv - never look back on setup.py; future is bright
GitHub - astral-sh/uv: An extremely fast Python package and project manager, written in Rust.

An extremely fast Python package and project manager, written in Rust. - astral-sh/uv

GitHub
@b0rk That's been my experience with Python. Everbody kinda copies their setup from one project to the next until until it's only ever been that way, changing it is too scary, and why it works is the stuff of legends.