@brettcannon@fosstodon.org
@brettcannon@fosstodon.org avatar

brettcannon

@brettcannon@fosstodon.org

#Python core developer; dev manager for the Python experience for #Microsoft #VSCode (although opinions my own, etc., etc.); snarky #Canadian

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

brettcannon, to random
@brettcannon@fosstodon.org avatar

I wrote https://snarky.ca/saying-thanks-to-open-source-maintainers/ after deciding to sign up for GitHub Sponsors and initially feeling bad about it (https://github.com/sponsors/brettcannon/). I also reflected during my parental leave (which ended yesterday) on what actually makes me happy about open source which led to that blog post.

This is also a soft launch of publishing my open source notes from Obsidian.

https://opensource.snarky.ca/

brettcannon,
@brettcannon@fosstodon.org avatar

@danyeaw That's why I couched it w/ "contributions from others can be a blessing and a curse all at the same time depending on the contribution itself, the attitude of the person making the contribution, etc." Context very much matters, but I would never say that all contributions are a replacement for saying thanks or a positive thing, just that they can be.

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

Do you look at a project's trove classifiers to tell what Python versions are supported (e.g. does it support Python 3.13 yet)?

brettcannon,
@brettcannon@fosstodon.org avatar

@carlton @davidism I will admit I am asking this thanks to @hynek and https://github.com/hynek/build-and-inspect-python-package?tab=readme-ov-file#define-python-version-matrix-based-on-package-metadata .It's an interesting way to statically define what versions you want to test against instead of a network call to get the data or some Python package that has the release details which you can never pin (both solutions I have considered). It does shift to wanting a cron job or being very on top of when the new Python versions are released, but that's at least mostly predictable.

brettcannon, to random
@brettcannon@fosstodon.org avatar

@offby1 Cheering for the Oilers or Canucks?

brettcannon,
@brettcannon@fosstodon.org avatar

@offby1 I at least hope we can all cheer for the same team in the western conference finals

brettcannon, to random
@brettcannon@fosstodon.org avatar

Looking for a Bash one-liner to tell by exit code whether your Git checkout is dirty?

if [ -n "$(git status --porcelain)" ]; then (exit 1); fi

I sought this out for GitHub Actions so that I could set up a formatting command for a project and then check in CI if it would change anything instead of having a second command just for the check (e.g. black followed by this in CI instead of having a separate, dedicated black --check just for CI). Basically trying up the DRY on maintenance stuff

brettcannon,
@brettcannon@fosstodon.org avatar
- name: Check if any files were changed  
 run: if [ -n "$(git status --porcelain)" ]; then (exit 1); fi  
 shell: bash  
brettcannon,
@brettcannon@fosstodon.org avatar

@henryiii Does that cover untracked files?

brettcannon,
@brettcannon@fosstodon.org avatar

@diazona Does that cover untracked files?

brettcannon,
@brettcannon@fosstodon.org avatar

You can also use this to detect if there are any untracked files. Handy if you have a file generation step that might produce new files that accidentally get left out of a PR.

brettcannon,
@brettcannon@fosstodon.org avatar

@diazona is that true when --porcelain is specified?

brettcannon,
@brettcannon@fosstodon.org avatar

@diazona and I can check myself when I get home and don't have baby stuff occupying me

brettcannon,
@brettcannon@fosstodon.org avatar

@diazona https://git-scm.com/docs/git-status#Documentation/git-status.txt--ultmodegt

Default is to include untracked files, so at least for GitHub Actions it isn't necessary, but I will update my own notes on this. Thanks for the info!

brettcannon, to random
@brettcannon@fosstodon.org avatar

Thanks to everyone who voted in https://fosstodon.org/@brettcannon/112395986863435778 ! An interesting outcome was that "chore" got a large number of write-in votes (see the replies to the poll). It was actually so consistent and numerous i wouldn't be surprised if it would have won the vote had I included it. 😅

brettcannon,
@brettcannon@fosstodon.org avatar

@miketheman @terri Conventional Commits has been referenced multiple times as to why to pick "chore", so I suspect it is a big motivator.

brettcannon,
@brettcannon@fosstodon.org avatar

@offby1 @hynek I'm not surprised as I don't typically look at others' labels unless I'm deeply involved in a project since I can't set them otherwise.

brettcannon,
@brettcannon@fosstodon.org avatar

@encukou yes, because I only know post-poll it was so popular.

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

One default issue/PR label I feel like new GitHub projects lack is one for project/internal "stuff" (e.g. upgrading some GitHub Action version; something that doesn't impact released code). What would you name such a label?

brettcannon, to vim
@brettcannon@fosstodon.org avatar

If I can't convince you to use VS Code, but you want to try and have found it intimidating, my friend Dusty Phillips has a free book he has started to write on at https://lazyvim-ambitious-devs.phillips.codes/ (blog post about the book at https://dusty.phillips.codes/2024/04/25/lazyvim-for-ambitious-developers/).

pawamoy, to random
@pawamoy@fosstodon.org avatar

I've started sponsoring @brettcannon (who just launched his sponsorship page on GitHub) for his work on Python! Thanks Brett for everything you're doing for the language and its ecosystem 🎉

https://github.com/sponsors/brettcannon

brettcannon,
@brettcannon@fosstodon.org avatar

@pawamoy Thanks for even noticing before I really announced the sponsor page's existence!

brettcannon,
@brettcannon@fosstodon.org avatar

@pawamoy BTW I added a new sponsor tier just for you in case you want to switch to it.

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

When using an environment variable as a boolean flag, what do you expect code to do to decide whether the environment variable represents true or false? Does the mere existence of the environment variable represent a state regardless of value (true or false would depend on what the flag represented, but probably true if set), or do you expect a 0/1 value to be checked for to determine true/false (and the lack of existence representing some default)?

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

For those of you who chose our baby showing up before we got agreement on a lock file standard, you were right. 😅 https://fosstodon.org/@brettcannon/112052305281270127

Thanks to the kid being so late, though (one day shy of 42 weeks), I have most of a PEP written and gotten feedback from select people already.

And before anyone asks, I don't plan to share photos, name, or gender publicly; I don't want to dictate their online presence. But I do suspect they will eventually attend a conf w/ us, so you can ask them yourself 😉

brettcannon, to random
@brettcannon@fosstodon.org avatar

When you're packing for a trip, what questions do you ask yourself to determine what to pack?

Our questions are:

  • Who's going on the trip?
  • What's the purpose of the trip?
  • What's the weather going to be like?
  • How are you travelling?
  • What kind of accommodation?
  • Travelling internationally?
  • Will anyone be at home / do you need to prep the house?
brettcannon, (edited )
@brettcannon@fosstodon.org avatar

If I were to publish my journal entries on the open source I work I do each day and my various personal notes (i.e. my Obsidian vault for open source stuff), under what (sub)domain should I do it?

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