Informações:
Sinopse
Python Bytes is a weekly podcast hosted by Michael Kennedy and Brian Okken. The show is a short discussion on the headlines and noteworthy news in the Python, developer, and data science space.
Episódios
-
#319 CSS-Style Queries for... JSON?
18/01/2023 Duração: 32minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/stream/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Michael #1: Secure maintainer workflow by Ned Batchelder We are the magicians, but also the gatekeepers for our users Terminal sessions with implicit access to credentials first is unlikely: a bad guy gets onto my computer and uses the credentials to cause havoc second way is a more serious concern: I could unknowingly run evil or buggy code that uses my credentials in bad ways. Mitigations 1Password: where possible, I store credentials in 1Password, and use tooling to get them into environment variables. Side bar: Do not use lastpass, see end segment I can have the credentials in the environment for just long enough to use them. This works well for
-
#318 GIL, How We Will Miss You
10/01/2023 Duração: 39minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with us Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Join us on YouTube at pythonbytes.fm/stream/live to be part of the audience. Usually Tuesdays at 11am PT. Older video versions available there too. Brian #1: PEP 703 - Making the GIL Optional in CPython Author: Sam Gross Sponsor: Łukasz Langa Draft status, but on Standards Track, targeting Python 3.12 Suggested by: Will Shanks “The GIL is a major obstacle to concurrency.” Especially for scientific computing. PEP 703 proposes adding a --without-gil build configuration to CPython to let it run code without the global interpreter lock and with the necessary changes needed to make the interpreter thread-safe. PEP includes several issues with GIL and sckikit-learn, PyTorch, Numpy, Pillow, and other numerically intensive libraries. Python’s GIL makes it difficult to use modern multi-core CPUs efficiently for ma
-
#317 Most loved and most dreaded dev tools of 2022
03/01/2023 Duração: 48minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show: @pythonbytes@fosstodon.org Michael #1: StackOverflow 2022 Developer Survey Last year we saw Git as a fundamental tool to being a developer. This year it appears that Docker is becoming a similar fundamental tool for Professional Developers, increasing from 55% to 69%. Language: Rust is […] the most loved language with 87% of developers saying they want to continue using it. JS Frameworks: Angular.js is in its third year as the most dreaded. Let me Google that for you: 62% of all respondents spend more than 30 minutes a day searching for answers or solutions to problems. 25% spending more than an hour each day. The demise of the full-stack developer is overrated. I do wish there were more women in the field. Databases: Postgres is #1 and MongoDB is still going strong. The “which web framework do you use?” question is a full o
-
#316 Python 3.11 is here and it's fast (crossover)
30/12/2022 Duração: 01h04minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Show announcements: @pythonbytes@fosstodon.org Hi folks. For our final episode of 2022 here on Python Bytes, we're crossing the streams with my other show, Talk Python To Me. I present to you one of the more important episodes of the year, the release of Python 3.11 with it's new features and 40% performance improvements. Thank you for listening to Python Bytes in 2022, have a great holiday break, and Brian and I will see you next week. Python 3.11 is here! Keeping with the annual release cycle, the Python core devs have released the latest version of Python. And this one is a big one. It has more friendly error messages and is massively faster than 3.10 (between 10 to 60% faster) which is a big deal for a year over year release of a 30 year old platform. On this episode, we have Irit Katriel, Pablo Galindo Salgado, Mark Sh
-
#315 Some Stickers!
20/12/2022 Duração: 29minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Michael #1: Jupyter Server 2.0 is released! Jupyter Server provides the core web server that powers JupyterLab and Jupyter Notebook. New Identity API: As Jupyter continues to innovate its real-time collaboration experience, identity is an important component. New Authorization API: Enabling collaboration on a notebook shouldn’t mean “allow everyone with access to my Jupyter Server to edit my notebooks”. What if I want to share my notebook with e.g. a subset of my teammates? New Event System API: jupyter_events—a package that provides a JSON-schema-based event-driven system to Jupyter Server and server extensions. Terminals Service is now a Server Extension: Jupyter Server now ships the “Terminals Service” as an extension (installed and enabled by default) rather than a core Jupyter Service. pytest-jupyter: A pytest plugin for Jupyt
-
#314 What are you, a wise guy? Sort it out!
13/12/2022 Duração: 37minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Brian #1: FAQtory Will McGugan “FAQtory is a tool to auto-generate a FAQ.md (Frequently Asked Questions) document for your project. FAQtory has a FAQ.md written by itself, so you can see an example of the project in the project. Builds a markdown FAQ.md that includes questions at the top that link to answers below. “Additionally, a ‘suggest’ feature uses fuzzy matching to reply to GitHub issues with suggestions from your FAQ.” I haven’t tried this part, but looking forward to it. May help to answer GH issues that are really questions. Michael #2: Kagi search "live with it” report Still enjoying it a lot Very fast LOVE blocking SEO-heavy, content-light sites Maps are rough around the edges Not obvious how to set as a private/incognito search engine (but can be done in settings) They have browser extensions - but I don't want
-
#313 Programming Robots With a Marker
06/12/2022 Duração: 46minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Special guest: Kelly Schuster-Paredes Special guest: Sean Tibor Michael #1: How do you say that number? Inflect: fosstodon.org/@linuxgal@techhub.social/109430499504962727 Num2Words: pypi.org/project/num2words/ # Inflect: import inflect inflector=inflect.engine() print(inflector.number_to_words(8675309)) # eight million, six hundred and seventy-five thousand, three hundred and nine # Num2Words from num2words import num2words print(num2words(8675309)) # eight million, six hundred and seventy-five thousand, three hundred and nine Num2Words also has a CLI: pipx install num2words $ num2words 2948475 two million, nine hundred and forty-eight thousand, four hundred and seventy-five Brian #2: The Origins of Python Lambert Meertens A wonderful tale starting with TELCOMP, traveling through ABC, and finally reaching Python. This is a
-
#312 AI Goes on Trial For Writing Code
29/11/2022 Duração: 35minWatch on YouTube About the show Sponsored by Complier Podcast from RedHat Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Brian #1: Coping strategies for the serial project hoarder Simon Willison Also a talk from DjangoCon2022 Massively increase your productivity on personal projects with comprehensive documentation and automated tests. I’m actually not sure what title would be best, but this is an incredible video that I’m encouraging every developer to watch, whether or not you work with open source projects. Covers The perfect commit Implementation, Tests, Documentation, and a link to an issue thread Tests Prove the implementation works, pass if it works, fails otherwise A discussion of how adding tests is way easier than starting testing a project, so get the framework in place early, and devs won’t be afraid to add to it. Cookiecutter repo templates for projects you will likely start super cool idea to have your own that you keep up to date with
-
#311 Catching Memory Leaks with ... pytest?
24/11/2022 Duração: 49minWatch on YouTube About the show Python Bytes 311 Sponsored by Microsoft for Startups Founders Hub. Connect with the hosts Michael: @mkennedy@fosstodon.org Brian: @brianokken@fosstodon.org Special guest: Murilo Cunha Michael #1: Latexify We are used to turning beautiful math into programming symbols. For example: amitness.com/2019/08/math-for-programmers/#sigma Take this code: def do_math(a, b, c): return (-b + math.sqrt(b ** 2 - 4 * a * c)) / (2 * a) Add @latexify.function decorator display do_math in a notebook Get this latex: \mathrm{do_math}(a, b, c) = \frac{-b + \sqrt{b^{{2}} - {4} a c}}{{2} a} Which renders as I could only get it to install with: pip install git+https://github.com/google/latexify_py Brian #2: prefixed From Avram Lubkin “Prefixed provides an alternative implementation of the built-in float which supports formatted output with SI (decimal) and IEC (binary) prefixes.” >>> from prefixed import Float >>> f'{Float(3250):.2h}' '3.25k' >>> '{:.2h}s
-
#310 Calling All Tools for Readmes
15/11/2022 Duração: 53minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Special guest: Adam Hopkins Python Web Development with Sanic Brian #1: Tips for clean code in Python Bob Belderbos Generally some great tips to think about to keep code maintainable: Smaller units. Break things up into single responsibility. SRP: Single Responsibility Principle Move magic numbers into constants or parameters. Avoid global scope. (even though it’s not really global) Use linters and auto-formatters. Use very narrow try/except blocks. Idiomatic Python. (Although I agree, this is a weird one as it’s hard for new people to follow). Pay attention to data structure choice and learn to utilize standard structures and those in collections. Use the standard libary. Use mappings Flat is better than nested. But I’m gonna focus on the “smaller units” because it applies to modules as well. Try to keep modules organized such that you can keep relevant and related code concepts in your head. Michael #2: Mastod
-
#309 When Malware PoC's are Themselves Malware
09/11/2022 Duração: 35minWatch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael: #0: Python Bytes is 6 years old this week. Thank you!
-
#308 Conference season is heating up
01/11/2022 Duração: 34minWatch on YouTube About the show Sponsored by Complier Podcast from RedHat Michael #0: New livestream time - 11am PT on Tuesdays. Also, subscribe to the youtube channel and “hit the bell” to get notified of all the live streams. Brian #1: It’s PyCon US 2023 CFP time Will be held in Salt Lake City, Salt Palace Convention Center Talks are Friday - Sunday, April 19-23 PyCon US 2023 launch announcement PyCon 2023 site features images taken from past PyCon artwork Call for proposals open until Dec 9, but please don’t wait that long. Michael #2: Any.io AnyIO is an asynchronous networking and concurrency library that works on top of either asyncio or trio. It implements trio-like structured concurrency (SC) on top of asyncio. Cool interpretability between native threads and asyncio Using subprocesses: AnyIO allows you to run arbitrary executables in subprocesses, either as a one-shot call or by opening a process handle for you that gives you more control over the subprocess. Async file I/O: AnyIO provides
-
#307 Your Python just got faster (3.11 is out!)
26/10/2022 Duração: 44minWatch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: Python 3.11 is released Live stream of the actual release procedure Talk Python episode coming next week (live stream on Friday) Major new features of the 3.11 series, compared to 3.10 General changes PEP 657 -- Include Fine-Grained Error Locations in Tracebacks PEP 654 -- Exception Groups and except* PEP 680 -- tomllib: Support for Parsing TOML in the Standard Library gh-90908 -- Introduce task groups to asyncio gh-34627 -- Atomic grouping ((?>...)) and possessive quantifiers (*+, ++, ?+, {m,n}+) are now supported in regular expressions. The Faster CPython Project is already yielding some exciting results. Python 3.11 is up to 10-60% faster than Python 3.10. On average, we measured a 1.22x speedup on the standard benchmark suite. See Faster CPython for details. Typing and typing language changes PEP 673 -- Self Type PEP 646 -- Variadic Generics PEP 675 -- Arbitrary Literal String
-
#306 Some Fun pytesting Tools
19/10/2022 Duração: 46minWatch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Brian #1: Awesome pytest speedup Neyts Zupan A checklist of best practices to speed up your pytest suite. as a talk at Plone NAMUR 2022 Measure first Then make sure (all items have explanations) Hardware is fast use a faster computer also try a self-hosted runner seriously, a dedicated computer (or a few) for making test runs faster might be worth it. CI resources are usually slower in cloud than local, and even expensive VM farms are often slower. Try local Collection is fast utilize norecursedirs and specifying the location of the tests, either on the command line or with testpaths PYTHONDONTWRITEBYTECODE=1 is set might help Built-in pytest plugins are disabled try -p no:pastebin -p no:nose -p no:doctest Only a subset of tests are executed Especially when developing or debugging, run a subset and skip the slow tests. Network access is disabled pytest-socket can make sure of that Di
-
#305 Decorators need love too
13/10/2022 Duração: 32minWatch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #0: Scorpions concert Check out this short video if you're interested. Michael #1: Pyscript 2022.09.1 is out Beware of the breaking changes Brian #2: Decorator shortcuts by Ned Batchelder Michael #3: Panel (of Holoviz) on Pyscript via Marc Skov Madsen Panel can now run on pyodide and pyscript with no backend server. Brian #4: auto-walrus Marco Gorelli Also, a reminder about pyupgrade, mentioned on the show back in 2018 Especially, look at the --py38-plus through --py39-plus flags. There are flags for 3.10 and 3.11, but limited testing for them. Joke: I need a new shirt
-
#304 Build your own text adventure language in Python
05/10/2022 Duração: 38minWatch the live stream: Watch on YouTube About the show Sponsored by Compiler Podcast from RedHat Brian #1: Ten tasty ingredients for a delicious pull request on wagtail blog, from LB Great tips for helping out with open source projects. But even for closed source, there’s good stuff there to know for people transitioning to single person projects to working on a team. The tips Read the [development] instructions. The contributing guide, etc. Read the issue and comments Create a fresh branch for your contribution Keep the changes focused Write unit tests also, extending tests for untested or under-tested features are a great way to contributes Give your pull request a name with context Reference the issue being fixed or resolved in the pull request Review & fix the CI failures Push to the same branch with fixes and do not open a new pull request Be patient. (Article lists this as “Eagerness balanced with patience”). Michael #2: textX via Rhet Turnbull textX is a meta-language for building
-
#303 This title is required or is it optional?
29/09/2022 Duração: 37minWatch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: Human regular expressions revisited via Mikael Honkala We mentioned of Al Sweigart's humre in Python Bytes… Mikael went on a little search and compiled my findings into this repo. A lot of people feel that re needs some help. At least 3 of the "serious" packages I found came out in the last few months. Since a package like this is not overly complex to make, all the ways to approach the problem are clearly being explored. Unfortunately these seem to be mostly single-person efforts, and many have fallen to the wayside before long. Hopefully there's some consolidation on the horizon, to share some of the maintenance effort and establish some of the packages as here for the long haul. The list could be useful to you if you are: Looking for a tool: Check the list to get a quick idea of the "look and feel" of each package. Thinking about building a tool: Check the list for alternative appro
-
#302 The Blue Shirt Episode
20/09/2022 Duração: 33minWatch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Brian #1: Can Amazon’s CodeWhisperer write better Python than you? Brian Tarbox “Despite the clickbait-y title, whether CW’s code is better or worse than mine is at the margins and not really important. What is significant is that it has the potential to save me a ton of time and mental space to focus on improving, refactoring and testing. It’s making me a better programmer by taking on some of the undifferentiated heavy lifting.” Some decent code generation, starting with Amazon API examples. The generated dataclass method was neat, but really, the comment “prompt” probably took as much time to write as the code would have. The generated test case is workable, but I would not consider that a good test. Perhaps don’t lump together construction, attribute access, and tests for all methods in one test function. That said, I’ve seen way worse test methods in my career. So, decent starting point. Rel
-
#301 PyTorch Grows Up and Moves Out
15/09/2022 Duração: 31minWatch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Michael #1: PythonAnywhere: Our Commitment to Providing Free Accounts via Matthew Kramer In light of Heroku’s cancelling their free tiers… They believe free tiers are important for beginners Two part solution: Limit outbound internet access for free accounts “Proof of life” to keep running - 3 months for apps, 1 yr for accounts BTW, they were acquired by Anaconda Inc. Brian #2: ruff: An extremely fast Python linter, written in Rust. Announcement article: Python tooling could be much, much faster Charlie Marsh Quite the star history, as it’s a new repo as of Aug 30. Now at 1.8k. It is extremely fast. I installed it and tried it on a small project. It ran so fast I thought it didn’t do anything. I went and added some errors to convince myself it was running. $ time flake8 src tests ... flake8 src tests 0.29s user 0.02s system 98% cpu 0.311 total $ time ruff src/ tests/
-
#300 A Jupyter merge driver for git
06/09/2022 Duração: 55minWatch the live stream: Watch on YouTube About the show Sponsored by Microsoft for Startups Founders Hub. Special guest: Seth Larson Brian #1: Test your packages and wheels I’ve been building some wheels the last couple of weeks with various tools: flit, flit-core, and flit build hatch, hatchling, and hatch build setuptools, build_meta, and python -m build There are a few projects I’ve used to make sure my projects are in good shape wheel-inspect - you can inspect within Python code through inspect_wheel() function that converts to json. Or use on the command line with wheel2json check-wheel-contents - a linter for wheels tox - easily test the building, installation, and running of a package locally I actually start here, then utilize the other two tools Should have been obvious, but it wasn’t to me Projects saved on git (such as gitHub) don’t keep wheels in git. (this was obvious) When installing from git using pip install git+https://path/to/git/repo.git Your local pip will run the packaging