This Python library is part of a larger picture in the Scikit-HEP ecosystem| ISciNumPy.dev
UHI 1.0 is out, with a major new feature: a new histogram serialization spec! This spec supports multiple formats (HDF5, zip, and JSON initially), and can be supported by multiple libraries (Boost-histogram/hist initially). There’s also a new test suite helper for libraries targeting the UHI indexing spec.| ISciNumPy.dev
Pybind11 3.0 has been released! I would like to highlight some of the key changes below; be sure to check out the changelog and upgrade guide for more information! This release includes an ABI bump, the first required bump in many years on Unix (Windows has had required bumps more often). This release contains the multi-year smart-holder branch, multi-phase init and subinterpreter support, py::native_enum, an interface to warnings, typing improvements, and more. CMake now defaults to FindPyth...| ISciNumPy.dev
cibuildwheel 3.0.0 is out, with some very big additions. We’ve added GraalPy, Python 3.14 (and 3.14t) betas, and iOS support! We’ve got several new options: test-sources, test-environment, and (experimental) pyodide-version. We now fully use enable (and PyPy requires using it), and we no longer inject setuptools and wheel in build environments. Defaults have changed, too: build is now the default frontend, manylinux_2_28 is the default manylinux image, with 32-bit linux now being opt-in. ...| ISciNumPy.dev
Python π (3.14) beta 1 is out, which means the features are locked in. The big feature this time around are template strings, lots more color (including syntax highlighting in the REPL!), remote debugging, deferred evaluation of annotations, and the usual error message and performance improvements.| ISciNumPy.dev
What is the difference between an app and a library? This seemingly simple question confuses some, and it turns out to be a harder question to answer than you might expect. While the actual distinction between these common terms will always be muddled in practice, I propose a specific definition to be used when considering dependencies. This distinction is important when discussing bound version constraints in the next post.| ISciNumPy.dev
Python Learning materials HSF training curriculum (Python, bash, git, docker, and more) Topical articles CPython core developers Brett Cannon is a CPython core developer, and is very interested in standardizing packaging. https://snarky.ca Why I don’t like SemVer anymore: A great resource to make you think about what SemVer means and where it falls short. What the heck is pyproject.toml: A intro to modern Python packaging A quick-and-dirty guide on how to install packages for Python: This s...| ISciNumPy.dev
Another great release from cibuildwheel, 2.2.0, is out! There are a few important additions in this release that you should be aware of, so I will outline the major changes here. We will cover the new musllinux wheels, overload configuration, and incoming changes to pip and PyPy expected in the next release. As always, it is recommended that you pin your cibuildwheel version and then provide some automated way to keep the pin up-to-date, such as GitHub’s dependabot. You should be updating j...| ISciNumPy.dev
The cibuildwheel package has just had a major release with some fantastic features. Python 2.7 and 3.5 support has been removed (and PyPy3.6), allowing us to update to the latest manylinux and auditwheel versions, and support the newly unified manylinux PyPy3.7 images. We now allow users to select pypa/build as a build frontend. We now have a custom option to enable pre-release Pythons (3.10 currently) for testing before they are ABI stable (please don’t release wheels until that happens). ...| ISciNumPy.dev
CLI11, a powerful library for writing beautiful command line interfaces in C++11, has been updated to 2.0. A lot of deprecated things have been removed, and there was a lot of cleanup under-the-hood; making CLI11 simpler. A few defaults have changed slightly, like better TOML support by default. CLI11 does a better job than ever understanding any sort of container you provide - complex numbers are natively supported, along with atomic types. A long requested feature, simple version flags, has...| ISciNumPy.dev
Python 3.9 is out (and has been for a while, I’m late posting this), with new features and changes. The themes for this release have been heavily internal improvements, such as a new more powerful parser, and the usual static typing improvements, along with a several bits new-user facing new syntax. This makes 3.9 a smaller release, but still it has some nice features of note.| ISciNumPy.dev
I recently got an M1 mac, and I’ll be cataloging my experience with using it for scientific software development. I’ll be returning to update this page periodically, and will eventually have a focused recommendation for Apple Silicon setup, similar to my Intel setup.| ISciNumPy.dev
cibuildwheel has just had two back-to-back releases, two weeks apart, representing several months of hard work and some exciting few features! I will be covering both releases at once, so we will discuss Apple Silicon support, architecture emulation on Linux, integrated PEP 621 Requires-Python support, the native GitHub Action, extended build and test controls, and more! If you are following the releases, 1.7.0 came out last November (2020), and included the fantastic output folding feature, ...| ISciNumPy.dev
This is the first of two posts on cibuildwheel, a fantastic project I joined after switching to it from my own azure-wheel-helpers, which I’ve blogged about here before. It is the best wheelbuilding system available for Python today, and can make something that is normally a pain to setup and a headache to maintain a breeze (by forcing all the headaches on us, of course, as maintainers, but it’s better to solve issues centrally! Obviously we rather like solving these problems. Or we are j...| ISciNumPy.dev
I am pleased to announce the release of pybind11 2.6.0! This is the largest release since 2.2 (released over three years ago). I would like to highlight some of the key changes below; be sure to check out the changelog and upgrade guide for more information! The focus of this release was stability, packaging, and supporting more platforms, though there are a lot of small features and useful additions, covered by newly expanded docs.| ISciNumPy.dev
Now that SciPy 2020 is over, I would like to share the process I used to create the talk video. The effect was designed to recreate the feeling of watching an actual in-person talk. I will first cover parts, detailing what I got and some general suggestions, then I’ll discuss the filming process, and finally, I will cover the post-process procedure and software. The entire process took about a day and a half, with an overnight render, and cost about $200 (best compared to the cost of regist...| ISciNumPy.dev
COVID-19 is ravaging the globe. Let’s look at the excellent Johns Hopkins dataset using Pandas. This will serve both as a guideline for getting the data and exploring on your own, as well as an example of Pandas multi-indexing in an easy to understand situation. I am currently involved in science-responds.| ISciNumPy.dev
The foundational histogramming package for Python, boost-histogram, hit beta status with version 0.6! This is a major update to the new Boost.Histogram bindings. Since I have not written about boost-histogram yet here, I will introduce the library in its current state. Version 0.6.2 was based on the recently released Boost C++ Libraries1.72 Histogram package. Feel free to visit the docs, or keep reading this post. This Python library is part of a larger picture in the Scikit-HEP ecosystem of ...| ISciNumPy.dev
Python 3.8 is out, with new features and changes. The themes for this release have been performance, ABI/internals, and static typing, along with a smattering of new syntax. Given the recent community statement on Python support, we should be staying up to date with the current changes in Python. As Python 2 sunsets, we are finally in an era where we can hope to someday use the features we see coming out of Python release again!| ISciNumPy.dev
The final meeting for new features in C++ is over, so let’s explore the new features in C++, from a data science point of view. This is the largest release of C++ since C++11, and when you consider C++14 and C++17 to be interim releases, the entire 9 year cycle is possibly the largest yet! It may not feel quite as massive as C++11, since we didn’t have interim releases for C++11 and because C++11 is a much more complete, useful language than C++03, but this is still a really impactful rel...| ISciNumPy.dev
Here is a list of my favorite things to do to properly setup macOS for scientific work. I periodically update it; feel free to leave a comment if something breaks. This should work on macOS 11 on Intel; see my post on Apple Silicon to track progress on a similar setup.| ISciNumPy.dev
This is the second post in a series about Azure DevOps. This one is about release pipelines; if you use Azure to build packages (like binaries, etc.), how do you push them to a final endpoint? In this example, we will be building a simple pure Python package, and pushing the result to Test-PyPI. You can adapt it to your situation, however. The third post will cover building Python binaries. This series was developed to update the testing and releasing of Python packages for Scikit-HEP. Severa...| ISciNumPy.dev
Continuous Integration (CI) is fantastic for software development and deployment. One of the newest entries into the CI market1 is Microsoft’s Azure DevOps. Their Open Source support is impressive; it is likely part of the recent push2 by Microsoft to be more Open Source friendly. Open Source projects get 10 parallel builds, unlimited build minutes, 6 hour job timeouts, and incredibly fast jobs on macOS, Linux, and Windows, all via a single platform. Quite a few major projects3 have been mo...| ISciNumPy.dev
For High Energy Physics, the go-to framework for big data analysis has been CERN’s ROOT framework. ROOT is a massive C++ library that even predates the STL in some areas. It is1also a JIT C++ interpreter called Cling, probably the best in the business. If you have heard of the Xeus C++ Kernel for Jupyter, that is built on top of Cling. ROOT has everything a HEP physicist could want: math, plotting, histograms, tuple and tree structures, a very powerful file format for IO, machine learning, ...| ISciNumPy.dev
For particle physicists, ROOT is one of the most important toolkits around. It is a huge suite of tools that predates the C++ standard library, and has almost anything a particle physicist could want. It has driven developments in other areas too. ROOT’s current C++ interpreter, CLING, is the most powerful C++ interpreter available and is used by the Xeus project for Jupyter. The Python work has helped PyPy, with CPPYY also coming from ROOT. However, due to the size, complexity, and age of ...| ISciNumPy.dev
These are some illustrations and videos that I have made over the years.| ISciNumPy.dev
Let’s compare several ways of making Histograms. I’m going to assume you would like to end up with a nice OO histogram interface, so all the 2D methods will fill a Physt histogram. We will be using a 2 x 1,000,000 element array and filling a 2D histogram, or 10,000,000 elemends in a 1D histogram. Binnings are regular. 1D 10,000,000 item histogram ExampleKNLMBPX24 NumPy: histogram704 ms147 ms114 ms NumPy: bincount432 ms110 ms117 ms fast-histogram337 ms45.9 ms45.7 ms Numba312 ms58.8 ms60.7 ...| ISciNumPy.dev
Let’s try a non-trivial example of a binding: Minuit2 (6.14.0 standalone edition).| ISciNumPy.dev
This was originally given as a PyHEP 2018 talk, It is designed to be interactive, and can be run in SWAN if you have a CERN account. If you want to run it manually, just download the repository: github.com/henryiii/pybindings_cc. It is easy to run in Anaconda.| ISciNumPy.dev
CLI11, a powerful library for writing beautiful command line interfaces in C++11, has been updated to 1.6, the largest update ever. CLI11 output is more customizable than ever, and has a better functionality separation under the hood. CLI11 has had the formatting system completely redesigned, with minor or complete customization of the output possible. Configuration files reading and writing also can be configured; a new example with json instead of ini formatting is included. Validators (fin...| ISciNumPy.dev
CMake 3.11 was just released; this is particularly exciting release for CMake. I’d like to give a quick and friendly introduction to the new features that might make the largest difference for CMake users.| ISciNumPy.dev
GooFit 2.1 introduces the full-featured Python bindings to GooFit. These bindings mimic the C++ usage of GooFit, including bindings for all PDFs, and also provide NumPy-centric conversions, live Jupyter notebook printing, pip install, and more. Most of the examples in C++ are provided in Python form, as well. Several other API changes were made. Observables are now distinguished from Variables and provided as a separate class. Both these classes are now passed around by copy everywhere.1 The ...| ISciNumPy.dev
My projects Besides being an admin at Scikit-HEP, and active in conda-forge and homebrew, these are some of the projects I work on directly: Name Description pybind11 Binding C++11+ and Python beautifully. cibuildwheel Create Python wheels beautifully. boost-histogram Histograms in Python based on Boost.Histogram for C++14. CLI11 A powerful but easy to use C++11 command line interface parser. Particle Particle descriptions in Python. DecayLanguage Decay chains in Python. Plumbum A shell tools...| ISciNumPy.dev
Include-what-you-use is a promising little tool for cleaning up a codebase. It didn’t end up working for the use I had for it, but it still could be useful. Here is a quick guideline on installing it on macOS.| ISciNumPy.dev
CLI11 started years ago as a set of tools built on Boost Program Options (PO), and has since matured into the powerful, easy-to-use stand-alone library it is available today. If you would like to see the original inspiration for CLI11, look at Program.hpp in CLI11 0.1. The rest of the post will focus on a comparison between making a CLI app in the two libraries. I am going to assume that you are preparing fairly basic but non-trivial programs in the following comparison. TL;DR: CLI11 is more ...| ISciNumPy.dev
CLI11, a powerful library for writing beautiful command line interfaces in C++11, has been updated to 1.3, the largest update ever. CLI11 is more powerful than ever, and has simpler and more consistent parsing under the hood. This version focused on refactoring several key systems to ensure correct behavior in the interaction of different settings. Most caveats about features only working on the main App have been addressed, and extra arguments have been reworked. Inheritance of defaults make...| ISciNumPy.dev
If you use an RSS feed reader, you can watch all your favorite GitHub repositories for new releases! Just follow: https://github.com/USER/REPO/releases.atom You can see a long discussion with other options here.| ISciNumPy.dev
Building OpenMP code is actually possible using Apple Clang that comes default with macOS’s Xcode! Although Apple does not build the OpenMP library, the compiler still supports it. In this post, I demonstrate the procedure necessary to include OpenMP in your build, both with the new support in CMake 3.12, as well as how it would be done without it.| ISciNumPy.dev
Git/Jupyter Books Here is a list of GitBooks that I have either written or helped write: Name Description Level Up Your Python Intermediate to advanced Python, for a Princeton Research Computing Workshop. Modern CMake A fantastic, up-to-date resource for CMake the way it should be. CompClass Computational Science in Python course given at the University of Cincinnati, Fall 2018. DevelopKit Developing software in LHCb’s Run 3. GitBook Plugin - Term A powerful terminal formatting plugin (used...| ISciNumPy.dev
Princeton Wintersession 2025 Tools to help you write better code Jan 22, 2025 Princeton, USA PyHEP 2024 The two flavors of Python 3.13 Jul 1, 2024 Virtual PyCon 2024 Modern binary build systems May 17, 2024 Pittsburgh, PA YouTube Princeton Wintersession 2024 Software Quality Assurance Tooling Jan 23, 2024 Princeton, USA Princeton RSE Learning Rust with Advent of Code 2023 Jan 10, 2024 Princeton, USA Princeton RSE Peer Network Project report - henryiii Nov 13, 2023 Princeton, USA PrincetonPy S...| ISciNumPy.dev
Henry Schreiner is a Computational Physicist / Research Software Engineer in High Energy Physics at Princeton University. He specializes in the interface between high-performance compiled codes and interactive computation in Python, in software distribution, and in interface design. He has previously worked on computational cosmic-ray tomography for archaeology and high performance GPU model fitting. He is currently a member of the IRIS-HEP project, developing tools for the next era of the La...| ISciNumPy.dev
The next version of the premier CUDA/OpenMP fitting program for HEP analysis, GooFit 2.0, has been released. GooFit is now easy to build on a wide variety of Unix systems, and supports debuggers and IDEs. GooFit is faster, has unit tests, and working examples. More PDFs and examples have been added, as well as newly released example datasets that are downloaded automatically. GooFit now has built in support for MPI, and can use that to deploy to multiple graphics cards on the same machine. A ...| ISciNumPy.dev
CLI11, a powerful library for writing command line interfaces in C++11, has just been released. There are no requirements beyond C++11 support (and even <regex> support not required). It works on Mac, Linux, and Windows, and has 100% test coverage on all three systems. You can simply drop in a single header file (CLI11.hpp available in releases) to use CLI11 in your own application. Other ways to integrate it into a build system are listed in the README. The library was inspired the Python li...| ISciNumPy.dev
I often see perfect forwarding listed for constructor arguments, but not usually for functions with a return or methods. Here is my solution for an method method of class Cls: template<typename...Args>staticautomethod(Cls*cls,Args&&...args)->typenamestd::result_of<decltype(&Cls::method)(Cls,Args...)>::type{returncls->method(std::forward<Args>(args)...);} This is useful if you want to call protected classes from a “helper” friend class, for example, to expose them to tests without having t...| ISciNumPy.dev
This is a guide to setting up Lmod (lua environment modules) on a CentOS system. I’ve used a similar procedure to set them up on a Mac, as well, so this is still a useful guide to the workings of Lmod if you use a different system; mostly paths will change. On a Mac, you’ll want to install Lmod from the science tap in brew. There are several good pages covering environment modules (TCL version), but not many that use the newer Lua syntax. This document aims to fill that roll.| ISciNumPy.dev
About ten years ago, Guido Van Rossum, the Python author and Benevolent Dictator for Life (BDFL), along with the Python community, decided to make several concurrent backward incompatible changes to Python 2.5 and release a new version, Python 3.0.| ISciNumPy.dev
The every-three-year cycle has changed the development of C++; we are now getting consistent releases somewhere in-between the major and minor releases of old. The 2017 release may be called minor by some, with a huge portion of the planned improvements being pushed back another 3-6 years, but there were several substantial changes in useful areas; it is much more impactful than C++14, for example. This almost feels like a lead-in release to C++20. The std::variant, std::optional, and std::an...| ISciNumPy.dev
Unlike C++11, this is a minor release, focused mostly on improvements on top of C++11 changes, with very little that one could call “new”. C++14 feels a little more natural than C++11 by expanding the usage of features and implementing common sense additions that were missed in the original C++11 release. There were also quite a few bug fixes; several of these were backported into C++11 mode in compilers. Also, while C++11 is always available in ROOT 6, C++14 requires a flag and compatibl...| ISciNumPy.dev
C++11 was the largest change ever made to C++; and due to the changed release schedule, probably will remain the largest single change. It is a well thought out, mostly backward-compatible change that can cause you to completely rethink the way you write code in C++. It is best thought of as almost a new language, a sort of (C++)++ language. There are too many changes to list here, and there are excellent resources available, so this is meant to just give you a taste of some of the most usefu...| ISciNumPy.dev
This is a quick recipe for setting up CMake to use googletest in your projects. First, make a tests folder in the root of your project. Then, add add_subdirectory(tests) to your CMakeLists.txt, after you’ve finished adding the libraries in your project. Note that the way I’ve written this probably requires CMake 3.4+.| ISciNumPy.dev
This is a simple explanation of the asyncio module and new supporting language features in Python 3.5. Even though the new keywords async and await are new language constructs, they are mostly1 useless without an event loop, and that is supplied in the standard library as asyncio. Also, you need awaitable functions, which are only supplied by asyncio (or in the growing set of async libraries, like asyncssh, quamash etc.).| ISciNumPy.dev
This is a simple example to show how Asyncio works without using Asyncio itself, instead using a basic and poorly written event loop. This is only meant to give a flavor of what Asyncio does behind the curtains. I’m avoiding most details of the library design, like callbacks, just to keep this simple. Since this is written as an illustration, rather than real code, I’m going to dispense with trying to keep it 2.7 compatible.| ISciNumPy.dev
There is a package for making Feynman diagrams in LaTeX. Unfortunately, it is old and dvi latex only. If you are using pdflatex or lualatex, as you should be, it does not work. Even in regular LaTeX, it’s a bit of a pain. Why is there not a new package for pdflatex? Turns out, you don’t need one. Due to the powerful drawing library Tikz, you can create any diagram easily, and can customize it completely. For example:| ISciNumPy.dev
I realized that CRY did not have a CMake based install option, so including it in a GEANT4 cmake project might not be obvious. This is how you would do it in your CMakeLists.txt:| ISciNumPy.dev
Note: There is a better way to do this described here. If you’ve ever tried apt-get or brew to try to install gtest, you are probably familiar with the fact that gtest is not “recommend” for global install on your system. As an alternative, the recommendation is that you make it part of your project. The process for making gtest part of your project, however, is not well documented, at least for modern git projects. What follows is the procedure I used to do so.| ISciNumPy.dev
Slots seem to be poorly documented. What they do is simple, but whether they are used is tricky. This is a little mini-post on slots.| ISciNumPy.dev
This is a quick tutorial over the basics of what metaclasses do. The Metaclass Metaclasses, while seemingly a complex topic, really just do something very simple. They control what happens when you have code that turns into a class object. The normal place they are executed is right after the class statement. Let’s see that in action by using print as our metaclass.| ISciNumPy.dev
I haven’t seen a great deal of practical documentation about using classmethods as factories in Python (which is arguably the most important use of a classmethod, IMO). This post hopes to fill in that gap.| ISciNumPy.dev
I recently decided to try my hand at making an auto-load extension for Python and Plumbum. I was planning to suggest it as a new feature, then I thought it might be an experimental feature, and now it’s just a blog post. But it was an interesting idea and didn’t seem to be well documented process on the web. So, here it is. The plan was to make commands like this:| ISciNumPy.dev
Wouldn’t it be nice if we had uncertainty with a nice notation in IPython? The current method would be to use raw Python, fromuncertaintiesimportufloatprint(ufloat(12.34,0.01)) 12.340+/-0.010 Let’s use the infix library to make the notation easier. We’ll define |pm| to mean +/-.| ISciNumPy.dev
I’ve been working on a color addition to Plumbum for a little while, and I’d like to share the basics of using it with you now. This library was originally built around a special str subclass, but now is built on the new Styles representation and is far more powerful than the first implementation. It safely does nothing if you do not have a color-compatible systems (posix + tty currently), but can be forced if need be. It is included with Plumbum, so you don’t have to add a requirement ...| ISciNumPy.dev
I have created a thesis class file for a UT Thesis in LaTeX. It has already been used for at least one passing thesis, so it does meet the current UT guidelines. (Please let me know if there are any issues!) Since I use Bitbucket for all my private repositories (like my thesis itself), the code is in a Bitbucket repository rather than GitHub. Here is the link if you want to create a pull request or want to compile the class and documentation from the source .| ISciNumPy.dev
Scripting in Bash is a pain. Bash can do almost anything, and is unbeatable for small scripts, but it struggles when scaling up to doing anything close to a real world scripting problem. Python is a natural choice, especially for the scientist who already is using it for analysis. But, it’s much harder to do basic tasks in Python. So you are left with scripts starting out as Bash scripts, and then becoming a mess, then being (usually poorly) ported to Python, or even worse, being run by a P...| ISciNumPy.dev
This is intended as an example to demonstrate the use of overloading in object oriented programming. This was written as a Jupyter notebook (aka IPython) in Python 3. To run in Python 2, simply rename the variables that have unicode names, and replace truediv with div. While there are several nice Python libraries that support uncertainty (for example, the powerful uncertainties package and the related units and uncertainties package pint), they usually use standard error combination rules. F...| ISciNumPy.dev
Scikit-build-core 0.10 is out, and it is one of the largest releases we’ve produced in terms of new configuration options. It automatically reads your minimum CMake version, you can tell it to read your scikit-build-core minimum-version, and there are settings for many of the advanced things users used to do with scikit-build (classic), like rebuilds or pure Python fallbacks on build failures.| ISciNumPy.dev
cibuildwheel 2.19 is out, with some very big additions. A new platform, Pyodide, has been added for building WebAssembly wheels. We’ve added CPython 3.13 free-threaded builds, now on all OS’s. And we have an opt-in speed improvement with the build[uv] build-frontend option. We’ve had some fantastic releases of cibuildwheel since my last post over 2.10, so I’ll include a few of the new features from those releases, too, with a highlight on a larger feature that can use more explaining:...| ISciNumPy.dev
Python 3.13 betas are out, which means the features are locked in. For the first time in thirty years, Python has a new, more colorful REPL! There’s also a no-GIL compile-time option (free-threaded), an optional JIT, some new typing features, and better error messages (again).| ISciNumPy.dev
One outcome of the 2023 Scientific Python Developer Summit was the Scientific Python Development Guide, a comprehensive guide to modern Python package development, complete with a new project template supporting 12 build backends and a WebAssembly-powered checker with checks linked to the guide. The guide covers topics like modern, compiled, and classic packaging, style checks, type checking, docs, task runners, CI, tests, and much more! There also are sections of tutorials, principles, and s...| ISciNumPy.dev
While it can also do much more, Python is a fantastic language for writing small scripts and utilities with it’s expressive syntax and batteries-included standard library. But what if you need just a bit more? PyPI is one of the best package repositories for any language, and being able to access it without having to write a multi-file library and setting up virtual environments would be a dream - one that is becoming reality. Pipx 1.4.2 has an experimental implementation of the provisional...| ISciNumPy.dev
C++23 is complete and pretty much finalized, so let’s explore the new features in C++, from a data science point of view. This is not as large of a release as C++20 or C++11, but it’s still a hefty release with lots of nice new features - larger than C++17. Some of the major new features are building on themes from C++20, such as vastly expanded ranges and views, more constexpr/consteval, module support for the standard library, std::print to supplement std::format, and a std::generator t...| ISciNumPy.dev
I’ve released a new1 toolkit for running checks, similar to Ruff and Flake8 but designed to check configuration, called repo-review. It requires Python 3.10+2 to run and has no built-in checks, but is easy to write plugins for. A set of checks based on the Scientific Python Development Guide (which I also have a post about!) are available as a plugin, sp-repo-review. You can run repo-review in WebAssembly (via Pyodide), or in pre-commit, or as a GitHub Action. It supports multiple output fo...| ISciNumPy.dev
Python 3.12’s beta’s are out, which means the features are locked in. The theme this year has been cleanup and typing. distutils has been removed, and setuptools is no longer present in default environments.| ISciNumPy.dev
I set up an ARM DevKit recently, so I wanted to catalog what I do to setup Windows here. This is not as polished or complete as my macOS setups, because this is not something I use as a daily driver. But it might be useful, and I’m open to suggestions to improve it. This should work for Intel or ARM Windows. Also see macOS (AS).| ISciNumPy.dev
cibuildwheel 2.10 is out, with some important additions. PEP 517 config settings added, --only (which has an interesting use in GHA), and Cirrus CI support (including our first Apple Silicon native runner!) are highlights. We also support Python 3.11 now (as of 2.11.2, RC’s in older releases). We’ve had some fantastic releases of cibuildwheel this year, including some very powerful features you might be interested in using, and I haven’t covered releases since 2.2, so let’s take an in...| ISciNumPy.dev
Python 3.10 is out (and has been for a while, I’m late posting this), with new features and changes. The big new language feature this update is pattern matching. We get much better errors, the always-present typing improvements, and finally some real usage of the new PEG parser from 3.9.| ISciNumPy.dev
Python 3.11 has hit the beta (now released!) stage, which means no more new features. It’s a perfect time to play with it! The themes in this update are the standard ones: The faster CPython project is now fully going (3.11 is 25% faster on average), along with improved error messages, typing, and asyncio. Beyond this, the only major new feature is a library for reading TOML files; this probably only exciting if you are involved in Python packaging (but I am, so I’m excited!).| ISciNumPy.dev
Python 3.7 has been out for a while. In fact, it’s the oldest version of Python still receiving support when this was written. I’d still like to write a “what’s new”, targeting users who are upgrading to a Python 3.7+ only codebase, and want to know what to take advantage of!| ISciNumPy.dev
Poetry provides a all in one solution to Python packaging. I want to focus on why I was quite hard on Poetry in my last post, specifically on its default version capping and solver quirks, and also a few other negative things. This is a followup to Should you have upper version bounds, which you should read before this post.| ISciNumPy.dev
Bound version constraints (upper caps) are starting to show up in the Python ecosystem. This is causing real world problems with libraries following this recommendation, and is likely to continue to get worse; this practice does not scale to large numbers of libraries or large numbers of users. In this discussion I would like to explain why always providing an upper limit causes far more harm than good even for true SemVer libraries, why libraries that pin upper limits require more frequent u...| ISciNumPy.dev
Note: I now highly recommend cibuildwheel instead of custom binary wheels. See GHA Pure Python Wheels and GHA Binary Wheels for modern methods to produce wheels on GitHub Actions (directly applicable to Azure, as well, with minor changes; cibuildwheel works on all most major CI providers). See my new posts on cibuildwheel! This is the third post in a series about Azure DevOps. This one is about making Python wheels. If you want to play nice with Python users, or you have a complex build, this...| ISciNumPy.dev
SSH forwarding can improve your security along with reducing the need to type passwords and have multiple keys linked to your GitHub/GitLab instance. The procedure is:| ISciNumPy.dev
I’ve spent the last few years trying to make it easy for anyone to extend Python with compiled languages. I’ve worked on pybind11, a powerful C++ library that allows users to write advanced Python extensions using just C++11, used by some of the largest projects, SciPy, PyTorch, Google, LLVM, and tens of thousands of other libraries, down to very small extensions. I also work on cibuildwheel, which makes building binaries (called wheels) on continuous integration (CI) simple. It is again ...| ISciNumPy.dev