@graham_knapp@hachyderm.io
@graham_knapp@hachyderm.io avatar

graham_knapp

@graham_knapp@hachyderm.io

Python, engineering, folk music, français, English, Brezhoneg, Leeds, Sheffield, Nantes

This profile is from a federated server and may be incomplete. Browse more on the original instance.

brettcannon, (edited ) to random
@brettcannon@fosstodon.org avatar

With https://peps.python.org/pep-0723/ being accepted, I'm starting to think about how to implement it for https://python-launcher.app/ .

I'm leaning towards the py command implicitly detecting the block of TOML and doing the "right" thing automatically. The other option is making the functionality opt-in via a py run subcommand. I don't see enough benefit to warrant the subcommand, but I figured I would gut-check this in case I'm missing some workflow where this would be a concern.

So, which UX?

graham_knapp,
@graham_knapp@hachyderm.io avatar

@brettcannon either way I would normally expect py to run in an environment I had already built. I would want to explicitly confirm downloading and installing things, e.g. because py or py run detected the block and asked me to confirm.

fasterthanlime, (edited ) to random
@fasterthanlime@hachyderm.io avatar

in an impressive failure of public transportation policy, it’s *about the same price and twice as fast to rent a car and drive to the airport, than to take public transportation + a shuttle (even if you live here)

edit: here’s the detailed breakdown: https://hachyderm.io/@fasterthanlime/111637882952516038

graham_knapp,
@graham_knapp@hachyderm.io avatar

@fasterthanlime €1.70 each to cross Nantes to the airport IF you can work out a route which avoids the Navette Aéroport

graham_knapp, to random
@graham_knapp@hachyderm.io avatar

Nedeleg an Naoned

mkennedy, to random
@mkennedy@fosstodon.org avatar

According to JetBrains, only 18% of developers & data scientists get their tech news from podcasts. Have they not heard of @pythonbytes? :) cc @brianokken

graham_knapp,
@graham_knapp@hachyderm.io avatar

@mkennedy @pythonbytes @brianokken maybe they think it's just a YouTube channel

hynek, to random
@hynek@mastodon.social avatar

Close followers might have noticed that I’ve been complaining about losing reach for text after the Twitterpocalypse, fewer speaking opportunities due to Unprecedented Times™ and their effect on conferences, and nobody “getting” svcs.

While complaining about reality is fun, I’m also aware that adjustment is necessary for survival and I’ve decided to take on a project this fall: producing a YouTube video about svcs!

It took MUCH longer than I thought but here it is: https://www.youtube.com/watch?v=d1elMD9WgpA 1/x

graham_knapp,
@graham_knapp@hachyderm.io avatar

@hynek awesome! Would it make sense to use this with or does it duplicate / clash with Django's own dependency management ?

fcodvpt, to python French

I made some code to extract the backends declared in the pyproject.toml files (1)

I used @sethmlarson great article : "Querying every file in every release on the Python Package Index" (2)

I called the gist (3) to dowload the files and everything worked fine.

-backends

(1) https://gitlab.liris.cnrs.fr/fconil-small-programs/packaging/get-pypi-packages-backends
(2) https://sethmlarson.dev/security-developer-in-residence-weekly-report-18
(3) https://gist.github.com/sethmlarson/852341a9b7899eda7d22d8c362c0a095

Here is the resulting bar chart (1/2)

graham_knapp,
@graham_knapp@hachyderm.io avatar

@mdk @fcodvpt @sethmlarson I'd be interested to see the rate of rise of maturin as an indicator of the -ification of python

graham_knapp, to django
@graham_knapp@hachyderm.io avatar

Help! I'm in environment variable hell trying to keep prod, preprod, ci and dev environment variables up to date in my app. Any advice? Symptoms include broken deployments, failed ci runs, broken dev environments, ...

graham_knapp,
@graham_knapp@hachyderm.io avatar

@webology yes we're using multiple settings file - a base and overrides for different environments. We read directly from a .env file only in local dev mode, otherwise reading from the docker environment, itself reading from .env
I've been meaning to look into 1password for this and modenv sounds like a good tip too. hmm ... not out of the woods yet ...

adamchainz, to django
@adamchainz@fosstodon.org avatar

My ”speed up the tests” PR to django-oauth-toolkit was merged on Friday. It made the tests about twice as fast, taking a single run from 207s to 105s.

https://github.com/jazzband/django-oauth-toolkit/pull/1352

The speed-up came from using ’s setUpTestData to create model instances once per test case, rather than once per test. I blogged about converting from setUp to setUpTestData here: https://adamj.eu/tech/2021/04/12/how-to-convert-a-testcase-from-setup-to-setuptestdata/

