<p>Catch the <strong>video edition live stream</strong> on YouTube: <a href="https://www.youtube.com/watch?v=oKgAsjiJqMs"><strong>youtube.com/watch?v=oKgAsjiJqMs</strong></a></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://testandcode.com/"><strong>Test & Code</strong></a> Podcast</li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p>Special guest: <strong><a href="https://www.kickstarter.com/projects/914595512/a-day-in-code-python">Shari Eskenas</a></strong></p> <p>Be part of the episode by subscribing and “smashing that bell” over at <a href="http://pythonbytes.fm/youtube"><strong>pythonbytes.fm/youtube</strong></a></p> <p><strong>Brian #1:</strong> <a href="https://docs.pytest.org/en/stable/changelog.html"><strong>pytest 6.2 is out</strong></a> </p> <ul> <li><code>pytester</code> fixture for plugin testing. Like <code>testdir</code>, but a better name, and uses <code>pathlib.Path</code> objects.</li> <li>verbose mode now shows the reason a test was skipped in the terminal line after the SKIPPED, XFAIL, or XPASS</li> <li>Can use monkeypatch as a context manager with <code>.context()</code> and it’s available both in test and fixture functions, but also in helper functions by using <code>pytest.Monkeypatch.context()</code>.</li> </ul> <pre><code> import os from contextlib import contextmanager import pytest def test_foo_1(monkeypatch): with monkeypatch.context() as mp: mp.setenv("foo", "bar") assert os.getenv("foo") == "bar" @contextmanager def some_func(): with pytest.MonkeyPatch.context() as mp: mp.setenv("foo", "bar") yield def test_foo_2(): with some_func(): assert os.getenv("foo") == "bar" </code></pre> <ul> <li>Lots of other goodies.</li> <li>related: <a href="https://pypi.org/project/pytest-check/">pytest-check</a>, my only released plugin for pytest, was updated to support pytest 6.x</li> </ul> <p><strong>Michael #2:</strong> <a href="https://www.sqlite.org/appfileformat.html"><strong>SQLite as a file format (like docx)</strong></a></p> <ul> <li>via Jon Bultmeyer</li> <li>An SQLite database file with a defined schema often makes an excellent application file format. Here are a dozen reasons why this is so:</li> <li><strong>Simplified Application Development.</strong> No new code is needed for reading or writing the application file.</li> <li><strong>Single-File Documents.</strong> An SQLite database is contained in a single file, which is easily copied or moved or attached.</li> <li><strong>High-Level Query Language.</strong> SQLite is a complete relational database engine, which means that the application can access content using high-level queries.</li> <li><strong>Accessible Content.</strong> Information held in an SQLite database file is accessible using commonly available open-source command-line tools - tools that are installed by default on Mac and Linux systems and that are freely available as a self-contained EXE file on Windows.</li> <li><strong>Cross-Platform.</strong> SQLite database files are portable between 32-bit and 64-bit machines and between big-endian and little-endian architectures and between any of the various flavors of Windows and Unix-like operating systems.</li> <li><strong>Atomic Transactions.</strong> Writes to an SQLite database are <a href="https://www.sqlite.org/atomiccommit.html">atomic</a>. They either happen completely or not at all, even during system crashes or power failures.</li> <li><strong>Incremental And Continuous Updates.</strong> When writing to an SQLite database file, only those parts of the file that actually change are written out to disk. This makes the writing happen faster and saves wear on SSDs.</li> <li><strong>Easily Extensible.</strong> As an application grows, new features can be added to an SQLite application file format simply by adding new tables to the schema or by adding new columns to existing tables. Adding columns or tables does not change the meaning of prior queries.</li> <li><strong>Performance.</strong> In many cases, an SQLite application file format will be <a href="https://www.sqlite.org/fasterthanfs.html">faster than a pile-of-files format</a> or a custom format.</li> <li><strong>Concurrent Use By Multiple Processes.</strong> SQLite automatically coordinates concurrent access to the same document from multiple threads and/or processes.</li> <li><strong>Multiple Programming Languages.</strong> Though SQLite is itself written in ANSI-C, interfaces exist for just about every other programming language you can think of.</li> <li><strong>Better Applications.</strong> If the application file format is an SQLite database, the complete documentation for that file format consists of the database schema, with perhaps a few extra words about what each table and column represents.</li> </ul> <p><strong>Shari #3:</strong> <a href="https://www.kickstarter.com/projects/914595512/a-day-in-code-python"><strong>A Day in Code: Python – A picture book written in code</strong></a></p> <p><strong>Brian #4:</strong> <a href="https://azure.pythonlabs.com/"><strong>PythonLabs is now hosted by Azure. and “Yes, Barry, there is a PythonLabs”</strong></a></p> <ul> <li>I can’t believe we haven’t covered this in the last 211 episodes.</li> <li>But it seems like good timing now.</li> <li>Now resides at azure.pythonlabs.com</li> <li>By Tim Peters (originally posted on January 6th, 2004 to the PSF members list)</li> <li>Barry (I’m assuming Barry Warsaw) asked the question: “… what /is/ Pythonlabs now? Or /is/ there a Pythonlabs now? I dunno -- Guido owns the domain name which is probably the biggest claim to Pythonlabhood there is.”</li> <li>Tim replies with a very “<a href="https://en.wikipedia.org/wiki/Yes,_Virginia,_there_is_a_Santa_Claus">Yes, Virginia, there is a Santa Clause”</a>-esque answer:</li> </ul> <p>Snippets include: </p> <ul> <li>Barry, your little friends are wrong. They have been affected by the skepticism of a skeptical age. …</li> <li>Yes, Barry, there is a PythonLabs. </li> <li>It exists as certainly as love and generosity and devotion exist, … Alas! how dreary would be the world if there were no PythonLabs! It would be as dreary as if there were no Barrys. …</li> <li>Not believe in PythonLabs! You might as well not believe in fairies. … </li> <li>Nobody sees PythonLabs, but that is no sign that there is no PythonLabs. …</li> <li>A thousand years from now, Barry, nay 10 times 10,000 years from now, it will continue to make glad the heart of childhood.</li> </ul> <p><strong>Michael #5: Extra, extra, extra, extra, extra, extra, hear all about it</strong></p> <ul> <li>#1 <a href="https://twitter.com/JustTurrble/status/1334336419205165058"><strong>Numpy version pinning via Grice</strong></a></li> <li>Just catching up on Ep 208. Note in part 2 about the Numpy issue, folks can pin versions by platform with environment markers: </li> </ul> <pre><code> numpy==1.19.3; platform_system == 'Windows' numpy==1.19.4; platform_system == 'Linux' </code></pre> <ul> <li>#2 <a href="https://github.com/UN-GCPDS/qt-material"><strong>Stylesheet for PySide2 and PyQt5, this time looks like Material Design</strong></a> - via William Jamir Silva</li> <li>#3 <a href="https://blog.michaelckennedy.net/2020/12/07/20_000_000-is-quite-a-milestone/"><strong>Talk Python hits 20M downloads</strong></a>. Python Bytes is almost 6M too.</li> <li>#4 <a href="https://twitter.com/mkennedy/status/1336496326956077056"><strong>Pyramid 2.0 is coming</strong></a>.</li> <li>#5 <a href="https://www.python.org/downloads/release/python-391/"><strong>Python 3.9.1</strong></a> is out with 282 changes. Ships as a universal binary (Intel + M1) on macOS.</li> <li>#6 <a href="https://www.youtube.com/watch?v=PnxlHfGdihI"><strong>Python + Mac Mini + M1 video</strong></a></li> <li>#7 <a href="https://twitter.com/pyblogsal/status/1339260581367476224"><strong>Python Steering Council selected</strong></a></li> </ul> <p><strong>Shari #6:</strong> <a href="https://openmv.io/"><strong>OpenMV</strong></a></p> <p>Extras</p> <p>Brian: </p> <ul> <li>agrs, kwargs (quargs), and community <ul> <li><a href="https://twitter.com/brianokken/status/1339027336134492160?s=20">a silly discussion on twitter</a></li> <li>Nocole Carlson: “Huge debate … about whether you say “quargs” or “keyword arguments” for “kwargs”. Obviously “quargs” is correct.”</li> <li>It never occurred to me to say “quargs”, but I like it.</li> <li>Vicki Boykis replied that she’s “… never said anything but “quargs”. This is like a parallel universe.”</li> <li>Some other amusing responses.</li> <li>This reminded me of a conversation I might have over beer at PyCon. or at a booth, or just standing around in the hallway.</li> <li>I miss so much the in person community. I’m grateful that little bits of it are intact on twitter.</li> </ul></li> </ul> <p>Joke:</p> <p>Pizza delivery fail</p> <p><img src="https://ift.tt/2KuL0v8" alt="" /></p> <p>Second joke:</p> <ul> <li>Why do you many developers use dark mode? <ul> <li>Because bugs are attracted to light.</li> </ul></li> </ul>
from Planet Python
via read more
Subscribe to:
Post Comments (Atom)
TestDriven.io: Working with Static and Media Files in Django
This article looks at how to work with static and media files in a Django project, locally and in production. from Planet Python via read...
-
Podcasts are a great way to immerse yourself in an industry, especially when it comes to data science. The field moves extremely quickly, an...
-
Graph traversal algorithms are used to perform various operations on a graph data structure. In this article, we will use the breadth-first ...
-
In an earlier tutorial we've already covered how to open dialog windows. These are special windows which (by default) grab the focus o...
No comments:
Post a Comment