Skip to content

Conversation

@olzhasar-reef
Copy link
Collaborator

_TqdmCloser is a workaround for leaked semaphores error happening when
using tqdm on MacOS and Python >= 3.11. The issue does not seem to
appear in Python 3.14.2, so we disable the workaround for newer Python
versions

@olzhasar-reef olzhasar-reef marked this pull request as ready for review December 17, 2025 16:30
@olzhasar-reef
Copy link
Collaborator Author

olzhasar-reef commented Dec 17, 2025

After enabling integration tests for macos - Python 3.13 pair, the tqdm closer test is now failing there too, which implies that it has something to do with the MacOS version as opposed to Python version.

Here is a recent job (from last month) where the test was passing on MacOS and Python 3.13:
https://github.com/Backblaze/B2_Command_Line_Tool/actions/runs/19467044882/job/55704518865

It used the following image:

  Operating System
  macOS
  15.7.1
  Image: macos-15-arm64
  Version: 20251104.0104

The last workflow (where the test fails) uses:

  Operating System
  macOS
  15.7.2
  Image: macos-15-arm64
  Version: 20251210.0068.1

@olzhasar-reef
Copy link
Collaborator Author

olzhasar-reef commented Dec 17, 2025

MacOS 15.7.2 release notes do mention some fixes of memory-related issues on the Kernel level, that potentially could have resolved the tqdm leaked semaphore objects problem

@olzhasar-reef olzhasar-reef force-pushed the tqdm-closer-python-3.14 branch 2 times, most recently from 44fc2cb to cac1f01 Compare December 18, 2025 20:47
_TqdmCloser is a workaround for leaked semaphores error happening when
using tqdm on MacOS and Python >= 3.11. The issue does not seem to
appear in MacOS 15.7.2, so we disable the workaround for newer MacOS
versions
@olzhasar-reef olzhasar-reef force-pushed the tqdm-closer-python-3.14 branch from cac1f01 to 3f474ec Compare December 18, 2025 21:01
f'b2://{bucket.name}/{file_name}',
]
)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second part of the test does not make much sense now that the newer MacOS image is used in the CI

Copy link
Contributor

@mlech-reef mlech-reef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codewise, it looks ok. If the CI proves everything works on 15. 7. 2, it lgtm

@olzhasar-reef
Copy link
Collaborator Author

Yeap, the remaining test that checks for a clean output without warnings passes on MacOS 5.17.2.
So we get a clean output while TqdmCloser is disabled there:

https://github.com/Backblaze/B2_Command_Line_Tool/actions/runs/20351177710/job/58743915427?pr=1128

On the other hand, on my machine with MacOs 5.16.1, there are still warnings with TqdmCloser disabled and no warnings when it works.
So everything seems to work as expected.

@olzhasar-reef olzhasar-reef merged commit a5cda66 into master Dec 22, 2025
73 of 76 checks passed
@olzhasar-reef olzhasar-reef deleted the tqdm-closer-python-3.14 branch December 22, 2025 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants