@henryiii@fosstodon.org avatar

henryiii

@henryiii@fosstodon.org

Part of the IRIS-HEP project at Princeton. Scikit-HEP, Scikit-build, PyPA/build, PyPA/cibuildwheel, pybind11, CLI11, & plumbum.

This profile is from a federated server and may be incomplete. Browse more on the original instance.

nedbat, to python
@nedbat@hachyderm.io avatar

The joy of trying to be on the cutting edge of #Python:

HTTPError: 400 Bad Request from https://upload.pypi.org/legacy/
'Programming Language :: Python :: 3.14' is not a valid classifier.

henryiii,
@henryiii@fosstodon.org avatar

@nedbat @SnoopJ IMO you should not add a classifier till beta 1. A classifier states you are testing on a particular version of Python and things can dramatically change and break up till beta 1, at which point it’s stable minus bugs and-or emergency removals. It’s great to test on alphas/main, but I wouldn’t consider it a valid classifier until beta 1.

henryiii, to python
@henryiii@fosstodon.org avatar

New cibuildwheel release, with free-threaded Python support for Linux and Windows! Also container-engine is now a non-global option, we use hatchling to package our wheel, and a few other things. https://github.com/pypa/cibuildwheel/releases/tag/v2.18.1 #python #release

brettcannon, (edited ) to random
@brettcannon@fosstodon.org avatar

Do you look at a project's trove classifiers to tell what Python versions are supported (e.g. does it support Python 3.13 yet)?

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon This is tricky. Seeing one tells me it's ready for 3.13 and probably tested on it, but not seeing it doesn't tell me it doesn't work. Without the classifier, the next thing I'd check is to see if it has platform specific (or ABI3) wheels that work on 3.13.

henryiii, to python
@henryiii@fosstodon.org avatar

Latest manylinux/musllinux images have free-threaded CPython builds! "python3.13t" #python

henryiii, to python
@henryiii@fosstodon.org avatar

I've just released cibuildwheel 2.18.0, with prerelease support for CPython 3.13 - set CIBW_PRERELEASE_PYTHONS to test building 3.13 wheels! (No free-threading yet, waiting on binaries & pip) https://github.com/pypa/cibuildwheel/releases/tag/v2.18.0 #python #release

brettcannon, to random
@brettcannon@fosstodon.org avatar

Looking for a Bash one-liner to tell by exit code whether your Git checkout is dirty?

if [ -n "$(git status --porcelain)" ]; then (exit 1); fi

I sought this out for GitHub Actions so that I could set up a formatting command for a project and then check in CI if it would change anything instead of having a second command just for the check (e.g. black followed by this in CI instead of having a separate, dedicated black --check just for CI). Basically trying up the DRY on maintenance stuff

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon Why not git diff --quiet? --quiet implies --exit-code.

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon Ah, no, it does not, so that's why. :)

henryiii, to python
@henryiii@fosstodon.org avatar

Python 3.13 beta 1 is out, which means it's time for my yearly post on what's new: https://iscinumpy.dev/post/python-313/ #python

henryiii, to python
@henryiii@fosstodon.org avatar

This feature of uv is not talked about enough:

uv pip install --exclude-newer 2020-01-01 -r requirements.txt

I was able to recover and build a project untouched for many years using this easily!

brettcannon, to random
@brettcannon@fosstodon.org avatar

Thanks to everyone who voted in https://fosstodon.org/@brettcannon/112395986863435778 ! An interesting outcome was that "chore" got a large number of write-in votes (see the replies to the poll). It was actually so consistent and numerous i wouldn't be surprised if it would have won the vote had I included it. 😅

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon https://www.conventionalcommits.org/en/v1.0.0/ uses chore:, so I've always prepended my titles with chore: for these sorts of things; that's why I would probably have gone with chore. :)

henryiii, to python
@henryiii@fosstodon.org avatar

Google fired their Python team, including one of our pybind11 lead developers (the list of accomplishments of that team is, ah, was, impressive!) We'll need to tighten up our min version support for pybind11, so I've opened up a poll: https://github.com/pybind/pybind11/discussions/5124 3.7+ or 3.8+? #python

henryiii, to python
@henryiii@fosstodon.org avatar

Build 1.1 is out, and in some cases it's over 2x faster than 1.0, such as in my favorite way to use it, "pipx run build"! https://github.com/pypa/build/releases/tag/v1.1.0

video/mp4

henryiii,
@henryiii@fosstodon.org avatar

