Pillow
Pillow copied to clipboard
Add --bugreport argument to __main__.py to omit supported formats
Changes proposed in this pull request:
-
#3870 added pilinfo to help in diagnosing issues. However, because it prints a list of all supported formats, I have sometimes found it difficult to explain which lines can be relevant when asking users to provide its output, e.g. in https://github.com/python-pillow/Pillow/issues/7747#issuecomment-1908063395. Adding a
--bugreport
option (feel free to suggest other names) to suppress printing the list of supported formats would make it easier to explain (and should be fine for older versions which will just ignore the new option). -
Add
sys.executable
,sys.prefix
,sys.base_prefix
topilinfo
. This can help resolve the occasional confusion when there are multiple Python versions / virtual environments involved, or highlight when Anaconda Python is used.For example:
------------------------------------------------------------------- Pillow 10.3.0.dev0 Python 3.11.8 (v3.11.8:db85d51d3e, Feb 6 2024, 18:02:37) [Clang 13.0.0 (clang-1300.0.29.30)] -------------------------------------------------------------------- Python executable is /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 System Python files loaded from /Library/Frameworks/Python.framework/Versions/3.11 -------------------------------------------------------------------- Python Pillow modules loaded from /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/PIL Binary Pillow modules loaded from /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/PIL --------------------------------------------------------------------
-
Add the command to the issue template -- perhaps this change should wait until after the next release.