HNHacker News
TopNewBestAskShowJobs

alasdairnicol

47 karma · joined November 12, 2013

submissionscomments
alasdairnicol··on Uv is fantastic, but its package management UX is a mess
Forgive me for asking a slightly inhaled question - Is there a way to get uv to respect `exclude-newer` in `pyproject.toml`?

When I run `uv run` it removes `exclude-newer` from pyproject.toml.

I could run `uv run —-frozen` or `uv run --exclude-newer` all the time, but that doesn’t seem quite right. Is there an idiomatic flow that I’m missing out on?

alasdairnicol··on Amazon Sidewalk
My Roku remote takes several seconds to wake up and connect (over bluetooth?) every time I turn on the TV. It's infuriating. Give me back IR with its line of sight limitations!
alasdairnicol··on My Python testing style guide (2017)
Yes it looks as if that functionality is in 2.0, but the list of typos isn’t as extensive as in later versions.

https://mock.readthedocs.io/en/latest/changelog.html#and-ear...

alasdairnicol··on My Python testing style guide (2017)
This behaviour has changed in Python 3.5 [1], and it was also backported to the mock package.

When unsafe=False (the default), accessing an attribute that begins with assert will raise an error.

[1]: https://docs.python.org/3/library/unittest.mock.html#the-moc...

alasdairnicol··on Kickstarter’s staff is unionizing
You aren’t forced to pay the political levy in the UK, you can opt in/out.
alasdairnicol··on Django Newbie Mistakes
Thanks for the clarification. My point was that this wiki page is out of date so probably not that useful. I could have been clearer that the wiki is not part of the official documentation.
alasdairnicol··on Django Newbie Mistakes
> The middlewares shouldn't be redirecting POSTs then! They could have returned a client error instead.

This has been fixed since Django 1.0, released in 2008. The page links to the commit that fixed the issue.

alasdairnicol··on Django Newbie Mistakes
Django’s documentation is excellent, but parts of the wiki are out of date.

This page has barely been updated in the last four years. It mentions MIDDLEWARE_CLASSES (deprecated in Django 1.10) and using strings in url() (deprecated in Django 1.8). There may well be other bits which are out of date.

The entries in the faq [1] are more likely to be kept up to date.

[1]: https://docs.djangoproject.com/en/2.0/faq/

alasdairnicol··on America’s Teens Are Choosing YouTube Over Facebook
I didn’t like this attempt to get you to install the messenger app either. However, I found out you can access messages on mobile using mbasic.facebook.com
alasdairnicol··on 219 days of postmarketOS
Oops, I got my OSs mixed up. The bootloop was after I installed LineageOS, then OnePlus flashed it back to the official OxygenOS.
alasdairnicol··on 219 days of postmarketOS
I got my OnePlus stuck in a boot loop after installing Oxygen OS. OnePlus support scheduled a remote session and managed to flash it back to stock. I was very impressed, I had assumed they would refuse the help because I had flashed it with an unofficial OS.
alasdairnicol··on Facebook launches Stories in its main app
You can still read Facebook messages on the mbasic site.

https://mbasic.facebook.com/messages

alasdairnicol··on Removing Python 2.x support from Django for version 2.0
Agreed 1.4 LTS to 1.8 LTS was tricky, but future LTS to LTS upgrades like 1.8 to 1.11 should be easier. From 1.8 onwards, if your code runs without depreciation warnings in one LTS, then it should work on the next.
alasdairnicol··on New XPS 15 Laptop
There is one Thunderbolt 3 port.
alasdairnicol··on Django 1.10 released
[1]: https://docs.djangoproject.com/en/1.9/internals/release-proc...
alasdairnicol··on Django 1.10 released
Django has a time based release schedule [1]. The class based authentication views weren't committed until after the feature freeze for the 1.10 alpha.
alasdairnicol··on The new Ford, a Silicon Valley software company
As well as Holden in Aus/NZ, it's Vauxhall in the UK, and Opel in the rest of Europe.
alasdairnicol··on MacBook Pro Repair Extension Program for Video Issues
My Macbook died last month after 15 months, outside of the 1 year warranty. I had bought it from Apple's website.