@hugovk @pillow Nice, the savings is a constant, so the effect is fractionally largest if you have a small package (pure Python plus hatchling or other simple backend). It basically skips installing pip in the temporary env, and pip is large/slow to install and has to be installed twice (since there are two envs). We might provide backend options in the future, allowing something like uv to be used. ;) But this was a good first step!

henryiii,
@henryiii@fosstodon.org avatar

@hugovk @pillow build 1.2 is a hair faster, and offers —installer=uv, which is even faster. :)

henryiii, to python
@henryiii@fosstodon.org avatar

Stick these lines at the top of your noxfile.py:

nox.needs_version = ">=2024.3.2"
nox.options.default_venv_backend = "uv|virtualenv"

And install uv to make install-heavy nox jobs go much faster. You can instead try -db uv or setting NOX_DEFAULT_VENV_BACKEND=uv. #python #nox #uv

henryiii,
@henryiii@fosstodon.org avatar

@hynek No, not anymore. It used to be that you needed “name @.” for a non-editable local install. But it’s normal now.

henryiii,
@henryiii@fosstodon.org avatar

@hynek it does require https://github.com/astral-sh/uv/releases/tag/0.1.24 which has only been out a few days.

pythonbytes, to python
@pythonbytes@fosstodon.org avatar
henryiii,
@henryiii@fosstodon.org avatar

@tonybaloney @brianokken @pythonbytes @mkennedy repr is the “programmer’s view”, while str is what it looks like as a string. You don’t have to implement str, it will default to calling repr. For example, a Card class could be have a repr of ‘Card(“Jack”)’ and a string “J”.

henryiii, to python
@henryiii@fosstodon.org avatar

We just released pybind11 2.12! Along with lots of fixes and features, this is also the first version to support NumPy 2.0 - please update and release new binaries of your packages before 2.0 goes final! You don't need NumPy 2 when building with pybind11! https://github.com/pybind/pybind11/releases/tag/v2.12.0 #python. #release

henryiii, to python
@henryiii@fosstodon.org avatar

cmake for Python 3.29.0 is out now! First release to use scikit-build-core internally as the build backend, Python 3.7+ required. https://github.com/scikit-build/cmake-python-distributions/releases/tag/3.29.0.1 #release #python #cmake

henryiii, to random
@henryiii@fosstodon.org avatar

Switching from mamba to prefix.dev's pixi in GitHub Actions for my book build took setup time from about a minute to 13 seconds (as long as you don’t cache). And now it’s fully locked, too! Quite happy. And it's simpler in Actions. https://github.com/henryiii/se-for-sci/pull/42

brettcannon, to random
@brettcannon@fosstodon.org avatar

I don't think there's any new info in https://snarky.ca/state-of-wasi-support-for-cpython-march-2024/ for those that follow me here, but it's a status update for CPython and WASI up until I started my parental leave.

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon WASI still doesn't support compiled extensions, like numpy, cryptography, etc? That's the main reason Emscripten based distributions (Pyodide) are still far more interesting to me - Python's ecosystem is the huge selling point.

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon @henryiii very interesting! I’ll look into it, probably when I get off paternity leave.

henryiii, to python
@henryiii@fosstodon.org avatar

Cibuildwheel 2.17 is out! Highlights include a new inherit table for overrides, official GHA Apple silicon (macOS-14) support (was experimental in 2.16.5), auto platform detection when running locally, and setuptools/wheel removed. https://github.com/pypa/cibuildwheel/releases/tag/v2.17.0 thanks @joerick! #python #release

henryiii, to python
@henryiii@fosstodon.org avatar

Nox 2024.3.2 is out! The new optional uv backend is blazing fast, and it has several long awaited features, like --force-python on non-parametrized sessions, venv reuse options, an envvar for backend selection, backend sequences with fallthrough, and more! (note: "virtualenv" is the Nox backend selector, it's virtualenv + pip)

video/mp4

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • mdbf
  • ngwrru68w68
  • tester
  • magazineikmin
  • thenastyranch
  • rosin
  • khanakhh
  • InstantRegret
  • Youngstown
  • slotface
  • Durango
  • kavyap
  • DreamBathrooms
  • megavids
  • tacticalgear
  • osvaldo12
  • normalnudes
  • cubers
  • cisconetworking
  • everett
  • GTA5RPClips
  • ethstaker
  • Leos
  • provamag3
  • anitta
  • modclub
  • lostlight
  • All magazines