Author archives: Mike

RSS feed of Mike

Django Field Rename Migrations and Test Cases

Is there some trick to running Django test cases when you've got a RenameField later in the migration-stack? I feel like this has to be some obvious thing I'm missing...

With a migration (say 0058_big_restructure.py) which does this:


migrations.RenameField(
model_name='rfsource',
old_name='source_name',
new_name='follow_source_name',
),

and a previous migration, (say 0006_long_ago_change_that_populates_some_other_field.py) which doesn't explicitly reference the source_name ...

Continue reading

Seems Time Warps have Infected the Blog

Just randomly clicked through a similar posts link and found an article that was (actually) published in 2015 claiming to be published in 2020. Clicking through more random links, it seems that every article that existed when I moved the blog to the new service on May 18th of last year got the timestamps modified ...

Continue reading

PycraftServer Plugin

So the boys (and their cousin) are both into Minecraft again, so I've been refining the Pycraft code quite a bit. We no longer use the RaspberryJuice plugin, but instead have a custom Bukkit plugin that does Java reflection/introspection to auto-generate the API. That lets us do a lot more, manipulate inventories, read and write ...

Continue reading

Adding a Certificate Authority to Chrome Trust Store

So you have a corporate or project specific root of trust you need Chrome to recognise. How do you take your PEM certificate as you get from easy-rsa or the like and make it something that Chrome will accept? The answer is not particularly complex, but it really seems like this very-common process is not ...

Continue reading

PyOpenGL Build Enhancements

Spent the evening getting the Python 3.9 build for PyOpenGL-accelerate running on Appveyor. In the end it was just knowing to add a tag "APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019" to the build-matrix for that one Python version so that it is built on the Python 3.9-compatible build-image. Will have to boot into Windows to test that ...

Continue reading

First Snap Package Doesn't Impress

So with the move to 20.04 I've now run into my first package (rocketchat-desktop) that has given up on debian packages and only provides a snap package... and... well... it just doesn't run. It installs, it pretends to run and exits without any obvious error or message, but nothing happens.

Luckily this particular package is ...

Continue reading

Ubuntu Upgrades are Magic unless they aren't

There is something magical about asking Ubuntu to upgrade your desktop while you're running it. "Hey, Ubuntu, let's try focal" and it heads off to churn through downloading 6GB of stuff and unpacking/installing it. You head off to work in the meantime.

But it gets stuck because you have postgresql and it doesn't make it ...

Continue reading

RunSnakeRun 3.0.0 Beta 1

So I finally sat down and finished off the work I was doing a while ago to get RunSnakeRun updated to run on Python 3 and support pyspy/speedscope files. There was a bunch of stuff needed to make us compatible with the wxPython Pheonix releases, a huge and horrible hack to let us load Python2 ...

Continue reading

Listener GUI Started

So with the code-context, the dictation in Listener is getting okay-ish. It's still pretty frustrating and error prone, but I can use it maybe 1/4 of the time (mostly for doc-strings). Part of the frustration is just that the language models are not yet well tuned for some commonly needed phrases that the tokeniser didn't ...

Continue reading

Auto-link a Host-provided Package into a Virtualenv

There are Python packages that are basically a PITA to get compiled into your virtualenv. The one I constantly hit when doing GStreamer, DBus, IBus, etc is gobject-introspection (a.k.a. gi). So, there's now a trivial package available:

source path-to-venv/bin/activate
pip install venvhpl
venv-hpl gi