Follow

Python dev 

In recent years I've got a lot of mileage out of Python, but the packaging, building, distribution story is one that has been in constant flux since I've been developing with it. I never feel like I'm doing it right, and the blog post below confirms I have a boatload of code that is apparently doing it wrong. This shifting packaging story is a constant source of friction in this particular ecosystem, one that makes me wish I hadn't started down the Python path.

blog.ganssle.io/articles/2021/

Python dev 

And it's not just that it's shifting, it's that it's confusing. Especially when you are already juggling so many other things outside of Python with their own set of complexities.

Probably the real problem is that I allowed Python (yet another runtime) in to the list of dependencies. I don't want to leave Python out completely, but perhaps it is best used, in my context, as a scripting and notebook tool and not as a production tool. But those lines can be blurry anyway.

Python dev 

Having said all that, I'm glad that post exists. I was really unaware of most of what is in there.

re: Python dev 

@cstanhope this seems to be a disease that is particularly acute in popular contemporary programming languages.

Hot take: too much fashion in programming.

re: Python dev 

@requiem Yeah, I was reading that blog post, and I am honestly confused about where the improvement lies. They've clearly decided there's a "frontend" and a "backend", but it's unclear to me that these are good abstractions that will be a benefit overall. It feels a little like we've just moved some things around. But I admit to being in a state of confusion about it all right now.

re: Python dev 

@requiem @cstanhope Things really started to go south the day that GvR stepped down as BDFL and let the PEP process dictate the future evolution of the language.

This isn't too suggest that GvR was some kind of oracle; he made plenty of mistakes. But, at least there was some semblance of predictability and stability.

re: Python dev 

@vertigo @requiem @cstanhope Sometimes it's better to be slightly wrong consistently ;-)

re: Python dev 

@patrick @vertigo perhaps GnR would have been a more suitable overseer?

@cstanhope

re: Python dev 

@cstanhope For the past few years, I've pretty much resolved all my Python issues with Poetry for dev and distro packages + Pipx for installing executables.

Python's dependency management has had an extremely convoluted history, but I think it landed in an okay place.

re: Python dev 

@Seirdy Thanks for the info. I've been meaning to try to find time to explore Poetry more. I'll be sure to add pipx to the list. And it's good to know people think things are getting to a good spot.

re: Python dev 

@cstanhope Yup, flakehell + nox + poetry + black + mypy is how I set up a python project nowadays. Once it's feature complete I throw in wemake-python-styleguide and darglint to get the code quality up to par.

Python dev 

@cstanhope @vertigo my experience with software development in general improved greatly when I started rolling my eyes at any claim that anyone is "doing it wrong", especially when "wrong" is defined as 'not the new shiny'

Does what you're doing work for you and the team maintaining the code you work on? Does it keep things simple and clear for your users? Does it respect your team and your users (eg by being safe and behaving reasonably and so on)?

Then you're doing it right. "Trendy" is a very bad reason to adopt anything, and change for the sake of change is a waste of energy

Python dev 

@calcifer @vertigo In general, I strongly agree with your sentiments. In this case it appears my practice regarding packaging is deprecated, which could be a problem for maintenance. It's just something I have to work through before I can decide one way or another.

Most likely what will happen is that I won't have time to work on it until everything finally breaks and then it is suddenly highest priority. :/

Python dev 

@cstanhope python is so cool but distribution has always been a shitshow

Python dev 

@cstanhope hot take: the fundamental error is having package management in the language at all. Package management is an operating system function, and attempting to do the OS's job when you are not the OS never ends well.

Sign in to participate in the conversation
social.coop

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!