Skip to content

remove debug log statement in EXECUTOR shutdown callback#72

Merged
yndu13 merged 1 commit intoaliyun:masterfrom
psnelgrove-r7:executor-shutdown-logger
Nov 29, 2025
Merged

remove debug log statement in EXECUTOR shutdown callback#72
yndu13 merged 1 commit intoaliyun:masterfrom
psnelgrove-r7:executor-shutdown-logger

Conversation

@psnelgrove-r7
Copy link
Contributor

Using the signals module the library tries to gracefully shutdown the ThreadPoolExecutor with a callback.

For us this causes some issues with the logger module warning that you're writing to write to a log file after the file is closed. With these signal callbacks you can't control the shutdown order.

Traceback (most recent call last):
  File "/Users/psnelgrove/.local/share/uv/python/cpython-3.10.15-macos-aarch64-none/lib/python3.10/logging/__init__.py", line 1103, in emit
    stream.write(msg + self.terminator)
ValueError: I/O operation on closed file.
Call stack:
  File "/Users/psnelgrove/code/.../.venv/lib/python3.10/site-packages/alibabacloud_credentials/provider/refreshable.py", line 27, in _shutdown_handler
    log.debug("Shutting down executor...")
Message: 'Shutting down executor...'
Arguments: ()

Using the signals module the library tries to gracefully
shutdown the ThreadPoolExecutor with a callback. For us
this causes some issues with the logger module warning
that you're writing to write to a log file after
the file is closed. With these signal callbacks
you can't control the shutdown order.
@CLAassistant
Copy link

CLAassistant commented Nov 20, 2025

CLA assistant check
All committers have signed the CLA.

@psnelgrove-r7
Copy link
Contributor Author

I also think this aligns with the feedback in #67

@yndu13 yndu13 merged commit 36476f6 into aliyun:master Nov 29, 2025
1 check passed
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