pypa / build

A simple, correct Python build frontend
https://build.pypa.io
MIT License
697 stars 115 forks source link

Terminal size error with 1.2.0 #760

Closed santhonisz closed 3 months ago

santhonisz commented 3 months ago

Hi there,

It appears that the changes added in https://github.com/pypa/build/pull/749 have the potential to break usage of build when the terminal size cannot be determined.

In our CI pipeline on Buildkite, we call python -m build -w on a python:3.8 Docker container. Since the release of build==1.2.0 this is failing with the following error:

image

The call to shutil.get_terminal_size().columns is evidently returning zero in this case and, as per the docs, when using Python < 3.11 the default fallback value will not be used.

Changed in version 3.11: The fallback values are also used if os.get_terminal_size() returns zeroes.

While it is possible to work around the issue in our pipeline, I think this scenario should be better handled by build.

henryiii commented 3 months ago

I've yanked 1.2.0 and will try to get a 1.2.1 out soon.

henryiii commented 3 months ago

1.2.1 is out. PyPI was blocking all uploads for a bit, but it's out now.