graham_knapp,
@graham_knapp@hachyderm.io avatar

@adamchainz very cool - Given the number of tests I'm surprised there were no side effects at all - I see no tests which failed because one subtest modified the data from setUpTestData

graham_knapp, to random
@graham_knapp@hachyderm.io avatar

Early computing memory... changing function key strips on the BBC microcomputer, or writing them out by hand.

graham_knapp, to django
@graham_knapp@hachyderm.io avatar

performance shock - 30% of our unit test time was taken by user creation (we create a new logged-in and non-logged-in user for each test) and almost all of that time was spent hashing passwords! Mocking the password creation shaved nearly 2 minutes off each ci run 😀

graham_knapp,
@graham_knapp@hachyderm.io avatar

@adamchainz ahh great tip thanks! I was thinking of patching it with hash but that looks much neater. Any tips for my next performance bottleneck - calling all signals on object creation? I imagine I can unhook them selectively but I need to keep some.

graham_knapp,
@graham_knapp@hachyderm.io avatar

@adamchainz wow that's amazing that you've literally written the book on our problems! For info, here is a zoom on the call graph after mocking the password creation - django.dispatch.dispatcher.Signal.send is running 912 times for 25 tests

graham_knapp,
@graham_knapp@hachyderm.io avatar

@adamchainz good to know - do your gumroad prices give a good idea of your day rates ? We're in money saving mode right now but may have more options next year after our next round of financing.

graham_knapp,
@graham_knapp@hachyderm.io avatar

@adamchainz great podcast episode - gonna play with my global git config now !

yanncphoto, to random French
@yanncphoto@piaille.fr avatar

deleted_by_author

  • Loading...
  • graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @yanncphoto Café !

    yanncphoto, to random French
    @yanncphoto@piaille.fr avatar

    deleted_by_author

  • Loading...
  • graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @yanncphoto et quel beau ciel ce matin !

    AlSweigart, to random
    @AlSweigart@mastodon.social avatar

    deleted_by_author

  • Loading...
  • graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @AlSweigart because of course reverse alphabetical order just makes sense 🙃

    kellogh, to random
    @kellogh@hachyderm.io avatar

    honest question: why is the sky blue but sunlight is white?

    graham_knapp, (edited )
    @graham_knapp@hachyderm.io avatar

    @kellogh @khalidabuhakmeh this explains why the sun looks red when seen through lots of atmosphere, near the horizon - lots of the blues have been scattered away

    kellogh, to random
    @kellogh@hachyderm.io avatar

    github copilot autocompleting phone numbers is a weird feel

    graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @kellogh I like when it hallucinates stack overflow urls

    graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @kellogh maybe we can learn more about ourselves from these surprises than we can about LLMs ! Like, why do we assume intelligence, reason and intent when presented with text which we know to be generated by a machine !

    willmcgugan, to random
    @willmcgugan@mastodon.social avatar

    This will be up for a couple of hours. Let me know if it works for you.

    https://textual-web.io/will-mcgugan/merlin

    graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @willmcgugan very janky on my android phone. What should it do,,?

    graham_knapp, to python
    @graham_knapp@hachyderm.io avatar

    Things which are hard in : millisecond startup times. Python startup typically takes hundreds of milliseconds. Workarounds: leave a localhost server or interpreter Daemon running.

    graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @f_dion @folkerschamel very cool ! I'm getting around 55 ms on Python 10 and 36 ms on Python 11 according to my Windows Powershell. That's much better than you could get a few years ago, but yes it is very dependent on what you are importing !

    graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @folkerschamel @kionay @f_dion haha - well played!

    futurebird, to random
    @futurebird@sauropods.win avatar

    IDK if I’m getting old or just impatient but I when see a password box that does ⚫️⚫️⚫️⚫️⚫️ with no option to see what you are typing I think the company is incredibly inconsiderate!

    You want me to conform my password to 30 annoying rules “must have a special character but not at the beginning or end” I’m using a damn touchscreen and now I can’t see what I’m typing. (This is why everyone hates passwords. )

    I’m not convinced ⚫️⚫️⚫️⚫️⚫️ makes it more secure anyway— is there any evidence?

    graham_knapp,
    @graham_knapp@hachyderm.io avatar

    @futurebird this is commonly known as the A B test.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • cubers
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • tacticalgear
  • osvaldo12
  • normalnudes
  • tester
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • anitta
  • Leos
  • provamag3
  • modclub
  • lostlight
  • All magazines