The local certified shop wanted £99 to diagnose the problem. Apple weren't particularly helpful when I asked for help to get the fee waived (their staff in the US don't know about the UK Sale of Goods act, understandable perhaps), so I had to take a 40 minute train journey to my nearest Apple store.

The Apple store diagnosed the problem and immediately offered to repair it for free 'under UK consumer law'. I was pretty happy with the experience, but would have preferred if the local certified shop had been able to diagnose and repair the laptop for free instead.

alasdairnicol··on MacBook Pro Repair Extension Program for Video Issues
> If an expensive laptop breaks after 4 years, then you can argue it wasn't fit for purpose and therefore must be fixed or replaced (or a full refund issued). As long as you haven't caused the problem through misuse, you're covered.

My understanding is that under the Sale of Goods Act you are entitled to a partial refund [1], which reflects the use that you got out of the product. For example, if a laptop broke after 4 years, and 6 years was a reasonable lifespan, that suggests a 1/3 refund.

I believe that the new EU directive entitles you for a full refund for the 2 years of the warranty. In this regard, it's a stronger protection than the UK Sale of Goods act. In other regards, the Sale of Goods act is stronger (5 years to make a claim in Scotland, 6 in England, Wales and Northern Ireland).

> Unless you'd bought it from another person rather than a business, you should have received the same treatment. This isn't Apple being nice, this is them fulfilling their legal obligations.

Some retailers might be quicker to fulfil their obligations than others, so that's worth considering when choosing where to buy the product. My recent experience at the Apple store after buying from the Apple website was pretty positive.

edit: re-reading your post, I realise that you already pointed out that your rights are against the retailer, not the manufacturer.

[1] http://www.which.co.uk/consumer-rights/regulation/sale-of-go...

alasdairnicol··on The God Who Peter Molyneux Forgot
I have a happier experience of winning a Molyneux competition. Back in the day, I entered a Theme Hospital competion on the Bullfrog website, and received a copy of Syndicate and a Bullfrog leather jacket in the post. I was maybe 12, so the XL jacket was far too big for me, but I was still thrilled.
alasdairnicol··on Django 1.7b1 released
Django 1.7 supports Python 2.7, 3.2 and 3.3 [1]. I guess Python 3 isn't mentioned on the 1.7 release notes because Python 3 support has not changed from 1.6. I can see how you'd find that confusing.

[1]: https://docs.djangoproject.com/en/1.7/faq/install/

alasdairnicol··on Django 1.7 alpha 1 released
It took me quite a while to find tickets and patches that I could work on. I started with a couple of really trivial documentation fixes, and am building from there. I agree that the ticket list can be a bit daunting, so don't give up!

Searching the tickets that require documentation [1] or unit tests [2] can be a good place to start. It's a sign that a bug or new feature has been accepted, and that the patch can be accepted with some improvement. If a ticket is assigned to somebody, but hasn't been worked on for a few weeks, then don't be afraid to pick it up and improve it.

If there are any sprints happening near you, then go along. Daniele Procida runs a workshop Don't Be Afraid to Commit, which covers a lot of the basics you need to write your first Django patch (git/sphinx/...). The workshop is online [3].

There's a low traffic Django Core Mentorship mailing list [4] that you could join, or #django-dev on IRC might be helpful.

Good luck!

[1] https://code.djangoproject.com/query?status=!closed&needs_do...

[2] https://code.djangoproject.com/query?status=!closed&needs_te...

[3] https://dont-be-afraid-to-commit.readthedocs.org/en/latest/

[4] https://groups.google.com/forum/?fromgroups#!topic/django-co...

alasdairnicol··on Django 1.7 alpha 1 released
I wrote that BooleanFields without defaults patch! I'm glad that the warning has been seen by at least one person!

The ./manage.py validate command has been replaced with ./manage.py check in Django 1.7. The new system checks framework [1] is extensible, so third party apps will be able to add their own checks.

[1]: https://docs.djangoproject.com/en/dev/ref/checks/