<feed xmlns="http://www.w3.org/2005/Atom"><title>Hynek Schlawack</title><subtitle>Hynek Schlawack: Pythonista, Gopher, blogger, speaker, and YouTuber from Berlin / Germany.</subtitle><id>https://hynek.me/tags/twisted/index.xml</id><icon>https://hynek.me/favicon.ico</icon><link rel="self" href="https://hynek.me/tags/twisted/index.xml"/><link rel="alternate" href="https://hynek.me/"/><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><rights>© 2004–2026 Hynek Schlawack</rights><updated>2024-09-02T11:00:00Z</updated><entry><id>https://hynek.me/articles/docker-virtualenv/</id><link rel="alternate" href="https://hynek.me/articles/docker-virtualenv/" type="text/html"/><title type="html">Why I Still Use Python Virtual Environments in Docker</title><published>2024-09-02T11:00:00Z</published><updated>2024-09-02T11:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Whenever I publish &lt;a href="https://hynek.me/articles/docker-uv/"&gt;something&lt;/a&gt; about my Python Docker workflows, I invariably get challenged about whether it makes sense to use &lt;a href="https://docs.python.org/3/library/venv.html"&gt;&lt;em&gt;virtual environments&lt;/em&gt;&lt;/a&gt; in Docker containers. As always, it&amp;rsquo;s a trade-off, and I err on the side of standards and predictability.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/docker-uv/</id><link rel="alternate" href="https://hynek.me/articles/docker-uv/" type="text/html"/><title type="html">Production-ready Python Docker Containers with uv</title><published>2024-08-28T11:00:00Z</published><updated>2026-08-06T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Starting with &lt;a href="https://astral.sh/blog/uv-unified-python-packaging"&gt;0.3.0&lt;/a&gt;, Astral’s &lt;a href="https://docs.astral.sh/uv/"&gt;&lt;em&gt;uv&lt;/em&gt;&lt;/a&gt; brought many great features, including support for cross-platform lock files &lt;code&gt;uv.lock&lt;/code&gt;. Together with subsequent fixes, it has become Python’s finest workflow tool for &lt;strong&gt;my&lt;/strong&gt; (non-scientific) use cases. Here’s how I build production-ready containers, as fast as possible.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-virtualenv-redux/</id><link rel="alternate" href="https://hynek.me/articles/python-virtualenv-redux/" type="text/html"/><title type="html">Python Project-Local Virtualenv Management Redux</title><published>2024-04-02T00:00:00Z</published><updated>2024-09-23T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;One of my &lt;a href="https://hynek.me/til/python-project-local-venvs"&gt;first TIL entries&lt;/a&gt; was about how you can imitate Node’s &lt;code&gt;node_modules&lt;/code&gt; semantics in Python on UNIX-like operating systems. A lot has happened since then (to the better!) and it’s time for an update. &lt;em&gt;direnv&lt;/em&gt; still rocks, though.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/pull-requests-branch/</id><link rel="alternate" href="https://hynek.me/articles/pull-requests-branch/" type="text/html"/><title type="html">Don’t Start Pull Requests from Your Main Branch</title><published>2023-12-21T05:00:00Z</published><updated>2023-12-21T05:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;When contributing to other users’ repositories, always start a new branch in your fork.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/til/macos-window-focus-desktops/</id><link rel="alternate" href="https://hynek.me/til/macos-window-focus-desktops/" type="text/html"/><title type="html">How to Stop macOS from Stealing Focus after Switching Apps Across Desktops</title><published>2023-10-06T00:00:00Z</published><updated>2023-10-06T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;For years, I&amp;rsquo;ve had a macOS bug that occurred randomly and that I could only fix by rebooting or logging out. The Internet is full of similar problems, but I never found a solution to mine, and my pleas for help on Twitter went unanswered. Now, I have found a workaround myself.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/turbo-charge-tox/</id><link rel="alternate" href="https://hynek.me/articles/turbo-charge-tox/" type="text/html"/><title type="html">Two Ways to Turbo-Charge tox</title><published>2023-06-26T14:00:00Z</published><updated>2023-06-26T14:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;No, it&amp;rsquo;s not (just) &lt;code&gt;run-parallel&lt;/code&gt; – let&amp;rsquo;s cut the local &lt;em&gt;tox&lt;/em&gt; runtime by 75%!&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/til/automatic-rosetta-fish-direnv/</id><link rel="alternate" href="https://hynek.me/til/automatic-rosetta-fish-direnv/" type="text/html"/><title type="html">How to Automatically Switch to Rosetta With Fish and Direnv</title><published>2023-03-18T12:00:00Z</published><updated>2023-03-18T12:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;I love my Apple silicon computer, but having to &lt;em&gt;manually&lt;/em&gt; switch to &lt;a href="https://en.wikipedia.org/wiki/Rosetta_(software)"&gt;Rosetta&lt;/a&gt;-enabled shells for my Intel-only projects was a bummer.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/why-i-like-nox/</id><link rel="alternate" href="https://hynek.me/articles/why-i-like-nox/" type="text/html"/><title type="html">Why I Like Nox</title><published>2023-01-18T12:00:00Z</published><updated>2023-06-05T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Ever since I got involved with open-source Python projects, &lt;em&gt;&lt;a href="https://tox.wiki/"&gt;tox&lt;/a&gt;&lt;/em&gt; has been vital for testing packages across Python versions (and other factors). However, lately, I&amp;rsquo;ve been increasingly using &lt;em&gt;&lt;a href="https://nox.thea.codes/"&gt;Nox&lt;/a&gt;&lt;/em&gt; for my projects instead. Since I&amp;rsquo;ve been asked &lt;em&gt;why&lt;/em&gt; repeatedly, I&amp;rsquo;ll sum up my thoughts.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/macos-dyld-env/</id><link rel="alternate" href="https://hynek.me/articles/macos-dyld-env/" type="text/html"/><title type="html">Surprising Consequences of macOS’s Environment Variable Sanitization</title><published>2023-01-09T08:00:00Z</published><updated>2023-01-09T08:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Why does &lt;code&gt;DYLD_LIBRARY_PATH&lt;/code&gt; keep disappearing!?&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/til/set-output-deprecation-github-actions/</id><link rel="alternate" href="https://hynek.me/til/set-output-deprecation-github-actions/" type="text/html"/><title type="html">How to Fix the set-output GitHub Actions Deprecation Warning</title><published>2022-10-14T00:00:00Z</published><updated>2022-10-14T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;If you have a &lt;em&gt;GitHub Actions&lt;/em&gt; workflow that sets an output using &lt;code&gt;echo ::set-output key=value&lt;/code&gt;, you have started to see an unhelpful deprecation warning. Here&amp;rsquo;s how to fix it.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/productive-fruit-fly-programmer/</id><link rel="alternate" href="https://hynek.me/articles/productive-fruit-fly-programmer/" type="text/html"/><title type="html">How I’m a Productive Programmer With a Memory of a Fruit Fly</title><published>2022-09-19T00:00:00Z</published><updated>2022-09-19T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;A love letter to tools that changed everything for me.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/til/python-portable-binaries/</id><link rel="alternate" href="https://hynek.me/til/python-portable-binaries/" type="text/html"/><title type="html">You Can Build Portable Binaries of Python Applications</title><published>2022-09-07T00:00:00Z</published><updated>2024-03-19T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Contrary to popular belief, it’s possible to ship portable executables of Python applications without sending your users to Python packaging hell.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/til/easier-crediting-contributors-github/</id><link rel="alternate" href="https://hynek.me/til/easier-crediting-contributors-github/" type="text/html"/><title type="html">Easier Crediting of Contributors on GitHub</title><published>2022-08-18T00:00:00Z</published><updated>2022-08-18T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;GitHub has the concept of &lt;em&gt;co-authors&lt;/em&gt; of a commit. You&amp;rsquo;ve probably seen it in the web UI, when multiple people are listed to have committed something. I want to be gracious with credit where it&amp;rsquo;s due and I&amp;rsquo;ve found ways to make it easier.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/til/pip-tools-and-pyproject-toml/</id><link rel="alternate" href="https://hynek.me/til/pip-tools-and-pyproject-toml/" type="text/html"/><title type="html">pip-tools Supports pyproject.toml</title><published>2022-08-12T08:00:00Z</published><updated>2022-08-12T08:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;&lt;em&gt;pip-tools&lt;/em&gt; is ready for modern packaging.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-recursive-optional-dependencies/</id><link rel="alternate" href="https://hynek.me/articles/python-recursive-optional-dependencies/" type="text/html"/><title type="html">Recursive Optional Dependencies in Python</title><published>2022-07-29T06:00:00Z</published><updated>2022-07-29T06:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;One of my (slowly evaporating) reasons why I like putting packaging metadata into an executable &lt;code&gt;setup.py&lt;/code&gt; is the ability to have optional dependencies that are combinations of others. As of &lt;em&gt;pip&lt;/em&gt; 21.2, this is possible &lt;em&gt;without&lt;/em&gt; running code.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/what-to-mock-in-5-mins/</id><link rel="alternate" href="https://hynek.me/articles/what-to-mock-in-5-mins/" type="text/html"/><title type="html">“Don’t Mock What You Don’t Own” in 5 Minutes</title><published>2022-06-21T09:00:00Z</published><updated>2022-06-21T09:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;A common issue when writing tests for real-world software is how to deal with third-party dependencies. Let&amp;rsquo;s examine an old, but counter-intuitive principle.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/til/typing-protocol/</id><link rel="alternate" href="https://hynek.me/til/typing-protocol/" type="text/html"/><title type="html">typing.Protocol Across Python Versions</title><published>2022-02-05T17:00:00Z</published><updated>2022-02-05T17:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;How to seamlessly support &lt;code&gt;typing.Protocol&lt;/code&gt; on Python versions older and newer than 3.8. At the same time.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/import-attrs/</id><link rel="alternate" href="https://hynek.me/articles/import-attrs/" type="text/html"/><title type="html">import attrs</title><published>2021-12-28T00:00:00Z</published><updated>2021-12-28T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;An attempt at catharsis. This is a deeply personal blog post about the most influential project I&amp;rsquo;ve ever created: &lt;a href="https://www.attrs.org/"&gt;&lt;em&gt;attrs&lt;/em&gt;&lt;/a&gt;, the progenitor of modern Python class utilities. I&amp;rsquo;m retelling its history from my perspective, how it begot &lt;em&gt;dataclasses&lt;/em&gt;, and how I&amp;rsquo;m leading it into the future.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/ditch-codecov-python/</id><link rel="alternate" href="https://hynek.me/articles/ditch-codecov-python/" type="text/html"/><title type="html">How to Ditch Codecov for Python Projects</title><published>2021-11-18T08:00:00Z</published><updated>2026-06-09T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Codecov&amp;rsquo;s unreliability breaking CI on my open source projects has been a constant source of frustration for me for years. I have found a way to enforce coverage over a whole GitHub Actions build matrix that doesn&amp;rsquo;t rely on third-party services.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/til/</id><link rel="alternate" href="https://hynek.me/articles/til/" type="text/html"/><title type="html">Announcing a New Section: TIL</title><published>2021-08-25T12:00:00Z</published><updated>2021-08-25T12:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Trying out something new: today I&amp;rsquo;m launching my own &lt;em&gt;Today I Learned&lt;/em&gt; section. In this essay I will sum up what my plans and hopes are.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-subclassing-redux/</id><link rel="alternate" href="https://hynek.me/articles/python-subclassing-redux/" type="text/html"/><title type="html">Subclassing in Python Redux</title><published>2021-06-22T15:00:00Z</published><updated>2021-06-22T15:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;The conflict between subclassing and composition is as old as object-oriented programming. The latest crop of languages like Go or Rust prove that you don’t &lt;em&gt;need&lt;/em&gt; subclassing to successfully write code. But what’s a &lt;em&gt;pragmatic&lt;/em&gt; approach to subclassing in Python, specifically?&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/semver-will-not-save-you/</id><link rel="alternate" href="https://hynek.me/articles/semver-will-not-save-you/" type="text/html"/><title type="html">Semantic Versioning Will Not Save You</title><published>2021-03-02T00:00:00Z</published><updated>2021-03-02T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;The widely used Python package &lt;em&gt;cryptography&lt;/em&gt; &lt;a href="https://lwn.net/Articles/845535/"&gt;changed their build system&lt;/a&gt; to use Rust for low-level code, which caused an emotional GitHub thread. Enthusiasts of 32-bit hardware from the 1990s aside, a vocal faction stipulated adherence to &lt;em&gt;Semantic Versioning&lt;/em&gt; from the maintainers, claiming it would’ve prevented all grief. I will show you not only why this is wrong but also how relying on &lt;em&gt;Semantic Versioning&lt;/em&gt; hurts &lt;em&gt;you&lt;/em&gt; – the user.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/document-your-tests/</id><link rel="alternate" href="https://hynek.me/articles/document-your-tests/" type="text/html"/><title type="html">Why You Should Document Your Tests</title><published>2020-05-04T00:00:00Z</published><updated>2020-05-04T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Some projects have the policy that all tests must have an explanatory comment – including all of mine. At first, I found that baffling. If that&amp;rsquo;s you right now, this article is for you.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-github-actions/</id><link rel="alternate" href="https://hynek.me/articles/python-github-actions/" type="text/html"/><title type="html">Python in GitHub Actions</title><published>2020-03-09T00:00:00Z</published><updated>2020-07-20T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;GitHub&amp;rsquo;s own CI called &lt;em&gt;GitHub Actions&lt;/em&gt; has been out of closed beta for a while and offers generous free quotas and a seamless integration with the rest of the site. Let&amp;rsquo;s have a look at how to use it for an open source Python package.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-in-production/</id><link rel="alternate" href="https://hynek.me/articles/python-in-production/" type="text/html"/><title type="html">Python in Production</title><published>2020-02-23T16:45:00Z</published><updated>2020-02-23T16:45:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;I&amp;rsquo;m missing a key part from the public Python discourse and I would like to help to change that.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/packaging-metadata/</id><link rel="alternate" href="https://hynek.me/articles/packaging-metadata/" type="text/html"/><title type="html">Python Packaging Metadata</title><published>2020-02-14T00:00:00Z</published><updated>2020-02-23T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Since this topic keeps coming up, I’d like to briefly share my thoughts on Python package metadata because it’s – as always – more complex than it seems.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/simple-python-azure-pipelines/</id><link rel="alternate" href="https://hynek.me/articles/simple-python-azure-pipelines/" type="text/html"/><title type="html">Python in Azure Pipelines, Step by Step</title><published>2019-06-03T09:14:00Z</published><updated>2019-06-03T09:14:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Since the acquisition of &lt;em&gt;Travis CI&lt;/em&gt;, the future of their free offering is unclear. &lt;em&gt;Azure Pipelines&lt;/em&gt; has a generous free tier, but the examples I found are discouragingly complex and take advantage of features like templating that most projects don&amp;rsquo;t need. To close that gap, this article shows you how to move a Python project with simple CI needs from &lt;em&gt;Travis CI&lt;/em&gt; to Azure Pipelines.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/hallway-track/</id><link rel="alternate" href="https://hynek.me/articles/hallway-track/" type="text/html"/><title type="html">The Price of the Hallway Track</title><published>2019-05-15T18:00:00Z</published><updated>2019-05-15T18:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;There are many good reasons not to go to every talk possible when attending conferences. However, increasingly, it became hip to boast about avoiding going to talks – encouraging others to follow suit. That rubs me the wrong way as a speaker, and I&amp;rsquo;ll try to explain why.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-app-deps-2018/</id><link rel="alternate" href="https://hynek.me/articles/python-app-deps-2018/" type="text/html"/><title type="html">Python Application Dependency Management</title><published>2018-11-29T17:00:00Z</published><updated>2019-11-06T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;We have more ways to manage dependencies in Python applications than ever. But how do they fare in production? Unfortunately this topic turned out to be quite polarizing and was at the center of a lot of heated debates. This is my attempt at an opinionated review through a DevOps lens.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/hashes-and-equality/</id><link rel="alternate" href="https://hynek.me/articles/hashes-and-equality/" type="text/html"/><title type="html">Python Hashes and Equality</title><published>2017-11-20T06:45:00Z</published><updated>2017-11-20T06:45:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Most Python programmers don’t spend a lot of time thinking about how equality and hashing works. It usually just works. However there’s quite a bit of gotchas and edge cases that can lead to subtle and frustrating bugs once one starts to customize their behavior – especially if the rules on how they interact aren’t understood.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/docker-signals/</id><link rel="alternate" href="https://hynek.me/articles/docker-signals/" type="text/html"/><title type="html">Why Your Dockerized Application Isn’t Receiving Signals</title><published>2017-06-19T00:00:00Z</published><updated>2017-06-19T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Proper cleanup when terminating your application isn’t less important when it’s running inside of a Docker container. Although it only comes down to making sure signals reach your application and handling them, there’s a bunch of things that can go wrong.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/speaking/</id><link rel="alternate" href="https://hynek.me/articles/speaking/" type="text/html"/><title type="html">On Conference Speaking</title><published>2017-05-30T00:00:00Z</published><updated>2017-05-30T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;I’ve seen quite a bit of the world thanks to being invited to speak at conferences. Since some people are under the impression that serial conference speakers possess some special talents, I’d like to demystify my process by walking you through my latest talk from start to finish.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/serialization/</id><link rel="alternate" href="https://hynek.me/articles/serialization/" type="text/html"/><title type="html">Better Python Object Serialization</title><published>2016-08-22T12:30:00Z</published><updated>2022-05-17T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;The Python standard library is full of underappreciated gems. One of them allows for simple and elegant function dispatching based on argument &lt;em&gt;types&lt;/em&gt;. This makes it perfect for serialization of arbitrary objects – for example to JSON in web APIs and structured logs.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/decorators/</id><link rel="alternate" href="https://hynek.me/articles/decorators/" type="text/html"/><title type="html">Please Fix Your Decorators</title><published>2016-08-01T00:00:00Z</published><updated>2017-05-11T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;If your Python decorator unintentionally changes the signatures of my callables or doesn’t work with class methods, it’s broken and should be fixed. Sadly &lt;em&gt;most&lt;/em&gt; decorators are broken because the web is full of bad advice.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/conditional-python-dependencies/</id><link rel="alternate" href="https://hynek.me/articles/conditional-python-dependencies/" type="text/html"/><title type="html">Conditional Python Dependencies</title><published>2016-05-19T00:00:00Z</published><updated>2017-12-29T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Since the inception of &lt;a href="https://pythonwheels.com"&gt;wheels&lt;/a&gt; that install Python packages without executing arbitrary code, we need a static way to encode conditional dependencies for our packages. Thanks to &lt;a href="https://www.python.org/dev/peps/pep-0508/"&gt;PEP 508&lt;/a&gt; we do have a blessed way but sadly the prevalence of old &lt;em&gt;setuptools&lt;/em&gt; and &lt;em&gt;pip&lt;/em&gt; versions make it a minefield to use.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python3-2016/</id><link rel="alternate" href="https://hynek.me/articles/python3-2016/" type="text/html"/><title type="html">Python 3 in 2016</title><published>2016-02-17T00:00:00Z</published><updated>2016-02-17T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;My completely anecdotal view on the state of Python 3 in 2016. Based on my own recent experience, observations, and exchanges with other members of the Python community.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/hasattr/</id><link rel="alternate" href="https://hynek.me/articles/hasattr/" type="text/html"/><title type="html">hasattr() – A Dangerous Misnomer</title><published>2016-01-13T00:00:00Z</published><updated>2016-02-10T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Don’t use Python’s &lt;code&gt;hasattr()&lt;/code&gt; unless you’re writing Python 3-&lt;em&gt;only&lt;/em&gt; code &lt;em&gt;and&lt;/em&gt; understand how it works.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/storing-passwords/</id><link rel="alternate" href="https://hynek.me/articles/storing-passwords/" type="text/html"/><title type="html">Storing Passwords in a Highly Parallelized World</title><published>2016-01-06T00:00:00Z</published><updated>2016-01-06T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Why “Use &lt;em&gt;bcrypt&lt;/em&gt;.” is not the best recommendation (anymore).&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/testing-packaging/</id><link rel="alternate" href="https://hynek.me/articles/testing-packaging/" type="text/html"/><title type="html">Testing &amp; Packaging</title><published>2015-10-19T00:00:00Z</published><updated>2021-01-04T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;How to ensure that your tests run code that you think they are running, and how to measure your coverage over multiple &lt;em&gt;tox&lt;/em&gt; runs (in parallel!).&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/virtualenv-lives/</id><link rel="alternate" href="https://hynek.me/articles/virtualenv-lives/" type="text/html"/><title type="html">virtualenv Lives!</title><published>2014-09-15T15:00:00Z</published><updated>2015-01-10T08:30:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Setting up Python to the point to be able install packages from PyPI can be annoying and time-intensive. Even worse are OS-provided installations that start throwing cryptic error messages. Especially desktops are prone to that but it’s possible to break the whole toolchain of a server by installing some shiny package you heard about on &lt;em&gt;reddit&lt;/em&gt;.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/apple-openssl-verification-surprises/</id><link rel="alternate" href="https://hynek.me/articles/apple-openssl-verification-surprises/" type="text/html"/><title type="html">Apple OpenSSL Verification Surprises</title><published>2014-03-03T15:30:00Z</published><updated>2014-03-03T15:30:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Apple ships a patched version of OpenSSL with macOS. If no precautions are taken, their changes rob you of the power to choose your trusted certificate authorities (CAs) and break the semantics of a callback that can be used for custom checks and verifications in client software.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/</id><link rel="alternate" href="https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/" type="text/html"/><title type="html">Sharing Your Labor of Love: PyPI Quick and Dirty</title><published>2013-07-29T00:00:00Z</published><updated>2019-10-16T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;A completely incomplete guide to packaging a Python module and sharing it with the world on PyPI.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/a-short-summary-on-sybase-sql-anywhere-python/</id><link rel="alternate" href="https://hynek.me/articles/a-short-summary-on-sybase-sql-anywhere-python/" type="text/html"/><title type="html">A Short Summary on Sybase SQL Anywhere and Python</title><published>2013-05-29T00:00:00Z</published><updated>2013-05-29T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;As some of my older rage-filled articles indicated, we’re still running some services on SAP&amp;rsquo;s &lt;a href="https://en.wikipedia.org/wiki/SQL_Anywhere"&gt;&lt;em&gt;SQL Anywhere&lt;/em&gt;&lt;/a&gt;. Since it cost me many hours and sanity wrangling, I think it may be helpful to others to summarize the current situation for Python developers.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/taking-some-pain-out-of-python-logging/</id><link rel="alternate" href="https://hynek.me/articles/taking-some-pain-out-of-python-logging/" type="text/html"/><title type="html">Taking Some Pain out of Python Logging</title><published>2013-03-06T00:00:00Z</published><updated>2013-03-06T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Even the best of us &lt;a href="https://twitter.com/chrismcdonough/status/280251086609203200"&gt;hate&lt;/a&gt; logging in Python sometimes. And while a lot of its problems are actually just bad docs and terrible defaults in the past, there is some pain that can be avoided.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/</id><link rel="alternate" href="https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/" type="text/html"/><title type="html">Hardening Your Web Server’s SSL Ciphers</title><published>2013-02-05T00:00:00Z</published><updated>2021-02-11T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;There are many wordy articles on configuring your web server’s &lt;a href="https://thoughtstreams.io/glyph/there-is-no-ssl/"&gt;TLS&lt;/a&gt; ciphers. This is not one of them. Instead, I will share a configuration that scores a straight “&lt;a href="https://www.youtube.com/watch?v=WVzp4MJRKHc"&gt;A&lt;/a&gt;” on &lt;a href="https://www.ssllabs.com/ssltest/"&gt;Qualys’s SSL Server Test&lt;/a&gt; in 2023.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-app-deployment-with-native-packages/</id><link rel="alternate" href="https://hynek.me/articles/python-app-deployment-with-native-packages/" type="text/html"/><title type="html">Python Application Deployment with Native Packages</title><published>2012-05-03T00:00:00Z</published><updated>2017-12-04T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;&lt;em&gt;Speed&lt;/em&gt;, &lt;em&gt;reproducibility&lt;/em&gt;, &lt;em&gt;easy rollbacks&lt;/em&gt;, and &lt;em&gt;predictability&lt;/em&gt; is what we strive for when deploying our diverse Python applications. And that’s what we achieved by leveraging virtual environments and Linux system packages.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/python-deployment-anti-patterns/</id><link rel="alternate" href="https://hynek.me/articles/python-deployment-anti-patterns/" type="text/html"/><title type="html">Python Deployment Anti-Patterns</title><published>2012-04-23T00:00:00Z</published><updated>2012-04-23T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Deploying web applications is hard. No shiny continuous deployment talk and no DevOps coolness can change that. Or to use DevOps Borat’s &lt;a href="https://twitter.com/DEVOPS_BORAT/status/192271992253190144"&gt;words&lt;/a&gt;: “Is all fun and game until you are need of put it in production.“ There are some mistakes I see people doing again and again so I’d like to address them here.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/dead-simple-connection-pooling-with-twisted/</id><link rel="alternate" href="https://hynek.me/articles/dead-simple-connection-pooling-with-twisted/" type="text/html"/><title type="html">Dead Simple Connection Pooling with Twisted</title><published>2011-12-14T00:00:00Z</published><updated>2011-12-14T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;There is this common notion, that asynchronous IO is hard and that writing a custom connection pool is even harder. The nice thing however is, that in reality asynchronous IO is just “weird” in the beginning – and that a connection pool using async IO is so simple it hurts.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/twisted-sybase/</id><link rel="alternate" href="https://hynek.me/articles/twisted-sybase/" type="text/html"/><title type="html">Twisted Sybase SQL Anywhere</title><published>2011-04-27T00:00:00Z</published><updated>2011-04-27T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;Using the &lt;a href="https://github.com/sqlanywhere/sqlanydb"&gt;official sqlanydb&lt;/a&gt; driver for Python together with Twisted’s adbapi produces not-so-occasional crashes as of today (sqlanydb 1.0.2, Twisted 11.0.0). Apparently, the official SQL Anywhere drivers aren’t thread-safe. It cost me several days to figure out because I was searching the fault in my code so I hope to spare you some pain.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/django-and-remote-sybase-servers/</id><link rel="alternate" href="https://hynek.me/articles/django-and-remote-sybase-servers/" type="text/html"/><title type="html">Django and Remote Sybase Servers</title><published>2011-02-07T00:00:00Z</published><updated>2011-02-07T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;It took me a while to figure it out, so I decided to share.&lt;/p&gt;</summary></entry><entry><id>https://hynek.me/articles/ldap-a-gentle-introduction/</id><link rel="alternate" href="https://hynek.me/articles/ldap-a-gentle-introduction/" type="text/html"/><title type="html">LDAP: A Gentle Introduction</title><published>2007-02-13T00:00:00Z</published><updated>2007-02-13T00:00:00Z</updated><author><name>Hynek Schlawack</name><email>hs@ox.cx</email><uri>https://hynek.me/</uri></author><summary type="html">&lt;p&gt;The perception of LDAP (Lightweight Directory Access Protocol) is ambivalent. On the one hand, it is widely supported as a common authentication backend. On the other hand, there&amp;rsquo;s very little and poor documentation mainly targeted toward a particular case (for example, replacing NIS with LDAP).&lt;/p&gt;</summary></entry></feed>