Artwork

محتوای ارائه شده توسط Michael Kennedy and Brian Okken. تمام محتوای پادکست شامل قسمت‌ها، گرافیک‌ها و توضیحات پادکست مستقیماً توسط Michael Kennedy and Brian Okken یا شریک پلتفرم پادکست آن‌ها آپلود و ارائه می‌شوند. اگر فکر می‌کنید شخصی بدون اجازه شما از اثر دارای حق نسخه‌برداری شما استفاده می‌کند، می‌توانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Player FM - برنامه پادکست
با برنامه Player FM !

#444 Begone Python of Yore!

25:44
 
اشتراک گذاری
 

Fetch error

Hmmm there seems to be a problem fetching this series right now. Last successful fetch was on September 30, 2025 00:17 (6d ago)

What now? This series will be checked again in the next day. If you believe it should be working, please verify the publisher's feed link below is valid and includes actual episode links. You can contact support to request the feed be immediately fetched.

Manage episode 499609094 series 1305988
محتوای ارائه شده توسط Michael Kennedy and Brian Okken. تمام محتوای پادکست شامل قسمت‌ها، گرافیک‌ها و توضیحات پادکست مستقیماً توسط Michael Kennedy and Brian Okken یا شریک پلتفرم پادکست آن‌ها آپلود و ارائه می‌شوند. اگر فکر می‌کنید شخصی بدون اجازه شما از اثر دارای حق نسخه‌برداری شما استفاده می‌کند، می‌توانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday 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: Coverage.py regex pragmas

  • Ned Batchelder

  • The regex implementation of how coverage.py recognizes pragmas is pretty amazing.

  • It’s extensible through plugins

    • covdefaults adds a bunch of default exclusions, and also platform- and version-specific comment syntaxes.
    • coverage-conditional-plugin gives you a way to create comment syntaxes for entire files, for whether other packages are installed, and so on.
  • A change from last year (as part of coverage.py 7.6 allows multiline regexes, which let’s us do things like:

    • Exclude an entire file with \\A(?s:.*# pragma: exclude file.*)\\Z
    • Allow start and stop delimiters with # no cover: start(?s:.*?)# no cover: stop
    • Exclude empty placeholder methods with ^\\s*(((async )?def .*?)?\\)(\\s*->.*?)?:\\s*)?\\.\\.\\.\\s*(#|$)
    • See Ned’s article for explanations of these

Michael #2: Python of Yore

  • via Matthias
  • Use YORE: ... comments to highlight CPython version dependencies.
    # YORE: EOL 3.8: Replace block with line 4. if sys.version_info < (3, 9): from astunparse import unparse else: from ast import unparse 

Then check when they go out of support:

$ yore check --eol-within '5 months' ./src/griffe/agents/nodes/_values.py:11: Python 3.8 will reach its End of Life within approx. 4 months 

Even fix them with fix .

Michael #3: nox-uv

  • via John Hagen
  • What nox-uv does is make it very simple to install uv extras and/or dependency groups into a nox session's virtual environment.
  • The versions installed are constrained by uv's lockfile meaning that everything is deterministic and pinned.
  • Dependency groups make it very easy to install only want is necessary for a session (e.g., only linting dependencies like Ruff, or main dependencies + mypy for type checking).

Brian #4: A couple Django items

  • Stop Using Django's squashmigrations: There's a Better Way
    • Johnny Metz
    • Resetting migrations is sometimes the right thing.
    • Overly simplified summary: delete migrations and start over
  • dj-lite
    • Adam Hill
    • Use SQLite in production with Django
    • “Simplify deploying and maintaining production Django websites by using SQLite in production. dj-lite helps enable the best performance for SQLite for small to medium-sized projects. It requires Django 5.1+.”

Extras

Brian:

Michael:

Joke: Copy/Paste

  continue reading

455 قسمت

Artwork

#444 Begone Python of Yore!

Python Bytes

1,331 subscribers

published

iconاشتراک گذاری
 

Fetch error

Hmmm there seems to be a problem fetching this series right now. Last successful fetch was on September 30, 2025 00:17 (6d ago)

What now? This series will be checked again in the next day. If you believe it should be working, please verify the publisher's feed link below is valid and includes actual episode links. You can contact support to request the feed be immediately fetched.

Manage episode 499609094 series 1305988
محتوای ارائه شده توسط Michael Kennedy and Brian Okken. تمام محتوای پادکست شامل قسمت‌ها، گرافیک‌ها و توضیحات پادکست مستقیماً توسط Michael Kennedy and Brian Okken یا شریک پلتفرم پادکست آن‌ها آپلود و ارائه می‌شوند. اگر فکر می‌کنید شخصی بدون اجازه شما از اثر دارای حق نسخه‌برداری شما استفاده می‌کند، می‌توانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by DigitalOcean: pythonbytes.fm/digitalocean-gen-ai Use code DO4BYTES and get $200 in free credit

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday 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: Coverage.py regex pragmas

  • Ned Batchelder

  • The regex implementation of how coverage.py recognizes pragmas is pretty amazing.

  • It’s extensible through plugins

    • covdefaults adds a bunch of default exclusions, and also platform- and version-specific comment syntaxes.
    • coverage-conditional-plugin gives you a way to create comment syntaxes for entire files, for whether other packages are installed, and so on.
  • A change from last year (as part of coverage.py 7.6 allows multiline regexes, which let’s us do things like:

    • Exclude an entire file with \\A(?s:.*# pragma: exclude file.*)\\Z
    • Allow start and stop delimiters with # no cover: start(?s:.*?)# no cover: stop
    • Exclude empty placeholder methods with ^\\s*(((async )?def .*?)?\\)(\\s*->.*?)?:\\s*)?\\.\\.\\.\\s*(#|$)
    • See Ned’s article for explanations of these

Michael #2: Python of Yore

  • via Matthias
  • Use YORE: ... comments to highlight CPython version dependencies.
    # YORE: EOL 3.8: Replace block with line 4. if sys.version_info < (3, 9): from astunparse import unparse else: from ast import unparse 

Then check when they go out of support:

$ yore check --eol-within '5 months' ./src/griffe/agents/nodes/_values.py:11: Python 3.8 will reach its End of Life within approx. 4 months 

Even fix them with fix .

Michael #3: nox-uv

  • via John Hagen
  • What nox-uv does is make it very simple to install uv extras and/or dependency groups into a nox session's virtual environment.
  • The versions installed are constrained by uv's lockfile meaning that everything is deterministic and pinned.
  • Dependency groups make it very easy to install only want is necessary for a session (e.g., only linting dependencies like Ruff, or main dependencies + mypy for type checking).

Brian #4: A couple Django items

  • Stop Using Django's squashmigrations: There's a Better Way
    • Johnny Metz
    • Resetting migrations is sometimes the right thing.
    • Overly simplified summary: delete migrations and start over
  • dj-lite
    • Adam Hill
    • Use SQLite in production with Django
    • “Simplify deploying and maintaining production Django websites by using SQLite in production. dj-lite helps enable the best performance for SQLite for small to medium-sized projects. It requires Django 5.1+.”

Extras

Brian:

Michael:

Joke: Copy/Paste

  continue reading

455 قسمت

すべてのエピソード

×
 
Loading …

به Player FM خوش آمدید!

Player FM در سراسر وب را برای یافتن پادکست های با کیفیت اسکن می کند تا همین الان لذت ببرید. این بهترین برنامه ی پادکست است که در اندروید، آیفون و وب کار می کند. ثبت نام کنید تا اشتراک های شما در بین دستگاه های مختلف همگام سازی شود.

 

راهنمای مرجع سریع

در حین کاوش به این نمایش گوش دهید
پخش