@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.

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

hynek, to random
@hynek@mastodon.social avatar

I’m not as excited about running uv locally, b/c it’s just not a significant factor in my day-to-day life.

BUT just installing tox-uv in structlog’s CI made it go from 2:19 to 1:47 which is not life-changing, but significant. It could get a lot faster if GitHub Actions added support for it (pre-installation & caching), which would be in their own interest but not holding my breath.

Switching build-and-inspect-python-package to it made the action go from ~30s to ~20s.

https://github.com/hynek/build-and-inspect-python-package/pull/86

henryiii,
@henryiii@fosstodon.org avatar

@hynek I assume if it also could do the build (which it’s pretty close to being able to do) that would be even better?

henryiii, to random
@henryiii@fosstodon.org avatar

Using Charlie Marsh's UV (pip/venv replacement) as a nox backend drops the time taken to build docs from 22 seconds to 4.2 seconds!

video/mp4

sullivancolin, to random

@pythonbytes @mkennedy @brianokken

Charlie Marsh from Ruff announces a new drop-in replacement for pip and pip-tools written in rust. Also taking stewardship of Rye!

https://astral.sh/blog/uv

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

We released a new cibuildwheel (2.16.5) supporting the new M1 runners on GitHub Actions that was rolled out today! Also with a Windows fix for powershell 7.3+ (now rolling out in GH images). https://github.com/pypa/cibuildwheel/releases/tag/v2.16.5

hynek, to random
@hynek@mastodon.social avatar
henryiii,
@henryiii@fosstodon.org avatar

@hynek cibuildwheel now updated for it. :)

henryiii, to random
@henryiii@fosstodon.org avatar

PSA: GitHub Actions's upload-artifact@v4 no longer merges artifacts, but requires a unique name per artifact. Sadly, download-artifacts wasn't improved to help with this really handy feature being removed. This affects cibuildwheel, logging, multi-step website generation, etc.

henryiii,
@henryiii@fosstodon.org avatar

@hynek Yeah, I mentioned that one too on https://github.com/actions/download-artifact/issues/216#issuecomment-1856620738. IMO, simply adding a way to not make directories when downloading multiple actions and select a subset of multiple artifacts in the download-artifact job would fix most of the cases.

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

I wrote a little post about pipx's new experimental script support: https://iscinumpy.dev/post/pep723/

You can now have a single Python file that declares its dependencies, and run it via pipx run!

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon Ahh, that might be worth updating the post, I assumed that part was pretty stable.

henryiii,
@henryiii@fosstodon.org avatar

@brettcannon I looked around a bit, but I didn’t see the discussion on that. I guess it was in the middle of one of the long ones.

henryiii, to random
@henryiii@fosstodon.org avatar

PEP 723 was provisionally accepted today! That means you can embed a pyproject.toml into a single file Python script! So this:

/// pyproject

run.requirements = [“requests”]

///

At the top of your file should enable tools like pipx to know it needs requests to run!

( I made the PR to pipx today )

henryiii, to random
@henryiii@fosstodon.org avatar

The Scientific-Python development guide now has a toggle for ruff-format as an alternative to black: https://learn.scientific-python.org/development/guides/style/ (And sp-repo-review checks for either and looks for deprecated Ruff config options)

henryiii,
@henryiii@fosstodon.org avatar

@sethmlarson @gaborbernat ruff-format is very (99.9%) close to black, and it’s 30x faster. But it’s a bit too new to just drop black entirely, imo. :)

henryiii,
@henryiii@fosstodon.org avatar

@sethmlarson @gaborbernat They are adding extremely minimal configuration (quote style, basically). This hopefully will avoid blue/axblack/every-other fork of black that adds single quote style. You can't modify a compiled program as easily as Black. Also, it's actually currently less loose than Black - you can't disable string formatting, you can only pick single/double quotes! pypa/build follows single quotes ( :( ), so it was really nice to not have to use a separate tool.

