Pendant la fermeture d'une portion du périphérique parisien, et son utilisation par des cyclistes, on aurait constaté une baisse massive de la pollution de l'air. Bizarre...

TypeError: '<' not supported between instances of 'NoneType' and '<whatever>'

my favorite thing when migrating a project to python3

dlax boosted
dlax boosted

"Carole, de Pantin, est venue avec des huîtres, du pain, du vin blanc et ses amis. Elle offre une huître à qui veut. « On s’est dit que ça s’imposait »."

dlax boosted

#imag is now on #sourcehut #srht -

Feel free to collaborate! I do not yet use the srht mailinglist feature because we have our own mailinglist.

dlax boosted

I'm about to go back to my day job from my lunch break, but before I do I want to announce a little tool called #blueshift.

It's a lightweight partial replacement for #redshift implemented in POSIX #shell that uses #sct by Ted Unangst to control your display's color temperature based on the time.

It's available on #Sourcehut at <> under a 2-clause #BSD license.

You can run it in ~/.xsession, as a cron job, or in /etc/apm/resume.


"L'espace d'un an", de Becky Chambers : un space opéra où on suit l'équipage multi-espèces d'un vaisseau spatial ouvrier. Très agréable à lire, beaucoup d'émotions.

dlax boosted

Once confident everything works fine with (tests suite is green, resolved all runtime errors spotted by, e.g., ): drop support.


Finish with all oddities left like comparison of values of heterogeneous type ("1 < 'infinity'" is True on ) or silly things like ordering a list of dicts.


Then, it's often time to dig further into "text versus binary data" issues. Clearly the most painful part of the process because it's often has to do with non-obvious business logic. Things get even worse when third party libraries (e.g. lxml) are in use.



Every time I see "open(filepath)", I change it into ", 'rb')" to preserve behavior. This is fine most of the times; when it's not, it's usually because of some specific business logic you'll have to investigate on anyways. (Similarly, StringIO.StringIO -> io.BytesIO.)


Try an automatic code porting tool, like python-modernize.readthedocs.i, to remove idioms. This is no silver bullet but it helps. For instance, it will detect things now in six.moves (like itertools.imap) or usage of .next() and update your code. On the other hand, it sometimes does useless things like changing "for k, v in d.iteritems():" into "for k, v in six.iteritems(d):".


First run flake8 with python3 and fix all spotted errors (e.g. "except ValueError, exc:"). Easy.


Been porting a fair amount of code from to at @logilab recently. Here's a thread about how I usually proceed and what I learnt. (1/7)

As for other distros, packages are automatically built and uploaded following upstream changes on thanks to the awesome system on . Package build logic and repo management lives at

Over the past few months, I've been working on packaging the forge for . This is now available from the mirror. See to give it a try for self-hosting.

dlax boosted

Vous l'attendiez, #CyclOSM, la carte cycliste libre basée sur les données #OpenStreetMap, est maintenant disponible dans le monde entier avec mises à jour minutaires !

Et tout ça est possible grâce au soutien de @osm_fr !

dlax boosted

"Arrivés sur le lieu de l'accident, les militants ont bloqué la circulation pendant une vingtaine de minutes. Un message émouvant de la mère de la victime a ensuite été lu. Ils étaient plus d'une centaine de cyclistes à participer à cette "masse critique""

#ghostbike #Toulouse

dlax boosted
Show more
La Quadrature du Net - Mastodon - Media Fédéré

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