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...

carfree.fr/index.php/2019/10/1

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 »."
lemonde.fr/blog/transports/201

dlax boosted

#imag is now on #sourcehut #srht - git.sr.ht/~matthiasbeyer/imag

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 <git.sr.ht/~demifiend/blueshift> under a 2-clause #BSD license.

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

#FOSS

"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.
(7/7)

@logilab

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.
(6/7)

@logilab

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. docs.python.org/3/howto/pyport

(5/7)

@logilab

Every time I see "open(filepath)", I change it into "io.open(filepath, '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.)
(4/7)

@logilab

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):".
(3/7)

@logilab

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

@logilab

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 builds.sr.ht system on . Package build logic and repo management lives at git.sr.ht/~dlax/sr.ht-debbuild

Over the past few months, I've been working on packaging the forge for . This is now available from the sr.ht mirror. See man.sr.ht/packages.md#debian 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 !

cyclosm.org/

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
france3-regions.francetvinfo.f

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!