henryiii,
@henryiii@fosstodon.org avatar

@sethmlarson @gaborbernat I've heard they are working with the Black authors. And --preview support is planned.

henryiii,
@henryiii@fosstodon.org avatar

@sethmlarson @gaborbernat All of Felipe's projects (like pypa/build and pyproject-metadata) use single-quote style. You can just run black without string normalization then use pre-commit-hooks's string fixer to force single quotes. I get 3.6K projects using it: https://github.com/search?type=code&q=path%3A.pre-commit-config.yaml+double-quote-string-fixer

henryiii, to python
@henryiii@fosstodon.org avatar

Want to know the best practices for building and maintaining a package? And want a template for new projects or WebAssembly-powered tooling to help existing projects? The URL for this post is finally stable, so I can now share it! https://blog.scientific-python.org/scientific-python/dev-summit-1-development-guide/

joerick, to random

I just released cibuildwheel v2.15, with support for building CPython 3.12 wheels. CPython 3.12 just released its first release candidate which is ABI compatible with the final release. It's time to upload new Python platform wheels for your libraries to PyPI!
https://github.com/pypa/cibuildwheel/releases/tag/v2.15.0

henryiii,
@henryiii@fosstodon.org avatar

@joerick fyi, NumPy 1.26.0b1 is out with 3.12 wheels. So with a little work, everyone can start testing/building NumPy dependent projects now!

'numpy; python_version<"3.12"',
'numpy>=1.26.0b1; python_version>="3.12"',

Or PIP_PRE=1 in the environment.

Edit: PIP_ONLY_BINARY=:all: / PIP_ONLY_BINARY=numpy also works!

henryiii, to python
@henryiii@fosstodon.org avatar

We’ve just released pybind11 2.11.0 after the Tools plenary ! (2.10.0 was released … CDD (Conference Driven Development), anyone? https://github.com/pybind/pybind11/releases/tag/v2.11.0

nedbat, to python
@nedbat@hachyderm.io avatar

Want to do something simple to help people start off right with ?
Make pull requests for docs to change
pip install whatever
to
python3 -m pip install whatever

henryiii,
@henryiii@fosstodon.org avatar

@nedbat What about windows users? Python doesn’t set up a “python3” by default on windows, just “python” and “py”. GHA now adds “python3” for windows, but we had to ask for it, it wasn’t there originally.

IMO switching to “pipx install <thing>” for apps would be a huge improvement! If we got used to this as a community I think a lot of negativity surrounding packaging would go away.

henryiii, to random
@henryiii@fosstodon.org avatar

If you'd like to see how completely I've jumped on board @charliermarsh's Ruff, I've just been moving over to the new astral-sh name in pre-commit, and mentioning
https://github.com/scientific-python/cookie/pull/200 when doing so... (be sure to open the image, it's much longer than the preview!)

henryiii, to programming
@henryiii@fosstodon.org avatar

Cibuildwheel 2.13 is out, with CPython 3.12.0b1 prerelease option! Also allows custom container startup options. https://github.com/pypa/cibuildwheel/releases/tag/v2.13.0 - thanks @joerick!

nedbat, to random
@nedbat@hachyderm.io avatar

@brettcannon At the SC panel, you asked people to make beta wheels, but cibuildwheel says not to? https://cibuildwheel.readthedocs.io/en/stable/options/#prerelease-pythons I guess I need a more nuanced reading of the advice...?

henryiii,
@henryiii@fosstodon.org avatar

@hugovk @brettcannon @nedbat @pillow

Also post releases would duplicate all binaries every release, binaries can be large. Ideally you do this for every release in the beta period, as users can pin or lock. Your release cycle is not based on CPython usually - it is already sometimes hard for projects to do a release to add a python at an arbitrary time (“arbitrary” is now every October which really helps!). Uploading to test PyPI might be an alternative…

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