Brought to you by Michael and Brian - take a Talk Python course or get Brian's pytest book

#384: Force push lightly

Published Tue, May 21, 2024, recorded Tue, May 21, 2024
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by Mailtrap: pythonbytes.fm/mailtrap

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Tuesdays at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: Git: Force push safely with --force-with-lease and --force-if-includes

  • Adam Johnson
  • Using gentle force
  • Avoid stomping on remote changes with a couple extra flags.

Michael #2: Thoughts from PyCon 2024

  • PyCon is special - the connections you make are always more than you expect
  • Great to see many old friends
  • Did a ”live” Talk Python episode that’ll be out in a few weeks.
  • The talks look great, we’ll let you know when they land on YouTube.
  • Masks were a mistake - universally heard complaints from fellow attendees. This is my two cents towards a more reasonable next PyCon.

Brian #3: Being friendly: Strategies for friendly fork management

  • That’s part 2.
  • Part 1 is Being friendly: Friendly forks 101
  • Lessley Dennington on GitHub Blog
  • Examples of long running friendly forks
    • git-for-windows/git, microsift/git, github/git
    • two public, one private
  • Fork management strategies - when pulling changes downstream
    • merging rebase
      • git-for-windows/git uses this proactively and regularly
      • fake merge + rebase
    • new branch
      • microsoft/git uses this
      • new branch from upstream major versions
      • merge previous changes to new branch
    • traditional merge
      • github/git uses this, conservatively, after a few point bug fix versions

Michael #4: tach

  • A Python tool to enforce a modular, decoupled package architecture.
  • tach allows you to define boundaries and control dependencies between your Python packages.
  • Each package can define its public interface.
  • If a package tries to import from another package that is not listed as a dependency, tach will report an error.
  • If a package tries to import from another package and does not use its public interface, with strict: true set, tach will report an error.
  • Zero runtime impact.

Extras

Brian:

Michael:

Joke: Evolution of smart products


Want to go deeper? Check our projects