Live data from Hacker News

What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

bitecode.dev

101–110 of 123 posts

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#101
> It's also a good time to remind you once again that 3.13 will deprecate a lot of things

People get this wrong more often than they should. The link says things will get removed in 3.13, not just deprecated. So many people seem to think deprecate is just some fancy word for remove. I really don't get it. Remove means remove. Deprecate does not mean remove.

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#102

[flagged]

Python is like anything in that it rewards experience. If you know about asyncio you can write beautiful, performant code that can deal with networking, files, and other blocking resources without halting the program every time. If you know about processor executor pools -- you can easily execute CPU-intensive operations on different cores even though your main program is single-threaded. If you know a little about d…

[dead]

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#103
post #11

Earlier quoted context omitted.

What does the term "scripting language" mean to you?

Not the original poster, but to me it usually refers to a language that is expressive and high-level but usually not fast or efficient enough to implement the actual heavy lifting. It seems fair to call Python a scripting language. This is not a derogatory term, rather it actually describes a great way to build software and explains Python's success.

[dead]

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#104

[flagged]

I prefer compiled and statically typed languages myself, but it seems a bit absurd to not consider Python a general purpose programming language. It's Turing complete, has one of the most fully-featured standard libraries in existence, and can interface with native libraries.

[dead]

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#105

Earlier quoted context omitted.

If someone who made the changes can't explain things clearly, I'd even wager that they didn't understand what they're changing properly. A good commit message is needed as the author might be gone but software is maintained for decades. Productivity is easy, writing a good message isn't, as the latter seems to be hard for many and it's telling of their understanding of systems they change.

Many teams will just use squash merges to avoid wasting time on commit messages and end up with just one commit to the main branch and cleaner history.

When I'm having to wade back through previous commits trying to debug a problem, there's nothing I hate more than finding someone's large squashed commit. Instead of using automated bisect tooling, I have to try and understand what they did and untangle it. This might be an area of the codebase I'm unfamiliar with and it'll take even longer. Compared to this, writing a few extra commit messages costs nothing. I really don't get it.

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#106
post #99

Earlier quoted context omitted.

You were not forced to do that because TOTP is manageable via password manager. TOTP and yubikey are excellent technologies that way. They allow two-factor authentication without breaking privacy. Everyone within the sound of my voice: get a password manager. It sounds like a hassle but it makes your life infinitely better. It allows you to keep your life private and more secure than it was while providing more conve…

So KeepassXC can do TOTP like authy? Cause I would love to switch from that app if I can.

Yes!

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#107

Earlier quoted context omitted.

It is interesting to see just how conservative the core devs are against even the most benign way forward (including more consistent aliases without immediate deprecation). Indeed, not a hill worth dying on either way but it’s a little wild the counter argument is “increased support costs” when, let’s be real, there is no significant increased support beyond the initial scope of work. If core Python ever plans on con…

Adding new aliases to be consistent with Python's prevalent coding style? Increased support costs, not worth it. Deprecating often-used APIs like datetime.datetime.utcnow() because they're ugly? Sure, we'll do that, that won't cause anyone problems unless their code is wrong. (At least they didn't set the removal date to be +2 releases = +2 years, as they usually do.)

The Python standard library is primarily managed by volunteers, and different sections have distinct maintainers, resulting in diverse choices.

When there's no strong advocate for a module, implementing changes becomes a challenging task. However, modules with dedicated champions, such as datetime by Paul Ganssle or pathlib by Barney Gale, may undergo significant modifications after consideration and discussion.

Not everyone in the broader Python community will be pleased with these alterations, but they aren't made hastily. I suggest we show empathy towards those who willingly take on the responsibilities of being open-source maintainers, it's a fiery task.

While I've personally expressed dissatisfaction with the utcnow change on the Python discussion page, I also acknowledge that I'm not responsible for maintaining this module. Consequently, I've updated my code in a completely backwards compatible way: datetime.datetime.utcnow() -> datetime.datetime.now(datetime.UTC).replace(tzinfo=None).

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#108

While I'm not against security and 2FA in general, making PyPI 2FA mandatory ahead of any kind of org support is a major pain for big projects with more than one maintainer. This week I was forced to link my company's pypi account to a personal device to unblock our latest release and now none of the dozen other maintainers I work with can get access. Things will get spicy if someone in my position were to die, leave…

I suspect it has more to do with the legal backchatter on supply-chain attacks in opensource. The likes of GitHub and GitLab already have a bunch of features they can point at, should a lawyer come knocking; PyPi doesn't have anything.

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#109
post #86

Earlier quoted context omitted.

`git rebase -i develop` is arcane? An editor opens where you put an 'r' in front of every commit that needs rewording. Save and close, and Git will successively open an editor for every commit message. Force Push and you're done. If you're not willing to bother with command line: the Git client in Jetbrains also lets you edit commit messages in a very straightforward way.

Force push can be scary to some. Some nitpickers may also ask you to squash/reorder/split commits to satisfy their OCD.

I am one of those who would insist on correctly splitting commits. Commits are a communication tool, and a well-crafted series of commits makes reviewing pull requests, which is a chore for most people, a lot easier. Months or years later, it is still important to easily review changes.

In a Gitflow repository I don't particularly like squashing feature branches since a sequence of commits allows the author to better document what they were thinking about. Squashing is fine in Trunk-based development since feature branches are usually less extensive.

I hate intermediary merges on feature branches because they tend to make up a large portion of the branch history and are harder to review than normal commits.

Re: What's up Python? Epic CPython commit, Django 5 and 2FA for PyPI

#110

Earlier quoted context omitted.

Namespacing does not prevent (or even significantly complicate) dependency confusion, unless we think that there's some difference in confusability between these two errors: requestss and requestss/requests (I think namespacing is a good idea in general, but dependency confusion is mostly a disjoint namespaces problem, not a depth problem. Python could solve the former by doing what Go does and make the source reposi…

I think you have the wrong idea of what dependency confusion is. Here's the scenario: 1. Company develops package `company_secret_project_stuff` and publishes version 1 on their internal private PyPI instance. 2. They tell their employees to install it via `python3 -m pip install --extra-index-url https://pypi.intranet.company.com company_secret_project_stuff` 3. pip dutifully goes and installs the hacker's version o…

2 pip installs can trivially solve this issue and I use this at work.

One pip install only for private packages using the --index-url (NOT --extra-index-url) and then the other pip install for public packages no index modifiers needed.

Post reply on HN