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

#362: You can deprecate a global variable?

Published Tue, Nov 28, 2023, recorded Tue, Nov 28, 2023
Watch this episode on YouTube
Play on YouTube
Watch the live stream replay

About the show

Sponsored by Scout APM

Connect with the hosts

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

Brian #1: Habits of great software engineers

  • As we wind up the year, many people are thinking about goals for the new year.
  • Here’s a decent list to think about
    • Focusing beyond the code
    • Efficiency / Antifragility
    • Joy of tinkering
    • Knowing the why
    • Thinking in systems
    • Tech detox
    • The art of approximation
    • Transferring Knowledge to Other Problems
    • Making Hard Things Easy
    • Playing the Long Game
    • Developing a Code Nose
    • Strong Opinions loosely held

Michael #2: Flask 3.0

  • Deprecate the __version__ attribute. Use feature detection, or importlib.metadata.version("flask"), instead. #5230
  • This is news to me:

    [build-system]
        requires = ["setuptools", "wheel"]
        build-backend = "setuptools.build_meta"
    
        [metadata]
        name = "your-package-name"
        version = "0.1.0"
    
  • Remove previously deprecated code. #5223

Brian #3: Build Conway's Game of Life With Python

  • Leodanis Pozo Ramos
  • CLI curses version
  • Nice walk through of breaking the problem into parts.

Michael #4: polars business

  • It's a plugin for Polars, which allows you to do business day arithmetic.
  • The big advantage of using this directly (as opposed to converting to pandas/numpy, using their business day tools, and then converting back) is that polars-business fits right in with the Polars lazy API. This means you'll still be able to get the gains from the Polars query optimiser without having to step into eager execution.
  • All you need to use is it is pip install polars-business
  • Written in Rust, but end-users doesn't need Rust to run it, Python is all you need.

Extras

Brian:

  • BLACKFRIDAY code still works for 50% off The Complete pytest Course, Full Course + Community Access, through Nov 30
  • Also Debugging chapter is up, and it includes a small TDD example.

Michael:

Joke:


Want to go deeper? Check our projects